oci 2.3.7 → 2.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/oci/core/blockstorage_client.rb +56 -24
  4. data/lib/oci/core/compute_client.rb +578 -24
  5. data/lib/oci/core/core.rb +11 -0
  6. data/lib/oci/core/models/app_catalog_listing.rb +242 -0
  7. data/lib/oci/core/models/app_catalog_listing_resource_version.rb +295 -0
  8. data/lib/oci/core/models/app_catalog_listing_resource_version_agreements.rb +219 -0
  9. data/lib/oci/core/models/app_catalog_listing_resource_version_summary.rb +194 -0
  10. data/lib/oci/core/models/app_catalog_listing_summary.rb +188 -0
  11. data/lib/oci/core/models/app_catalog_subscription.rb +246 -0
  12. data/lib/oci/core/models/app_catalog_subscription_summary.rb +246 -0
  13. data/lib/oci/core/models/create_app_catalog_subscription_details.rb +232 -0
  14. data/lib/oci/core/models/create_nat_gateway_details.rb +239 -0
  15. data/lib/oci/core/models/launch_instance_details.rb +4 -0
  16. data/lib/oci/core/models/nat_gateway.rb +333 -0
  17. data/lib/oci/core/models/public_ip.rb +76 -13
  18. data/lib/oci/core/models/service_gateway.rb +9 -4
  19. data/lib/oci/core/models/update_nat_gateway_details.rb +208 -0
  20. data/lib/oci/core/models/update_service_gateway_details.rb +9 -4
  21. data/lib/oci/core/virtual_network_client.rb +546 -91
  22. data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
  23. data/lib/oci/object_storage/models/bucket.rb +18 -4
  24. data/lib/oci/object_storage/models/copy_object_details.rb +269 -0
  25. data/lib/oci/object_storage/models/multipart_upload.rb +1 -1
  26. data/lib/oci/object_storage/models/namespace_metadata.rb +1 -1
  27. data/lib/oci/object_storage/models/object_lifecycle_policy.rb +167 -0
  28. data/lib/oci/object_storage/models/object_lifecycle_rule.rb +245 -0
  29. data/lib/oci/object_storage/models/object_name_filter.rb +153 -0
  30. data/lib/oci/object_storage/models/preauthenticated_request.rb +1 -1
  31. data/lib/oci/object_storage/models/put_object_lifecycle_policy_details.rb +147 -0
  32. data/lib/oci/object_storage/models/restore_objects_details.rb +2 -2
  33. data/lib/oci/object_storage/models/work_request.rb +304 -0
  34. data/lib/oci/object_storage/models/work_request_error.rb +168 -0
  35. data/lib/oci/object_storage/models/work_request_log_entry.rb +156 -0
  36. data/lib/oci/object_storage/models/work_request_resource.rb +225 -0
  37. data/lib/oci/object_storage/models/work_request_resource_metadata_key.rb +12 -0
  38. data/lib/oci/object_storage/models/work_request_summary.rb +304 -0
  39. data/lib/oci/object_storage/object_storage.rb +12 -0
  40. data/lib/oci/object_storage/object_storage_client.rb +542 -17
  41. data/lib/oci/object_storage/object_storage_client_composite_operations.rb +53 -0
  42. data/lib/oci/version.rb +1 -1
  43. metadata +24 -2
@@ -376,6 +376,45 @@ module OCI
376
376
  # rubocop:disable Layout/EmptyLines
377
377
 
378
378
 
