Method: OCI::ObjectStorage::Models::CopyObjectDetails#initialize
- Defined in:
- lib/oci/object_storage/models/copy_object_details.rb
#initialize(attributes = {}) ⇒ CopyObjectDetails
Initializes the object
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/oci/object_storage/models/copy_object_details.rb', line 133 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.source_object_name = attributes[:'sourceObjectName'] if attributes[:'sourceObjectName'] raise 'You cannot provide both :sourceObjectName and :source_object_name' if attributes.key?(:'sourceObjectName') && attributes.key?(:'source_object_name') self.source_object_name = attributes[:'source_object_name'] if attributes[:'source_object_name'] self.source_object_if_match_e_tag = attributes[:'sourceObjectIfMatchETag'] if attributes[:'sourceObjectIfMatchETag'] raise 'You cannot provide both :sourceObjectIfMatchETag and :source_object_if_match_e_tag' if attributes.key?(:'sourceObjectIfMatchETag') && attributes.key?(:'source_object_if_match_e_tag') self.source_object_if_match_e_tag = attributes[:'source_object_if_match_e_tag'] if attributes[:'source_object_if_match_e_tag'] self.source_version_id = attributes[:'sourceVersionId'] if attributes[:'sourceVersionId'] raise 'You cannot provide both :sourceVersionId and :source_version_id' if attributes.key?(:'sourceVersionId') && attributes.key?(:'source_version_id') self.source_version_id = attributes[:'source_version_id'] if attributes[:'source_version_id'] self.destination_region = attributes[:'destinationRegion'] if attributes[:'destinationRegion'] raise 'You cannot provide both :destinationRegion and :destination_region' if attributes.key?(:'destinationRegion') && attributes.key?(:'destination_region') self.destination_region = attributes[:'destination_region'] if attributes[:'destination_region'] self.destination_namespace = attributes[:'destinationNamespace'] if attributes[:'destinationNamespace'] raise 'You cannot provide both :destinationNamespace and :destination_namespace' if attributes.key?(:'destinationNamespace') && attributes.key?(:'destination_namespace') self.destination_namespace = attributes[:'destination_namespace'] if attributes[:'destination_namespace'] self.destination_bucket = attributes[:'destinationBucket'] if attributes[:'destinationBucket'] raise 'You cannot provide both :destinationBucket and :destination_bucket' if attributes.key?(:'destinationBucket') && attributes.key?(:'destination_bucket') self.destination_bucket = attributes[:'destination_bucket'] if attributes[:'destination_bucket'] self.destination_object_name = attributes[:'destinationObjectName'] if attributes[:'destinationObjectName'] raise 'You cannot provide both :destinationObjectName and :destination_object_name' if attributes.key?(:'destinationObjectName') && attributes.key?(:'destination_object_name') self.destination_object_name = attributes[:'destination_object_name'] if attributes[:'destination_object_name'] self.destination_object_if_match_e_tag = attributes[:'destinationObjectIfMatchETag'] if attributes[:'destinationObjectIfMatchETag'] raise 'You cannot provide both :destinationObjectIfMatchETag and :destination_object_if_match_e_tag' if attributes.key?(:'destinationObjectIfMatchETag') && attributes.key?(:'destination_object_if_match_e_tag') self.destination_object_if_match_e_tag = attributes[:'destination_object_if_match_e_tag'] if attributes[:'destination_object_if_match_e_tag'] self.destination_object_if_none_match_e_tag = attributes[:'destinationObjectIfNoneMatchETag'] if attributes[:'destinationObjectIfNoneMatchETag'] raise 'You cannot provide both :destinationObjectIfNoneMatchETag and :destination_object_if_none_match_e_tag' if attributes.key?(:'destinationObjectIfNoneMatchETag') && attributes.key?(:'destination_object_if_none_match_e_tag') self.destination_object_if_none_match_e_tag = attributes[:'destination_object_if_none_match_e_tag'] if attributes[:'destination_object_if_none_match_e_tag'] self. = attributes[:'destinationObjectMetadata'] if attributes[:'destinationObjectMetadata'] raise 'You cannot provide both :destinationObjectMetadata and :destination_object_metadata' if attributes.key?(:'destinationObjectMetadata') && attributes.key?(:'destination_object_metadata') self. = attributes[:'destination_object_metadata'] if attributes[:'destination_object_metadata'] self.destination_object_storage_tier = attributes[:'destinationObjectStorageTier'] if attributes[:'destinationObjectStorageTier'] raise 'You cannot provide both :destinationObjectStorageTier and :destination_object_storage_tier' if attributes.key?(:'destinationObjectStorageTier') && attributes.key?(:'destination_object_storage_tier') self.destination_object_storage_tier = attributes[:'destination_object_storage_tier'] if attributes[:'destination_object_storage_tier'] end |