@@ -877,6 +877,32 @@ def update!(**args)
877877 end
878878 end
879879
880+ # Details about the client-side encryption applied to the file.
881+ class ClientEncryptionDetails
882+ include Google ::Apis ::Core ::Hashable
883+
884+ # Representation of the CSE DecryptionMetadata.
885+ # Corresponds to the JSON property `decryptionMetadata`
886+ # @return [Google::Apis::DriveV3::DecryptionMetadata]
887+ attr_accessor :decryption_metadata
888+
889+ # The encryption state of the file. The values expected here are: - encrypted -
890+ # unencrypted
891+ # Corresponds to the JSON property `encryptionState`
892+ # @return [String]
893+ attr_accessor :encryption_state
894+
895+ def initialize ( **args )
896+ update! ( **args )
897+ end
898+
899+ # Update properties of this object
900+ def update! ( **args )
901+ @decryption_metadata = args [ :decryption_metadata ] if args . key? ( :decryption_metadata )
902+ @encryption_state = args [ :encryption_state ] if args . key? ( :encryption_state )
903+ end
904+ end
905+
880906 # A comment on a file. Some resource methods (such as `comments.update`) require
881907 # a `commentId`. Use the `comments.list` method to retrieve the ID for a comment
882908 # in a file.
@@ -1120,6 +1146,67 @@ def update!(**args)
11201146 end
11211147 end
11221148
1149+ # Representation of the CSE DecryptionMetadata.
1150+ class DecryptionMetadata
1151+ include Google ::Apis ::Core ::Hashable
1152+
1153+ # Chunk size used if content was encrypted with the AES 256 GCM Cipher. Possible
1154+ # values are: - default - small
1155+ # Corresponds to the JSON property `aes256GcmChunkSize`
1156+ # @return [String]
1157+ attr_accessor :aes256_gcm_chunk_size
1158+
1159+ # The URL-safe Base64 encoded HMAC-SHA256 digest of the resource metadata with
1160+ # its DEK (Data Encryption Key); see https://developers.google.com/workspace/cse/
1161+ # reference
1162+ # Corresponds to the JSON property `encryptionResourceKeyHash`
1163+ # @return [String]
1164+ attr_accessor :encryption_resource_key_hash
1165+
1166+ # The signed JSON Web Token (JWT) which can be used to authorize the requesting
1167+ # user with the Key ACL Service (KACLS). The JWT asserts that the requesting
1168+ # user has at least read permissions on the file.
1169+ # Corresponds to the JSON property `jwt`
1170+ # @return [String]
1171+ attr_accessor :jwt
1172+
1173+ # The ID of the KACLS (Key ACL Service) used to encrypt the file.
1174+ # Corresponds to the JSON property `kaclsId`
1175+ # @return [Fixnum]
1176+ attr_accessor :kacls_id
1177+
1178+ # The name of the KACLS (Key ACL Service) used to encrypt the file.
1179+ # Corresponds to the JSON property `kaclsName`
1180+ # @return [String]
1181+ attr_accessor :kacls_name
1182+
1183+ # Key format for the unwrapped key. Must be `tinkAesGcmKey`.
1184+ # Corresponds to the JSON property `keyFormat`
1185+ # @return [String]
1186+ attr_accessor :key_format
1187+
1188+ # The URL-safe Base64 encoded wrapped key used to encrypt the contents of the
1189+ # file.
1190+ # Corresponds to the JSON property `wrappedKey`
1191+ # @return [String]
1192+ attr_accessor :wrapped_key
1193+
1194+ def initialize ( **args )
1195+ update! ( **args )
1196+ end
1197+
1198+ # Update properties of this object
1199+ def update! ( **args )
1200+ @aes256_gcm_chunk_size = args [ :aes256_gcm_chunk_size ] if args . key? ( :aes256_gcm_chunk_size )
1201+ @encryption_resource_key_hash = args [ :encryption_resource_key_hash ] if args . key? ( :encryption_resource_key_hash )
1202+ @jwt = args [ :jwt ] if args . key? ( :jwt )
1203+ @kacls_id = args [ :kacls_id ] if args . key? ( :kacls_id )
1204+ @kacls_name = args [ :kacls_name ] if args . key? ( :kacls_name )
1205+ @key_format = args [ :key_format ] if args . key? ( :key_format )
1206+ @wrapped_key = args [ :wrapped_key ] if args . key? ( :wrapped_key )
1207+ end
1208+ end
1209+
11231210 # A restriction for copy and download of the file.
11241211 class DownloadRestriction
11251212 include Google ::Apis ::Core ::Hashable
@@ -1630,6 +1717,11 @@ class File
16301717 # @return [Google::Apis::DriveV3::File::Capabilities]
16311718 attr_accessor :capabilities
16321719
1720+ # Details about the client-side encryption applied to the file.
1721+ # Corresponds to the JSON property `clientEncryptionDetails`
1722+ # @return [Google::Apis::DriveV3::ClientEncryptionDetails]
1723+ attr_accessor :client_encryption_details
1724+
16331725 # Additional information about the content of the file. These fields are never
16341726 # populated in responses.
16351727 # Corresponds to the JSON property `contentHints`
@@ -1955,8 +2047,8 @@ class File
19552047 attr_accessor :thumbnail_version
19562048
19572049 # Whether the file has been trashed, either explicitly or from a trashed parent
1958- # folder. Only the owner may trash a file, and other users cannot see files in
1959- # the owner's trash.
2050+ # folder. Only the owner may trash a file, but other users can still access the
2051+ # file in the owner's trash until it's permanently deleted .
19602052 # Corresponds to the JSON property `trashed`
19612053 # @return [Boolean]
19622054 attr_accessor :trashed
@@ -2030,6 +2122,7 @@ def initialize(**args)
20302122 def update! ( **args )
20312123 @app_properties = args [ :app_properties ] if args . key? ( :app_properties )
20322124 @capabilities = args [ :capabilities ] if args . key? ( :capabilities )
2125+ @client_encryption_details = args [ :client_encryption_details ] if args . key? ( :client_encryption_details )
20332126 @content_hints = args [ :content_hints ] if args . key? ( :content_hints )
20342127 @content_restrictions = args [ :content_restrictions ] if args . key? ( :content_restrictions )
20352128 @copy_requires_writer_permission = args [ :copy_requires_writer_permission ] if args . key? ( :copy_requires_writer_permission )
@@ -2852,6 +2945,50 @@ def update!(**args)
28522945 end
28532946 end
28542947
2948+ # JWT and associated metadata used to generate CSE files.
2949+ class GenerateCseTokenResponse
2950+ include Google ::Apis ::Core ::Hashable
2951+
2952+ # The current Key ACL Service (KACLS) ID associated with the JWT.
2953+ # Corresponds to the JSON property `currentKaclsId`
2954+ # @return [Fixnum]
2955+ attr_accessor :current_kacls_id
2956+
2957+ # Name of the KACLs that the returned KACLs ID points to.
2958+ # Corresponds to the JSON property `currentKaclsName`
2959+ # @return [String]
2960+ attr_accessor :current_kacls_name
2961+
2962+ # The fileId for which the JWT was generated.
2963+ # Corresponds to the JSON property `fileId`
2964+ # @return [String]
2965+ attr_accessor :file_id
2966+
2967+ # The signed JSON Web Token (JWT) for the file.
2968+ # Corresponds to the JSON property `jwt`
2969+ # @return [String]
2970+ attr_accessor :jwt
2971+
2972+ # Output only. Identifies what kind of resource this is. Value: the fixed string
2973+ # `"drive#generateCseTokenResponse"`.
2974+ # Corresponds to the JSON property `kind`
2975+ # @return [String]
2976+ attr_accessor :kind
2977+
2978+ def initialize ( **args )
2979+ update! ( **args )
2980+ end
2981+
2982+ # Update properties of this object
2983+ def update! ( **args )
2984+ @current_kacls_id = args [ :current_kacls_id ] if args . key? ( :current_kacls_id )
2985+ @current_kacls_name = args [ :current_kacls_name ] if args . key? ( :current_kacls_name )
2986+ @file_id = args [ :file_id ] if args . key? ( :file_id )
2987+ @jwt = args [ :jwt ] if args . key? ( :jwt )
2988+ @kind = args [ :kind ] if args . key? ( :kind )
2989+ end
2990+ end
2991+
28552992 # A list of generated file IDs which can be provided in create requests.
28562993 class GeneratedIds
28572994 include Google ::Apis ::Core ::Hashable
0 commit comments