379
+ # Calls {OCI::Core::VirtualNetworkClient#create_nat_gateway} and then waits for the {OCI::Core::Models::NatGateway} acted upon
380
+ # to enter the given state(s).
381
+ #
382
+ # @param [OCI::Core::Models::CreateNatGatewayDetails] create_nat_gateway_details Details for creating a NAT gateway.
383
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::NatGateway#lifecycle_state}
384
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::VirtualNetworkClient#create_nat_gateway}
385
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
386
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
387
+ # * max_wait_seconds The maximum time to wait, in seconds
388
+ #
389
+ # @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Core::Models::NatGateway}
390
+ def create_nat_gateway_and_wait_for_state(create_nat_gateway_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
391
+ operation_result = @service_client.create_nat_gateway(create_nat_gateway_details, base_operation_opts)
392
+
393
+ return operation_result if wait_for_states.empty?
394
+
395
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
396
+ wait_for_resource_id = operation_result.data.id
397
+
398
+ begin
399
+ waiter_result = @service_client.get_nat_gateway(wait_for_resource_id).wait_until(
400
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
401
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
402
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
403
+ )
404
+ result_to_return = waiter_result
405
+
406
+ return result_to_return
407
+ rescue StandardError
408
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
409
+ end
410
+ end
411
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
412
+ # rubocop:enable Layout/EmptyLines
413
+
414
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
415
+ # rubocop:disable Layout/EmptyLines
416
+
417
+
379
418
  # Calls {OCI::Core::VirtualNetworkClient#create_public_ip} and then waits for the {OCI::Core::Models::PublicIp} acted upon
380
419
  # to enter the given state(s).
381
420
  #
@@ -1008,6 +1047,46 @@ module OCI
1008
1047
  # rubocop:disable Layout/EmptyLines
1009
1048
 
1010
1049
 
1050
+ # Calls {OCI::Core::VirtualNetworkClient#delete_nat_gateway} and then waits for the {OCI::Core::Models::NatGateway} acted upon
1051
+ # to enter the given state(s).
1052
+ #
1053
+ # @param [String] nat_gateway_id The NAT gateway's [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
1054
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::NatGateway#lifecycle_state}
1055
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::VirtualNetworkClient#delete_nat_gateway}
1056
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
1057
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
1058
+ # * max_wait_seconds The maximum time to wait, in seconds
1059
+ #
1060
+ # @return [OCI::Response] A {OCI::Response} object with data of type nil
1061
+ def delete_nat_gateway_and_wait_for_state(nat_gateway_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
1062
+ initial_get_result = @service_client.get_nat_gateway(nat_gateway_id)
1063
+ operation_result = @service_client.delete_nat_gateway(nat_gateway_id, base_operation_opts)
1064
+
1065
+ return operation_result if wait_for_states.empty?
1066
+
1067
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
1068
+
1069
+ begin
1070
+ waiter_result = initial_get_result.wait_until(
1071
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
1072
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
1073
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200,
1074
+ succeed_on_not_found: true
1075
+ )
1076
+ result_to_return = waiter_result
1077
+
1078
+ return result_to_return
1079
+ rescue StandardError
1080
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
1081
+ end
1082
+ end
1083
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
1084
+ # rubocop:enable Layout/EmptyLines
1085
+
1086
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
1087
+ # rubocop:disable Layout/EmptyLines
1088
+
1089
+
1011
1090
  # Calls {OCI::Core::VirtualNetworkClient#delete_public_ip} and then waits for the {OCI::Core::Models::PublicIp} acted upon
1012
1091
  # to enter the given state(s).
1013
1092
  #
@@ -1688,6 +1767,46 @@ module OCI
1688
1767
  # rubocop:disable Layout/EmptyLines
1689
1768
 
1690
1769
 
1770
+ # Calls {OCI::Core::VirtualNetworkClient#update_nat_gateway} and then waits for the {OCI::Core::Models::NatGateway} acted upon
1771
+ # to enter the given state(s).
1772
+ #
1773
+ # @param [String] nat_gateway_id The NAT gateway's [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
1774
+ # @param [OCI::Core::Models::UpdateNatGatewayDetails] update_nat_gateway_details Details object for updating a NAT gateway.
1775
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::NatGateway#lifecycle_state}
1776
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::VirtualNetworkClient#update_nat_gateway}
1777
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
1778
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
1779
+ # * max_wait_seconds The maximum time to wait, in seconds
1780
+ #
1781
+ # @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Core::Models::NatGateway}
1782
+ def update_nat_gateway_and_wait_for_state(nat_gateway_id, update_nat_gateway_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
1783
+ operation_result = @service_client.update_nat_gateway(nat_gateway_id, update_nat_gateway_details, base_operation_opts)
1784
+
1785
+ return operation_result if wait_for_states.empty?
1786
+
1787
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
1788
+ wait_for_resource_id = operation_result.data.id
1789
+
1790
+ begin
1791
+ waiter_result = @service_client.get_nat_gateway(wait_for_resource_id).wait_until(
1792
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
1793
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
1794
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
1795
+ )
1796
+ result_to_return = waiter_result
1797
+
1798
+ return result_to_return
1799
+ rescue StandardError
1800
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
1801
+ end
1802
+ end
1803
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
1804
+ # rubocop:enable Layout/EmptyLines
1805
+
1806
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
1807
+ # rubocop:disable Layout/EmptyLines
1808
+
1809
+
1691
1810
  # Calls {OCI::Core::VirtualNetworkClient#update_public_ip} and then waits for the {OCI::Core::Models::PublicIp} acted upon
1692
1811
  # to enter the given state(s).
1693
1812
  #
@@ -92,6 +92,10 @@ module OCI
92
92
  # @return [String]
93
93
  attr_accessor :kms_key_id
94
94
 
95
+ # The entity tag for the live object lifecycle policy on the bucket.
96
+ # @return [String]
97
+ attr_accessor :object_lifecycle_policy_etag
98
+
95
99
  # Attribute mapping from ruby-style variable name to JSON key.
96
100
  def self.attribute_map
97
101
  {
@@ -107,7 +111,8 @@ module OCI
107
111
  'storage_tier': :'storageTier',
108
112
  'freeform_tags': :'freeformTags',
109
113
  'defined_tags': :'definedTags',
110
- 'kms_key_id': :'kmsKeyId'
114
+ 'kms_key_id': :'kmsKeyId',
115
+ 'object_lifecycle_policy_etag': :'objectLifecyclePolicyEtag'
111
116
  # rubocop:enable Style/SymbolLiteral
112
117
  }
113
118
  end
@@ -127,7 +132,8 @@ module OCI
127
132
  'storage_tier': :'String',
128
133
  'freeform_tags': :'Hash<String, String>',
129
134
  'defined_tags': :'Hash<String, Hash<String, Object>>',
130
- 'kms_key_id': :'String'
135
+ 'kms_key_id': :'String',
136
+ 'object_lifecycle_policy_etag': :'String'
131
137
  # rubocop:enable Style/SymbolLiteral
132
138
  }
133
139
  end
@@ -150,6 +156,7 @@ module OCI
150
156
  # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
151
157
  # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
152
158
  # @option attributes [String] :kms_key_id The value to assign to the {#kms_key_id} property
159
+ # @option attributes [String] :object_lifecycle_policy_etag The value to assign to the {#object_lifecycle_policy_etag} property
153
160
  def initialize(attributes = {})
154
161
  return unless attributes.is_a?(Hash)
155
162
 
@@ -211,6 +218,12 @@ module OCI
211
218
  raise 'You cannot provide both :kmsKeyId and :kms_key_id' if attributes.key?(:'kmsKeyId') && attributes.key?(:'kms_key_id')
212
219
 
213
220
  self.kms_key_id = attributes[:'kms_key_id'] if attributes[:'kms_key_id']
221
+
222
+ self.object_lifecycle_policy_etag = attributes[:'objectLifecyclePolicyEtag'] if attributes[:'objectLifecyclePolicyEtag']
223
+
224
+ raise 'You cannot provide both :objectLifecyclePolicyEtag and :object_lifecycle_policy_etag' if attributes.key?(:'objectLifecyclePolicyEtag') && attributes.key?(:'object_lifecycle_policy_etag')
225
+
226
+ self.object_lifecycle_policy_etag = attributes[:'object_lifecycle_policy_etag'] if attributes[:'object_lifecycle_policy_etag']
214
227
  end
215
228
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
216
229
  # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -264,7 +277,8 @@ module OCI
264
277
  storage_tier == other.storage_tier &&
265
278
  freeform_tags == other.freeform_tags &&
266
279
  defined_tags == other.defined_tags &&
267
- kms_key_id == other.kms_key_id
280
+ kms_key_id == other.kms_key_id &&
281
+ object_lifecycle_policy_etag == other.object_lifecycle_policy_etag
268
282
  end
269
283
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
270
284
 
@@ -280,7 +294,7 @@ module OCI
280
294
  # Calculates hash code according to all attributes.
281
295
  # @return [Fixnum] Hash code
282
296
  def hash
283
- [namespace, name, compartment_id, metadata, created_by, time_created, etag, public_access_type, storage_tier, freeform_tags, defined_tags, kms_key_id].hash
297
+ [namespace, name, compartment_id, metadata, created_by, time_created, etag, public_access_type, storage_tier, freeform_tags, defined_tags, kms_key_id, object_lifecycle_policy_etag].hash
284
298
  end
285
299
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
286
300
 
@@ -0,0 +1,269 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective
6
+ module OCI
7
+ # To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,
8
+ # talk to an administrator. If you're an administrator who needs to write policies to give users access, see
9
+ # [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
10
+ #
11
+ class ObjectStorage::Models::CopyObjectDetails # rubocop:disable Metrics/LineLength
12
+ # **[Required]** The name of the object to be copied
13
+ # @return [String]
14
+ attr_accessor :source_object_name
15
+
16
+ # The entity tag to match the target object.
17
+ # @return [String]
18
+ attr_accessor :source_object_if_match_e_tag
19
+
20
+ # **[Required]** The destination region object will be copied to. Please specify name of the region, for example \"us-ashburn-1\".
21
+ # @return [String]
22
+ attr_accessor :destination_region
23
+
24
+ # **[Required]** The destination namespace object will be copied to.
25
+ # @return [String]
26
+ attr_accessor :destination_namespace
27
+
28
+ # **[Required]** The destination bucket object will be copied to.
29
+ # @return [String]
30
+ attr_accessor :destination_bucket
31
+
32
+ # **[Required]** The destination name for the copy object.
33
+ # @return [String]
34
+ attr_accessor :destination_object_name
35
+
36
+ # The entity tag to match the target object.
37
+ # @return [String]
38
+ attr_accessor :destination_object_if_match_e_tag
39
+
40
+ # The entity tag to not match the target object.
41
+ # @return [String]
42
+ attr_accessor :destination_object_if_none_match_e_tag
43
+
44
+ # Arbitrary string keys and values for the user-defined metadata for the object. Keys must be in
45
+ # \"opc-meta-*\" format. Avoid entering confidential information. If user enter value in this field, the value
46
+ # will become the object metadata for destination Object. If no value pass in, the destination object will have
47
+ # the exact object metadata as source object.
48
+ #
49
+ # @return [Hash<String, String>]
50
+ attr_accessor :destination_object_metadata
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ # rubocop:disable Style/SymbolLiteral
56
+ 'source_object_name': :'sourceObjectName',
57
+ 'source_object_if_match_e_tag': :'sourceObjectIfMatchETag',
58
+ 'destination_region': :'destinationRegion',
59
+ 'destination_namespace': :'destinationNamespace',
60
+ 'destination_bucket': :'destinationBucket',
61
+ 'destination_object_name': :'destinationObjectName',
62
+ 'destination_object_if_match_e_tag': :'destinationObjectIfMatchETag',
63
+ 'destination_object_if_none_match_e_tag': :'destinationObjectIfNoneMatchETag',
64
+ 'destination_object_metadata': :'destinationObjectMetadata'
65
+ # rubocop:enable Style/SymbolLiteral
66
+ }
67
+ end
68
+
69
+ # Attribute type mapping.
70
+ def self.swagger_types
71
+ {
72
+ # rubocop:disable Style/SymbolLiteral
73
+ 'source_object_name': :'String',
74
+ 'source_object_if_match_e_tag': :'String',
75
+ 'destination_region': :'String',
76
+ 'destination_namespace': :'String',
77
+ 'destination_bucket': :'String',
78
+ 'destination_object_name': :'String',
79
+ 'destination_object_if_match_e_tag': :'String',
80
+ 'destination_object_if_none_match_e_tag': :'String',
81
+ 'destination_object_metadata': :'Hash<String, String>'
82
+ # rubocop:enable Style/SymbolLiteral
83
+ }
84
+ end
85
+
86
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
87
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
88
+
89
+
90
+ # Initializes the object
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ # @option attributes [String] :source_object_name The value to assign to the {#source_object_name} property
93
+ # @option attributes [String] :source_object_if_match_e_tag The value to assign to the {#source_object_if_match_e_tag} property
94
+ # @option attributes [String] :destination_region The value to assign to the {#destination_region} property
95
+ # @option attributes [String] :destination_namespace The value to assign to the {#destination_namespace} property
96
+ # @option attributes [String] :destination_bucket The value to assign to the {#destination_bucket} property
97
+ # @option attributes [String] :destination_object_name The value to assign to the {#destination_object_name} property
98
+ # @option attributes [String] :destination_object_if_match_e_tag The value to assign to the {#destination_object_if_match_e_tag} property
99
+ # @option attributes [String] :destination_object_if_none_match_e_tag The value to assign to the {#destination_object_if_none_match_e_tag} property
100
+ # @option attributes [Hash<String, String>] :destination_object_metadata The value to assign to the {#destination_object_metadata} property
101
+ def initialize(attributes = {})
102
+ return unless attributes.is_a?(Hash)
103
+
104
+ # convert string to symbol for hash key
105
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
106
+
107
+ self.source_object_name = attributes[:'sourceObjectName'] if attributes[:'sourceObjectName']
108
+
109
+ raise 'You cannot provide both :sourceObjectName and :source_object_name' if attributes.key?(:'sourceObjectName') && attributes.key?(:'source_object_name')
110
+
111
+ self.source_object_name = attributes[:'source_object_name'] if attributes[:'source_object_name']
112
+
113
+ self.source_object_if_match_e_tag = attributes[:'sourceObjectIfMatchETag'] if attributes[:'sourceObjectIfMatchETag']
114
+
115
+ 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')
116
+
117
+ self.source_object_if_match_e_tag = attributes[:'source_object_if_match_e_tag'] if attributes[:'source_object_if_match_e_tag']
118
+
119
+ self.destination_region = attributes[:'destinationRegion'] if attributes[:'destinationRegion']
120
+
121
+ raise 'You cannot provide both :destinationRegion and :destination_region' if attributes.key?(:'destinationRegion') && attributes.key?(:'destination_region')
122
+
123
+ self.destination_region = attributes[:'destination_region'] if attributes[:'destination_region']
124
+
125
+ self.destination_namespace = attributes[:'destinationNamespace'] if attributes[:'destinationNamespace']
126
+
127
+ raise 'You cannot provide both :destinationNamespace and :destination_namespace' if attributes.key?(:'destinationNamespace') && attributes.key?(:'destination_namespace')
128
+
129
+ self.destination_namespace = attributes[:'destination_namespace'] if attributes[:'destination_namespace']
130
+
131
+ self.destination_bucket = attributes[:'destinationBucket'] if attributes[:'destinationBucket']
132
+
133
+ raise 'You cannot provide both :destinationBucket and :destination_bucket' if attributes.key?(:'destinationBucket') && attributes.key?(:'destination_bucket')
134
+
135
+ self.destination_bucket = attributes[:'destination_bucket'] if attributes[:'destination_bucket']
136
+
137
+ self.destination_object_name = attributes[:'destinationObjectName'] if attributes[:'destinationObjectName']
138
+
139
+ raise 'You cannot provide both :destinationObjectName and :destination_object_name' if attributes.key?(:'destinationObjectName') && attributes.key?(:'destination_object_name')
140
+
141
+ self.destination_object_name = attributes[:'destination_object_name'] if attributes[:'destination_object_name']
142
+
143
+ self.destination_object_if_match_e_tag = attributes[:'destinationObjectIfMatchETag'] if attributes[:'destinationObjectIfMatchETag']
144
+
145
+ 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')
146
+
147
+ self.destination_object_if_match_e_tag = attributes[:'destination_object_if_match_e_tag'] if attributes[:'destination_object_if_match_e_tag']
148
+
149
+ self.destination_object_if_none_match_e_tag = attributes[:'destinationObjectIfNoneMatchETag'] if attributes[:'destinationObjectIfNoneMatchETag']
150
+
151
+ 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')
152
+
153
+ 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']
154
+
155
+ self.destination_object_metadata = attributes[:'destinationObjectMetadata'] if attributes[:'destinationObjectMetadata']
156
+
157
+ raise 'You cannot provide both :destinationObjectMetadata and :destination_object_metadata' if attributes.key?(:'destinationObjectMetadata') && attributes.key?(:'destination_object_metadata')
158
+
159
+ self.destination_object_metadata = attributes[:'destination_object_metadata'] if attributes[:'destination_object_metadata']
160
+ end
161
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
162
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
163
+
164
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
165
+
166
+
167
+ # Checks equality by comparing each attribute.
168
+ # @param [Object] other the other object to be compared
169
+ def ==(other)
170
+ return true if equal?(other)
171
+ self.class == other.class &&
172
+ source_object_name == other.source_object_name &&
173
+ source_object_if_match_e_tag == other.source_object_if_match_e_tag &&
174
+ destination_region == other.destination_region &&
175
+ destination_namespace == other.destination_namespace &&
176
+ destination_bucket == other.destination_bucket &&
177
+ destination_object_name == other.destination_object_name &&
178
+ destination_object_if_match_e_tag == other.destination_object_if_match_e_tag &&
179
+ destination_object_if_none_match_e_tag == other.destination_object_if_none_match_e_tag &&
180
+ destination_object_metadata == other.destination_object_metadata
181
+ end
182
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
183
+
184
+ # @see the `==` method
185
+ # @param [Object] other the other object to be compared
186
+ def eql?(other)
187
+ self == other
188
+ end
189
+
190
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
191
+
192
+
193
+ # Calculates hash code according to all attributes.
194
+ # @return [Fixnum] Hash code
195
+ def hash
196
+ [source_object_name, source_object_if_match_e_tag, destination_region, destination_namespace, destination_bucket, destination_object_name, destination_object_if_match_e_tag, destination_object_if_none_match_e_tag, destination_object_metadata].hash
197
+ end
198
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
199
+
200
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
201
+
202
+
203
+ # Builds the object from hash
204
+ # @param [Hash] attributes Model attributes in the form of hash
205
+ # @return [Object] Returns the model itself
206
+ def build_from_hash(attributes)
207
+ return nil unless attributes.is_a?(Hash)
208
+ self.class.swagger_types.each_pair do |key, type|
209
+ if type =~ /^Array<(.*)>/i
210
+ # check to ensure the input is an array given that the the attribute
211
+ # is documented as an array but the input is not
212
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
213
+ public_method("#{key}=").call(
214
+ attributes[self.class.attribute_map[key]]
215
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
216
+ )
217
+ end
218
+ elsif !attributes[self.class.attribute_map[key]].nil?
219
+ public_method("#{key}=").call(
220
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
221
+ )
222
+ end
223
+ # or else data not found in attributes(hash), not an issue as the data can be optional
224
+ end
225
+
226
+ self
227
+ end
228
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
229
+
230
+ # Returns the string representation of the object
231
+ # @return [String] String presentation of the object
232
+ def to_s
233
+ to_hash.to_s
234
+ end
235
+
236
+ # Returns the object in the form of hash
237
+ # @return [Hash] Returns the object in the form of hash
238
+ def to_hash
239
+ hash = {}
240
+ self.class.attribute_map.each_pair do |attr, param|
241
+ value = public_method(attr).call
242
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
243
+ hash[param] = _to_hash(value)
244
+ end
245
+ hash
246
+ end
247
+
248
+ private
249
+
250
+ # Outputs non-array value in the form of hash
251
+ # For object, use to_hash. Otherwise, just return the value
252
+ # @param [Object] value Any valid value
253
+ # @return [Hash] Returns the value in the form of hash
254
+ def _to_hash(value)
255
+ if value.is_a?(Array)
256
+ value.compact.map { |v| _to_hash(v) }
257
+ elsif value.is_a?(Hash)
258
+ {}.tap do |hash|
259
+ value.each { |k, v| hash[k] = _to_hash(v) }
260
+ end
261
+ elsif value.respond_to? :to_hash
262
+ value.to_hash
263
+ else
264
+ value
265
+ end
266
+ end
267
+ end
268
+ end
269
+ # rubocop:enable Lint/UnneededCopDisableDirective