oci 2.5.11 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/lib/oci.rb +1 -0
  4. data/lib/oci/auth/federation_client.rb +2 -1
  5. data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +6 -1
  6. data/lib/oci/auth/url_based_certificate_retriever.rb +6 -2
  7. data/lib/oci/auth/util.rb +18 -0
  8. data/lib/oci/core/compute_client.rb +730 -48
  9. data/lib/oci/core/compute_client_composite_operations.rb +119 -0
  10. data/lib/oci/core/compute_management_client.rb +11 -4
  11. data/lib/oci/core/core.rb +13 -0
  12. data/lib/oci/core/models/add_security_rule_details.rb +4 -2
  13. data/lib/oci/core/models/attach_vnic_details.rb +1 -0
  14. data/lib/oci/core/models/capture_console_history_details.rb +1 -0
  15. data/lib/oci/core/models/change_dedicated_vm_host_compartment_details.rb +155 -0
  16. data/lib/oci/core/models/change_dhcp_options_compartment_details.rb +155 -0
  17. data/lib/oci/core/models/change_internet_gateway_compartment_details.rb +155 -0
  18. data/lib/oci/core/models/change_local_peering_gateway_compartment_details.rb +155 -0
  19. data/lib/oci/core/models/change_network_security_group_compartment_details.rb +155 -0
  20. data/lib/oci/core/models/change_public_ip_compartment_details.rb +155 -0
  21. data/lib/oci/core/models/create_dedicated_vm_host_details.rb +262 -0
  22. data/lib/oci/core/models/create_drg_attachment_details.rb +4 -2
  23. data/lib/oci/core/models/create_image_details.rb +1 -1
  24. data/lib/oci/core/models/create_instance_configuration_base.rb +16 -6
  25. data/lib/oci/core/models/create_instance_configuration_details.rb +1 -1
  26. data/lib/oci/core/models/create_instance_configuration_from_instance_details.rb +3 -2
  27. data/lib/oci/core/models/create_instance_pool_details.rb +3 -1
  28. data/lib/oci/core/models/create_local_peering_gateway_details.rb +1 -1
  29. data/lib/oci/core/models/create_service_gateway_details.rb +1 -1
  30. data/lib/oci/core/models/create_volume_group_backup_details.rb +3 -1
  31. data/lib/oci/core/models/create_volume_group_details.rb +1 -1
  32. data/lib/oci/core/models/cross_connect_mapping.rb +4 -0
  33. data/lib/oci/core/models/dedicated_vm_host.rb +359 -0
  34. data/lib/oci/core/models/dedicated_vm_host_instance_shape_summary.rb +170 -0
  35. data/lib/oci/core/models/dedicated_vm_host_instance_summary.rb +215 -0
  36. data/lib/oci/core/models/dedicated_vm_host_shape_summary.rb +171 -0
  37. data/lib/oci/core/models/dedicated_vm_host_summary.rb +325 -0
  38. data/lib/oci/core/models/drg_attachment.rb +6 -3
  39. data/lib/oci/core/models/egress_security_rule.rb +1 -0
  40. data/lib/oci/core/models/image.rb +2 -0
  41. data/lib/oci/core/models/ingress_security_rule.rb +2 -1
  42. data/lib/oci/core/models/instance.rb +16 -1
  43. data/lib/oci/core/models/instance_configuration.rb +10 -7
  44. data/lib/oci/core/models/ipv6.rb +2 -0
  45. data/lib/oci/core/models/launch_instance_details.rb +16 -1
  46. data/lib/oci/core/models/launch_options.rb +3 -2
  47. data/lib/oci/core/models/local_peering_gateway.rb +4 -3
  48. data/lib/oci/core/models/route_rule.rb +2 -1
  49. data/lib/oci/core/models/security_rule.rb +3 -1
  50. data/lib/oci/core/models/service_gateway.rb +4 -3
  51. data/lib/oci/core/models/subnet.rb +2 -1
  52. data/lib/oci/core/models/update_console_history_details.rb +1 -0
  53. data/lib/oci/core/models/update_dedicated_vm_host_details.rb +194 -0
  54. data/lib/oci/core/models/update_drg_attachment_details.rb +6 -3
  55. data/lib/oci/core/models/update_instance_pool_details.rb +3 -1
  56. data/lib/oci/core/models/update_local_peering_gateway_details.rb +4 -3
  57. data/lib/oci/core/models/update_network_security_group_details.rb +2 -0
  58. data/lib/oci/core/models/update_security_rule_details.rb +4 -2
  59. data/lib/oci/core/models/update_service_gateway_details.rb +4 -3
  60. data/lib/oci/core/models/update_vnic_details.rb +2 -0
  61. data/lib/oci/core/models/update_volume_backup_details.rb +1 -1
  62. data/lib/oci/core/models/update_volume_group_backup_details.rb +2 -1
  63. data/lib/oci/core/models/update_volume_group_details.rb +2 -1
  64. data/lib/oci/core/models/vcn.rb +2 -1
  65. data/lib/oci/core/models/volume_backup_schedule.rb +1 -1
  66. data/lib/oci/core/virtual_network_client.rb +396 -59
  67. data/lib/oci/dts/dts.rb +57 -0
  68. data/lib/oci/dts/models/attach_devices_details.rb +153 -0
  69. data/lib/oci/dts/models/change_transfer_job_compartment_details.rb +154 -0
  70. data/lib/oci/dts/models/create_transfer_appliance_details.rb +152 -0
  71. data/lib/oci/dts/models/create_transfer_appliance_entitlement_details.rb +178 -0
  72. data/lib/oci/dts/models/create_transfer_device_details.rb +165 -0
  73. data/lib/oci/dts/models/create_transfer_job_details.rb +238 -0
  74. data/lib/oci/dts/models/create_transfer_package_details.rb +178 -0
  75. data/lib/oci/dts/models/detach_devices_details.rb +153 -0
  76. data/lib/oci/dts/models/multiple_transfer_appliances.rb +153 -0
  77. data/lib/oci/dts/models/multiple_transfer_devices.rb +153 -0
  78. data/lib/oci/dts/models/multiple_transfer_packages.rb +153 -0
  79. data/lib/oci/dts/models/new_transfer_device.rb +246 -0
  80. data/lib/oci/dts/models/shipping_address.rb +263 -0
  81. data/lib/oci/dts/models/shipping_vendors.rb +149 -0
  82. data/lib/oci/dts/models/transfer_appliance.rb +367 -0
  83. data/lib/oci/dts/models/transfer_appliance_certificate.rb +148 -0
  84. data/lib/oci/dts/models/transfer_appliance_encryption_passphrase.rb +152 -0
  85. data/lib/oci/dts/models/transfer_appliance_entitlement.rb +240 -0
  86. data/lib/oci/dts/models/transfer_appliance_public_key.rb +152 -0
  87. data/lib/oci/dts/models/transfer_appliance_summary.rb +223 -0
  88. data/lib/oci/dts/models/transfer_device.rb +268 -0
  89. data/lib/oci/dts/models/transfer_device_summary.rb +254 -0
  90. data/lib/oci/dts/models/transfer_job.rb +356 -0
  91. data/lib/oci/dts/models/transfer_job_summary.rb +296 -0
  92. data/lib/oci/dts/models/transfer_package.rb +281 -0
  93. data/lib/oci/dts/models/transfer_package_summary.rb +201 -0
  94. data/lib/oci/dts/models/update_transfer_appliance_details.rb +180 -0
  95. data/lib/oci/dts/models/update_transfer_device_details.rb +166 -0
  96. data/lib/oci/dts/models/update_transfer_job_details.rb +237 -0
  97. data/lib/oci/dts/models/update_transfer_package_details.rb +204 -0
  98. data/lib/oci/dts/shipping_vendors_client.rb +165 -0
  99. data/lib/oci/dts/shipping_vendors_client_composite_operations.rb +24 -0
  100. data/lib/oci/dts/transfer_appliance_client.rb +569 -0
  101. data/lib/oci/dts/transfer_appliance_client_composite_operations.rb +104 -0
  102. data/lib/oci/dts/transfer_appliance_entitlement_client.rb +223 -0
  103. data/lib/oci/dts/transfer_appliance_entitlement_client_composite_operations.rb +24 -0
  104. data/lib/oci/dts/transfer_device_client.rb +402 -0
  105. data/lib/oci/dts/transfer_device_client_composite_operations.rb +65 -0
  106. data/lib/oci/dts/transfer_job_client.rb +458 -0
  107. data/lib/oci/dts/transfer_job_client_composite_operations.rb +143 -0
  108. data/lib/oci/dts/transfer_package_client.rb +515 -0
  109. data/lib/oci/dts/transfer_package_client_composite_operations.rb +104 -0
  110. data/lib/oci/dts/util.rb +2 -0
  111. data/lib/oci/file_storage/models/create_file_system_details.rb +19 -4
  112. data/lib/oci/file_storage/models/file_system.rb +19 -4
  113. data/lib/oci/file_storage/models/file_system_summary.rb +19 -4
  114. data/lib/oci/file_storage/models/update_file_system_details.rb +22 -4
  115. data/lib/oci/limits/limits.rb +5 -0
  116. data/lib/oci/limits/limits_client.rb +444 -0
  117. data/lib/oci/limits/limits_client_composite_operations.rb +24 -0
  118. data/lib/oci/limits/models/create_quota_details.rb +1 -1
  119. data/lib/oci/limits/models/limit_definition_summary.rb +241 -0
  120. data/lib/oci/limits/models/limit_value_summary.rb +210 -0
  121. data/lib/oci/limits/models/quota.rb +1 -1
  122. data/lib/oci/limits/models/resource_availability.rb +163 -0
  123. data/lib/oci/limits/models/service_summary.rb +159 -0
  124. data/lib/oci/limits/models/update_quota_details.rb +1 -1
  125. data/lib/oci/limits/quotas_client.rb +12 -11
  126. data/lib/oci/monitoring/models/alarm.rb +20 -1
  127. data/lib/oci/monitoring/models/create_alarm_details.rb +20 -1
  128. data/lib/oci/monitoring/models/list_metrics_details.rb +23 -3
  129. data/lib/oci/monitoring/models/metric.rb +20 -1
  130. data/lib/oci/monitoring/models/metric_data.rb +20 -1
  131. data/lib/oci/monitoring/models/metric_data_details.rb +20 -1
  132. data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +20 -1
  133. data/lib/oci/monitoring/models/update_alarm_details.rb +20 -1
  134. data/lib/oci/regions.rb +14 -8
  135. data/lib/oci/streaming/models/archiver.rb +291 -0
  136. data/lib/oci/streaming/models/archiver_error.rb +159 -0
  137. data/lib/oci/streaming/models/archiver_lifecycle_state.rb +14 -0
  138. data/lib/oci/streaming/models/archiver_start_position.rb +10 -0
  139. data/lib/oci/streaming/models/create_archiver_details.rb +223 -0
  140. data/lib/oci/streaming/models/update_archiver_details.rb +222 -0
  141. data/lib/oci/streaming/stream_admin_client.rb +304 -0
  142. data/lib/oci/streaming/stream_admin_client_composite_operations.rb +162 -0
  143. data/lib/oci/streaming/streaming.rb +6 -0
  144. data/lib/oci/version.rb +1 -1
  145. data/lib/oci/waas/models/access_rule.rb +121 -4
  146. data/lib/oci/waas/models/access_rule_criteria.rb +12 -0
  147. data/lib/oci/waas/models/address_list.rb +289 -0
  148. data/lib/oci/waas/models/address_list_summary.rb +279 -0
  149. data/lib/oci/waas/models/caching_rule.rb +243 -0
  150. data/lib/oci/waas/models/caching_rule_criteria.rb +194 -0
  151. data/lib/oci/waas/models/caching_rule_summary.rb +246 -0
  152. data/lib/oci/waas/models/certificate.rb +22 -9
  153. data/lib/oci/waas/models/certificate_extensions.rb +3 -0
  154. data/lib/oci/waas/models/certificate_issuer_name.rb +225 -0
  155. data/lib/oci/waas/models/certificate_public_key_info.rb +4 -1
  156. data/lib/oci/waas/models/certificate_subject_name.rb +8 -1
  157. data/lib/oci/waas/models/certificate_summary.rb +10 -2
  158. data/lib/oci/waas/models/change_address_list_compartment_details.rb +154 -0
  159. data/lib/oci/waas/models/change_custom_protection_rule_compartment_details.rb +154 -0
  160. data/lib/oci/waas/models/create_address_list_details.rb +213 -0
  161. data/lib/oci/waas/models/create_certificate_details.rb +22 -3
  162. data/lib/oci/waas/models/create_custom_protection_rule_details.rb +251 -0
  163. data/lib/oci/waas/models/create_waas_policy_details.rb +26 -4
  164. data/lib/oci/waas/models/custom_protection_rule.rb +326 -0
  165. data/lib/oci/waas/models/custom_protection_rule_setting.rb +180 -0
  166. data/lib/oci/waas/models/custom_protection_rule_summary.rb +279 -0
  167. data/lib/oci/waas/models/origin_group.rb +149 -0
  168. data/lib/oci/waas/models/origin_group_origins.rb +159 -0
  169. data/lib/oci/waas/models/policy_config.rb +201 -4
  170. data/lib/oci/waas/models/protection_rule_exclusion.rb +2 -2
  171. data/lib/oci/waas/models/purge_cache.rb +149 -0
  172. data/lib/oci/waas/models/update_address_list_details.rb +199 -0
  173. data/lib/oci/waas/models/update_certificate_details.rb +10 -2
  174. data/lib/oci/waas/models/update_custom_protection_rule_details.rb +237 -0
  175. data/lib/oci/waas/models/update_waas_policy_details.rb +26 -4
  176. data/lib/oci/waas/models/waas_policy.rb +25 -3
  177. data/lib/oci/waas/models/waas_policy_custom_protection_rule_summary.rb +207 -0
  178. data/lib/oci/waas/models/waas_policy_summary.rb +10 -2
  179. data/lib/oci/waas/models/waf_config.rb +43 -1
  180. data/lib/oci/waas/models/waf_config_details.rb +43 -1
  181. data/lib/oci/waas/models/waf_log.rb +3 -3
  182. data/lib/oci/waas/models/work_request.rb +4 -1
  183. data/lib/oci/waas/models/work_request_operation_types.rb +4 -1
  184. data/lib/oci/waas/models/work_request_summary.rb +4 -1
  185. data/lib/oci/waas/waas.rb +19 -0
  186. data/lib/oci/waas/waas_client.rb +1147 -61
  187. data/lib/oci/waas/waas_client_composite_operations.rb +386 -0
  188. metadata +90 -2
@@ -0,0 +1,263 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
6
+ module OCI
7
+ # ShippingAddress model.
8
+ class Dts::Models::ShippingAddress
9
+ # @return [String]
10
+ attr_accessor :addressee
11
+
12
+ # @return [String]
13
+ attr_accessor :care_of
14
+
15
+ # @return [String]
16
+ attr_accessor :address1
17
+
18
+ # @return [String]
19
+ attr_accessor :address2
20
+
21
+ # @return [String]
22
+ attr_accessor :address3
23
+
24
+ # @return [String]
25
+ attr_accessor :address4
26
+
27
+ # @return [String]
28
+ attr_accessor :city_or_locality
29
+
30
+ # @return [String]
31
+ attr_accessor :state_or_region
32
+
33
+ # @return [String]
34
+ attr_accessor :zipcode
35
+
36
+ # @return [String]
37
+ attr_accessor :country
38
+
39
+ # @return [String]
40
+ attr_accessor :phone_number
41
+
42
+ # @return [String]
43
+ attr_accessor :email
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ # rubocop:disable Style/SymbolLiteral
49
+ 'addressee': :'addressee',
50
+ 'care_of': :'careOf',
51
+ 'address1': :'address1',
52
+ 'address2': :'address2',
53
+ 'address3': :'address3',
54
+ 'address4': :'address4',
55
+ 'city_or_locality': :'cityOrLocality',
56
+ 'state_or_region': :'stateOrRegion',
57
+ 'zipcode': :'zipcode',
58
+ 'country': :'country',
59
+ 'phone_number': :'phoneNumber',
60
+ 'email': :'email'
61
+ # rubocop:enable Style/SymbolLiteral
62
+ }
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.swagger_types
67
+ {
68
+ # rubocop:disable Style/SymbolLiteral
69
+ 'addressee': :'String',
70
+ 'care_of': :'String',
71
+ 'address1': :'String',
72
+ 'address2': :'String',
73
+ 'address3': :'String',
74
+ 'address4': :'String',
75
+ 'city_or_locality': :'String',
76
+ 'state_or_region': :'String',
77
+ 'zipcode': :'String',
78
+ 'country': :'String',
79
+ 'phone_number': :'String',
80
+ 'email': :'String'
81
+ # rubocop:enable Style/SymbolLiteral
82
+ }
83
+ end
84
+
85
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
86
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
87
+
88
+
89
+ # Initializes the object
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ # @option attributes [String] :addressee The value to assign to the {#addressee} property
92
+ # @option attributes [String] :care_of The value to assign to the {#care_of} property
93
+ # @option attributes [String] :address1 The value to assign to the {#address1} property
94
+ # @option attributes [String] :address2 The value to assign to the {#address2} property
95
+ # @option attributes [String] :address3 The value to assign to the {#address3} property
96
+ # @option attributes [String] :address4 The value to assign to the {#address4} property
97
+ # @option attributes [String] :city_or_locality The value to assign to the {#city_or_locality} property
98
+ # @option attributes [String] :state_or_region The value to assign to the {#state_or_region} property
99
+ # @option attributes [String] :zipcode The value to assign to the {#zipcode} property
100
+ # @option attributes [String] :country The value to assign to the {#country} property
101
+ # @option attributes [String] :phone_number The value to assign to the {#phone_number} property
102
+ # @option attributes [String] :email The value to assign to the {#email} property
103
+ def initialize(attributes = {})
104
+ return unless attributes.is_a?(Hash)
105
+
106
+ # convert string to symbol for hash key
107
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
108
+
109
+ self.addressee = attributes[:'addressee'] if attributes[:'addressee']
110
+
111
+ self.care_of = attributes[:'careOf'] if attributes[:'careOf']
112
+
113
+ raise 'You cannot provide both :careOf and :care_of' if attributes.key?(:'careOf') && attributes.key?(:'care_of')
114
+
115
+ self.care_of = attributes[:'care_of'] if attributes[:'care_of']
116
+
117
+ self.address1 = attributes[:'address1'] if attributes[:'address1']
118
+
119
+ self.address2 = attributes[:'address2'] if attributes[:'address2']
120
+
121
+ self.address3 = attributes[:'address3'] if attributes[:'address3']
122
+
123
+ self.address4 = attributes[:'address4'] if attributes[:'address4']
124
+
125
+ self.city_or_locality = attributes[:'cityOrLocality'] if attributes[:'cityOrLocality']
126
+
127
+ raise 'You cannot provide both :cityOrLocality and :city_or_locality' if attributes.key?(:'cityOrLocality') && attributes.key?(:'city_or_locality')
128
+
129
+ self.city_or_locality = attributes[:'city_or_locality'] if attributes[:'city_or_locality']
130
+
131
+ self.state_or_region = attributes[:'stateOrRegion'] if attributes[:'stateOrRegion']
132
+
133
+ raise 'You cannot provide both :stateOrRegion and :state_or_region' if attributes.key?(:'stateOrRegion') && attributes.key?(:'state_or_region')
134
+
135
+ self.state_or_region = attributes[:'state_or_region'] if attributes[:'state_or_region']
136
+
137
+ self.zipcode = attributes[:'zipcode'] if attributes[:'zipcode']
138
+
139
+ self.country = attributes[:'country'] if attributes[:'country']
140
+
141
+ self.phone_number = attributes[:'phoneNumber'] if attributes[:'phoneNumber']
142
+
143
+ raise 'You cannot provide both :phoneNumber and :phone_number' if attributes.key?(:'phoneNumber') && attributes.key?(:'phone_number')
144
+
145
+ self.phone_number = attributes[:'phone_number'] if attributes[:'phone_number']
146
+
147
+ self.email = attributes[:'email'] if attributes[:'email']
148
+ end
149
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
150
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
151
+
152
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
153
+
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] other the other object to be compared
157
+ def ==(other)
158
+ return true if equal?(other)
159
+
160
+ self.class == other.class &&
161
+ addressee == other.addressee &&
162
+ care_of == other.care_of &&
163
+ address1 == other.address1 &&
164
+ address2 == other.address2 &&
165
+ address3 == other.address3 &&
166
+ address4 == other.address4 &&
167
+ city_or_locality == other.city_or_locality &&
168
+ state_or_region == other.state_or_region &&
169
+ zipcode == other.zipcode &&
170
+ country == other.country &&
171
+ phone_number == other.phone_number &&
172
+ email == other.email
173
+ end
174
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
175
+
176
+ # @see the `==` method
177
+ # @param [Object] other the other object to be compared
178
+ def eql?(other)
179
+ self == other
180
+ end
181
+
182
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
183
+
184
+
185
+ # Calculates hash code according to all attributes.
186
+ # @return [Fixnum] Hash code
187
+ def hash
188
+ [addressee, care_of, address1, address2, address3, address4, city_or_locality, state_or_region, zipcode, country, phone_number, email].hash
189
+ end
190
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
191
+
192
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
193
+
194
+
195
+ # Builds the object from hash
196
+ # @param [Hash] attributes Model attributes in the form of hash
197
+ # @return [Object] Returns the model itself
198
+ def build_from_hash(attributes)
199
+ return nil unless attributes.is_a?(Hash)
200
+
201
+ self.class.swagger_types.each_pair do |key, type|
202
+ if type =~ /^Array<(.*)>/i
203
+ # check to ensure the input is an array given that the the attribute
204
+ # is documented as an array but the input is not
205
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
206
+ public_method("#{key}=").call(
207
+ attributes[self.class.attribute_map[key]]
208
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
209
+ )
210
+ end
211
+ elsif !attributes[self.class.attribute_map[key]].nil?
212
+ public_method("#{key}=").call(
213
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
214
+ )
215
+ end
216
+ # or else data not found in attributes(hash), not an issue as the data can be optional
217
+ end
218
+
219
+ self
220
+ end
221
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
222
+
223
+ # Returns the string representation of the object
224
+ # @return [String] String presentation of the object
225
+ def to_s
226
+ to_hash.to_s
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = public_method(attr).call
235
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
236
+
237
+ hash[param] = _to_hash(value)
238
+ end
239
+ hash
240
+ end
241
+
242
+ private
243
+
244
+ # Outputs non-array value in the form of hash
245
+ # For object, use to_hash. Otherwise, just return the value
246
+ # @param [Object] value Any valid value
247
+ # @return [Hash] Returns the value in the form of hash
248
+ def _to_hash(value)
249
+ if value.is_a?(Array)
250
+ value.compact.map { |v| _to_hash(v) }
251
+ elsif value.is_a?(Hash)
252
+ {}.tap do |hash|
253
+ value.each { |k, v| hash[k] = _to_hash(v) }
254
+ end
255
+ elsif value.respond_to? :to_hash
256
+ value.to_hash
257
+ else
258
+ value
259
+ end
260
+ end
261
+ end
262
+ end
263
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,149 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
6
+ module OCI
7
+ # ShippingVendors model.
8
+ class Dts::Models::ShippingVendors
9
+ # List of available shipping vendors for package delivery
10
+ # @return [Array<String>]
11
+ attr_accessor :vendors
12
+
13
+ # Attribute mapping from ruby-style variable name to JSON key.
14
+ def self.attribute_map
15
+ {
16
+ # rubocop:disable Style/SymbolLiteral
17
+ 'vendors': :'vendors'
18
+ # rubocop:enable Style/SymbolLiteral
19
+ }
20
+ end
21
+
22
+ # Attribute type mapping.
23
+ def self.swagger_types
24
+ {
25
+ # rubocop:disable Style/SymbolLiteral
26
+ 'vendors': :'Array<String>'
27
+ # rubocop:enable Style/SymbolLiteral
28
+ }
29
+ end
30
+
31
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
32
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
33
+
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ # @option attributes [Array<String>] :vendors The value to assign to the {#vendors} property
38
+ def initialize(attributes = {})
39
+ return unless attributes.is_a?(Hash)
40
+
41
+ # convert string to symbol for hash key
42
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
43
+
44
+ self.vendors = attributes[:'vendors'] if attributes[:'vendors']
45
+ end
46
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
47
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
48
+
49
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
50
+
51
+
52
+ # Checks equality by comparing each attribute.
53
+ # @param [Object] other the other object to be compared
54
+ def ==(other)
55
+ return true if equal?(other)
56
+
57
+ self.class == other.class &&
58
+ vendors == other.vendors
59
+ end
60
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
61
+
62
+ # @see the `==` method
63
+ # @param [Object] other the other object to be compared
64
+ def eql?(other)
65
+ self == other
66
+ end
67
+
68
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
69
+
70
+
71
+ # Calculates hash code according to all attributes.
72
+ # @return [Fixnum] Hash code
73
+ def hash
74
+ [vendors].hash
75
+ end
76
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
77
+
78
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
79
+
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+
87
+ self.class.swagger_types.each_pair do |key, type|
88
+ if type =~ /^Array<(.*)>/i
89
+ # check to ensure the input is an array given that the the attribute
90
+ # is documented as an array but the input is not
91
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
92
+ public_method("#{key}=").call(
93
+ attributes[self.class.attribute_map[key]]
94
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
95
+ )
96
+ end
97
+ elsif !attributes[self.class.attribute_map[key]].nil?
98
+ public_method("#{key}=").call(
99
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
100
+ )
101
+ end
102
+ # or else data not found in attributes(hash), not an issue as the data can be optional
103
+ end
104
+
105
+ self
106
+ end
107
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
108
+
109
+ # Returns the string representation of the object
110
+ # @return [String] String presentation of the object
111
+ def to_s
112
+ to_hash.to_s
113
+ end
114
+
115
+ # Returns the object in the form of hash
116
+ # @return [Hash] Returns the object in the form of hash
117
+ def to_hash
118
+ hash = {}
119
+ self.class.attribute_map.each_pair do |attr, param|
120
+ value = public_method(attr).call
121
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
122
+
123
+ hash[param] = _to_hash(value)
124
+ end
125
+ hash
126
+ end
127
+
128
+ private
129
+
130
+ # Outputs non-array value in the form of hash
131
+ # For object, use to_hash. Otherwise, just return the value
132
+ # @param [Object] value Any valid value
133
+ # @return [Hash] Returns the value in the form of hash
134
+ def _to_hash(value)
135
+ if value.is_a?(Array)
136
+ value.compact.map { |v| _to_hash(v) }
137
+ elsif value.is_a?(Hash)
138
+ {}.tap do |hash|
139
+ value.each { |k, v| hash[k] = _to_hash(v) }
140
+ end
141
+ elsif value.respond_to? :to_hash
142
+ value.to_hash
143
+ else
144
+ value
145
+ end
146
+ end
147
+ end
148
+ end
149
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,367 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+ require 'logger'
5
+
6
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
7
+ module OCI
8
+ # TransferAppliance model.
9
+ class Dts::Models::TransferAppliance
10
+ LIFECYCLE_STATE_ENUM = [
11
+ LIFECYCLE_STATE_REQUESTED = 'REQUESTED'.freeze,
12
+ LIFECYCLE_STATE_ORACLE_PREPARING = 'ORACLE_PREPARING'.freeze,
13
+ LIFECYCLE_STATE_SHIPPING = 'SHIPPING'.freeze,
14
+ LIFECYCLE_STATE_DELIVERED = 'DELIVERED'.freeze,
15
+ LIFECYCLE_STATE_PREPARING = 'PREPARING'.freeze,
16
+ LIFECYCLE_STATE_RETURN_SHIPPED = 'RETURN_SHIPPED'.freeze,
17
+ LIFECYCLE_STATE_RETURN_SHIPPED_CANCELLED = 'RETURN_SHIPPED_CANCELLED'.freeze,
18
+ LIFECYCLE_STATE_ORACLE_RECEIVED = 'ORACLE_RECEIVED'.freeze,
19
+ LIFECYCLE_STATE_ORACLE_RECEIVED_CANCELLED = 'ORACLE_RECEIVED_CANCELLED'.freeze,
20
+ LIFECYCLE_STATE_PROCESSING = 'PROCESSING'.freeze,
21
+ LIFECYCLE_STATE_COMPLETE = 'COMPLETE'.freeze,
22
+ LIFECYCLE_STATE_CUSTOMER_NEVER_RECEIVED = 'CUSTOMER_NEVER_RECEIVED'.freeze,
23
+ LIFECYCLE_STATE_ORACLE_NEVER_RECEIVED = 'ORACLE_NEVER_RECEIVED'.freeze,
24
+ LIFECYCLE_STATE_CUSTOMER_LOST = 'CUSTOMER_LOST'.freeze,
25
+ LIFECYCLE_STATE_CANCELLED = 'CANCELLED'.freeze,
26
+ LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
27
+ LIFECYCLE_STATE_REJECTED = 'REJECTED'.freeze,
28
+ LIFECYCLE_STATE_ERROR = 'ERROR'.freeze,
29
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
30
+ ].freeze
31
+
32
+ # **[Required]** Unique alpha-numeric identifier for a transfer appliance auto generated during create.
33
+ # @return [String]
34
+ attr_accessor :label
35
+
36
+ # @return [String]
37
+ attr_reader :lifecycle_state
38
+
39
+ # @return [String]
40
+ attr_accessor :transfer_job_id
41
+
42
+ # @return [String]
43
+ attr_accessor :serial_number
44
+
45
+ # @return [DateTime]
46
+ attr_accessor :creation_time
47
+
48
+ # @return [DateTime]
49
+ attr_accessor :customer_received_time
50
+
51
+ # @return [DateTime]
52
+ attr_accessor :customer_returned_time
53
+
54
+ # @return [DateTime]
55
+ attr_accessor :next_billing_time
56
+
57
+ # @return [String]
58
+ attr_accessor :delivery_security_tie_id
59
+
60
+ # @return [String]
61
+ attr_accessor :return_security_tie_id
62
+
63
+ # @return [String]
64
+ attr_accessor :appliance_delivery_tracking_number
65
+
66
+ # @return [String]
67
+ attr_accessor :appliance_return_delivery_tracking_number
68
+
69
+ # @return [String]
70
+ attr_accessor :appliance_delivery_vendor
71
+
72
+ # @return [OCI::Dts::Models::ShippingAddress]
73
+ attr_accessor :customer_shipping_address
74
+
75
+ # @return [String]
76
+ attr_accessor :upload_status_log_uri
77
+
78
+ # Attribute mapping from ruby-style variable name to JSON key.
79
+ def self.attribute_map
80
+ {
81
+ # rubocop:disable Style/SymbolLiteral
82
+ 'label': :'label',
83
+ 'lifecycle_state': :'lifecycleState',
84
+ 'transfer_job_id': :'transferJobId',
85
+ 'serial_number': :'serialNumber',
86
+ 'creation_time': :'creationTime',
87
+ 'customer_received_time': :'customerReceivedTime',
88
+ 'customer_returned_time': :'customerReturnedTime',
89
+ 'next_billing_time': :'nextBillingTime',
90
+ 'delivery_security_tie_id': :'deliverySecurityTieId',
91
+ 'return_security_tie_id': :'returnSecurityTieId',
92
+ 'appliance_delivery_tracking_number': :'applianceDeliveryTrackingNumber',
93
+ 'appliance_return_delivery_tracking_number': :'applianceReturnDeliveryTrackingNumber',
94
+ 'appliance_delivery_vendor': :'applianceDeliveryVendor',
95
+ 'customer_shipping_address': :'customerShippingAddress',
96
+ 'upload_status_log_uri': :'uploadStatusLogUri'
97
+ # rubocop:enable Style/SymbolLiteral
98
+ }
99
+ end
100
+
101
+ # Attribute type mapping.
102
+ def self.swagger_types
103
+ {
104
+ # rubocop:disable Style/SymbolLiteral
105
+ 'label': :'String',
106
+ 'lifecycle_state': :'String',
107
+ 'transfer_job_id': :'String',
108
+ 'serial_number': :'String',
109
+ 'creation_time': :'DateTime',
110
+ 'customer_received_time': :'DateTime',
111
+ 'customer_returned_time': :'DateTime',
112
+ 'next_billing_time': :'DateTime',
113
+ 'delivery_security_tie_id': :'String',
114
+ 'return_security_tie_id': :'String',
115
+ 'appliance_delivery_tracking_number': :'String',
116
+ 'appliance_return_delivery_tracking_number': :'String',
117
+ 'appliance_delivery_vendor': :'String',
118
+ 'customer_shipping_address': :'OCI::Dts::Models::ShippingAddress',
119
+ 'upload_status_log_uri': :'String'
120
+ # rubocop:enable Style/SymbolLiteral
121
+ }
122
+ end
123
+
124
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
125
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
126
+
127
+
128
+ # Initializes the object
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @option attributes [String] :label The value to assign to the {#label} property
131
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
132
+ # @option attributes [String] :transfer_job_id The value to assign to the {#transfer_job_id} property
133
+ # @option attributes [String] :serial_number The value to assign to the {#serial_number} property
134
+ # @option attributes [DateTime] :creation_time The value to assign to the {#creation_time} property
135
+ # @option attributes [DateTime] :customer_received_time The value to assign to the {#customer_received_time} property
136
+ # @option attributes [DateTime] :customer_returned_time The value to assign to the {#customer_returned_time} property
137
+ # @option attributes [DateTime] :next_billing_time The value to assign to the {#next_billing_time} property
138
+ # @option attributes [String] :delivery_security_tie_id The value to assign to the {#delivery_security_tie_id} property
139
+ # @option attributes [String] :return_security_tie_id The value to assign to the {#return_security_tie_id} property
140
+ # @option attributes [String] :appliance_delivery_tracking_number The value to assign to the {#appliance_delivery_tracking_number} property
141
+ # @option attributes [String] :appliance_return_delivery_tracking_number The value to assign to the {#appliance_return_delivery_tracking_number} property
142
+ # @option attributes [String] :appliance_delivery_vendor The value to assign to the {#appliance_delivery_vendor} property
143
+ # @option attributes [OCI::Dts::Models::ShippingAddress] :customer_shipping_address The value to assign to the {#customer_shipping_address} property
144
+ # @option attributes [String] :upload_status_log_uri The value to assign to the {#upload_status_log_uri} property
145
+ def initialize(attributes = {})
146
+ return unless attributes.is_a?(Hash)
147
+
148
+ # convert string to symbol for hash key
149
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
150
+
151
+ self.label = attributes[:'label'] if attributes[:'label']
152
+
153
+ self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
154
+
155
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
156
+
157
+ self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
158
+
159
+ self.transfer_job_id = attributes[:'transferJobId'] if attributes[:'transferJobId']
160
+
161
+ raise 'You cannot provide both :transferJobId and :transfer_job_id' if attributes.key?(:'transferJobId') && attributes.key?(:'transfer_job_id')
162
+
163
+ self.transfer_job_id = attributes[:'transfer_job_id'] if attributes[:'transfer_job_id']
164
+
165
+ self.serial_number = attributes[:'serialNumber'] if attributes[:'serialNumber']
166
+
167
+ raise 'You cannot provide both :serialNumber and :serial_number' if attributes.key?(:'serialNumber') && attributes.key?(:'serial_number')
168
+
169
+ self.serial_number = attributes[:'serial_number'] if attributes[:'serial_number']
170
+
171
+ self.creation_time = attributes[:'creationTime'] if attributes[:'creationTime']
172
+
173
+ raise 'You cannot provide both :creationTime and :creation_time' if attributes.key?(:'creationTime') && attributes.key?(:'creation_time')
174
+
175
+ self.creation_time = attributes[:'creation_time'] if attributes[:'creation_time']
176
+
177
+ self.customer_received_time = attributes[:'customerReceivedTime'] if attributes[:'customerReceivedTime']
178
+
179
+ raise 'You cannot provide both :customerReceivedTime and :customer_received_time' if attributes.key?(:'customerReceivedTime') && attributes.key?(:'customer_received_time')
180
+
181
+ self.customer_received_time = attributes[:'customer_received_time'] if attributes[:'customer_received_time']
182
+
183
+ self.customer_returned_time = attributes[:'customerReturnedTime'] if attributes[:'customerReturnedTime']
184
+
185
+ raise 'You cannot provide both :customerReturnedTime and :customer_returned_time' if attributes.key?(:'customerReturnedTime') && attributes.key?(:'customer_returned_time')
186
+
187
+ self.customer_returned_time = attributes[:'customer_returned_time'] if attributes[:'customer_returned_time']
188
+
189
+ self.next_billing_time = attributes[:'nextBillingTime'] if attributes[:'nextBillingTime']
190
+
191
+ raise 'You cannot provide both :nextBillingTime and :next_billing_time' if attributes.key?(:'nextBillingTime') && attributes.key?(:'next_billing_time')
192
+
193
+ self.next_billing_time = attributes[:'next_billing_time'] if attributes[:'next_billing_time']
194
+
195
+ self.delivery_security_tie_id = attributes[:'deliverySecurityTieId'] if attributes[:'deliverySecurityTieId']
196
+
197
+ raise 'You cannot provide both :deliverySecurityTieId and :delivery_security_tie_id' if attributes.key?(:'deliverySecurityTieId') && attributes.key?(:'delivery_security_tie_id')
198
+
199
+ self.delivery_security_tie_id = attributes[:'delivery_security_tie_id'] if attributes[:'delivery_security_tie_id']
200
+
201
+ self.return_security_tie_id = attributes[:'returnSecurityTieId'] if attributes[:'returnSecurityTieId']
202
+
203
+ raise 'You cannot provide both :returnSecurityTieId and :return_security_tie_id' if attributes.key?(:'returnSecurityTieId') && attributes.key?(:'return_security_tie_id')
204
+
205
+ self.return_security_tie_id = attributes[:'return_security_tie_id'] if attributes[:'return_security_tie_id']
206
+
207
+ self.appliance_delivery_tracking_number = attributes[:'applianceDeliveryTrackingNumber'] if attributes[:'applianceDeliveryTrackingNumber']
208
+
209
+ raise 'You cannot provide both :applianceDeliveryTrackingNumber and :appliance_delivery_tracking_number' if attributes.key?(:'applianceDeliveryTrackingNumber') && attributes.key?(:'appliance_delivery_tracking_number')
210
+
211
+ self.appliance_delivery_tracking_number = attributes[:'appliance_delivery_tracking_number'] if attributes[:'appliance_delivery_tracking_number']
212
+
213
+ self.appliance_return_delivery_tracking_number = attributes[:'applianceReturnDeliveryTrackingNumber'] if attributes[:'applianceReturnDeliveryTrackingNumber']
214
+
215
+ raise 'You cannot provide both :applianceReturnDeliveryTrackingNumber and :appliance_return_delivery_tracking_number' if attributes.key?(:'applianceReturnDeliveryTrackingNumber') && attributes.key?(:'appliance_return_delivery_tracking_number')
216
+
217
+ self.appliance_return_delivery_tracking_number = attributes[:'appliance_return_delivery_tracking_number'] if attributes[:'appliance_return_delivery_tracking_number']
218
+
219
+ self.appliance_delivery_vendor = attributes[:'applianceDeliveryVendor'] if attributes[:'applianceDeliveryVendor']
220
+
221
+ raise 'You cannot provide both :applianceDeliveryVendor and :appliance_delivery_vendor' if attributes.key?(:'applianceDeliveryVendor') && attributes.key?(:'appliance_delivery_vendor')
222
+
223
+ self.appliance_delivery_vendor = attributes[:'appliance_delivery_vendor'] if attributes[:'appliance_delivery_vendor']
224
+
225
+ self.customer_shipping_address = attributes[:'customerShippingAddress'] if attributes[:'customerShippingAddress']
226
+
227
+ raise 'You cannot provide both :customerShippingAddress and :customer_shipping_address' if attributes.key?(:'customerShippingAddress') && attributes.key?(:'customer_shipping_address')
228
+
229
+ self.customer_shipping_address = attributes[:'customer_shipping_address'] if attributes[:'customer_shipping_address']
230
+
231
+ self.upload_status_log_uri = attributes[:'uploadStatusLogUri'] if attributes[:'uploadStatusLogUri']
232
+
233
+ raise 'You cannot provide both :uploadStatusLogUri and :upload_status_log_uri' if attributes.key?(:'uploadStatusLogUri') && attributes.key?(:'upload_status_log_uri')
234
+
235
+ self.upload_status_log_uri = attributes[:'upload_status_log_uri'] if attributes[:'upload_status_log_uri']
236
+ end
237
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
238
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
239
+
240
+ # Custom attribute writer method checking allowed values (enum).
241
+ # @param [Object] lifecycle_state Object to be assigned
242
+ def lifecycle_state=(lifecycle_state)
243
+ # rubocop:disable Style/ConditionalAssignment
244
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
245
+ OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
246
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
247
+ else
248
+ @lifecycle_state = lifecycle_state
249
+ end
250
+ # rubocop:enable Style/ConditionalAssignment
251
+ end
252
+
253
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
254
+
255
+
256
+ # Checks equality by comparing each attribute.
257
+ # @param [Object] other the other object to be compared
258
+ def ==(other)
259
+ return true if equal?(other)
260
+
261
+ self.class == other.class &&
262
+ label == other.label &&
263
+ lifecycle_state == other.lifecycle_state &&
264
+ transfer_job_id == other.transfer_job_id &&
265
+ serial_number == other.serial_number &&
266
+ creation_time == other.creation_time &&
267
+ customer_received_time == other.customer_received_time &&
268
+ customer_returned_time == other.customer_returned_time &&
269
+ next_billing_time == other.next_billing_time &&
270
+ delivery_security_tie_id == other.delivery_security_tie_id &&
271
+ return_security_tie_id == other.return_security_tie_id &&
272
+ appliance_delivery_tracking_number == other.appliance_delivery_tracking_number &&
273
+ appliance_return_delivery_tracking_number == other.appliance_return_delivery_tracking_number &&
274
+ appliance_delivery_vendor == other.appliance_delivery_vendor &&
275
+ customer_shipping_address == other.customer_shipping_address &&
276
+ upload_status_log_uri == other.upload_status_log_uri
277
+ end
278
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
279
+
280
+ # @see the `==` method
281
+ # @param [Object] other the other object to be compared
282
+ def eql?(other)
283
+ self == other
284
+ end
285
+
286
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
287
+
288
+
289
+ # Calculates hash code according to all attributes.
290
+ # @return [Fixnum] Hash code
291
+ def hash
292
+ [label, lifecycle_state, transfer_job_id, serial_number, creation_time, customer_received_time, customer_returned_time, next_billing_time, delivery_security_tie_id, return_security_tie_id, appliance_delivery_tracking_number, appliance_return_delivery_tracking_number, appliance_delivery_vendor, customer_shipping_address, upload_status_log_uri].hash
293
+ end
294
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
295
+
296
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
297
+
298
+
299
+ # Builds the object from hash
300
+ # @param [Hash] attributes Model attributes in the form of hash
301
+ # @return [Object] Returns the model itself
302
+ def build_from_hash(attributes)
303
+ return nil unless attributes.is_a?(Hash)
304
+
305
+ self.class.swagger_types.each_pair do |key, type|
306
+ if type =~ /^Array<(.*)>/i
307
+ # check to ensure the input is an array given that the the attribute
308
+ # is documented as an array but the input is not
309
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
310
+ public_method("#{key}=").call(
311
+ attributes[self.class.attribute_map[key]]
312
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
313
+ )
314
+ end
315
+ elsif !attributes[self.class.attribute_map[key]].nil?
316
+ public_method("#{key}=").call(
317
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
318
+ )
319
+ end
320
+ # or else data not found in attributes(hash), not an issue as the data can be optional
321
+ end
322
+
323
+ self
324
+ end
325
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
326
+
327
+ # Returns the string representation of the object
328
+ # @return [String] String presentation of the object
329
+ def to_s
330
+ to_hash.to_s
331
+ end
332
+
333
+ # Returns the object in the form of hash
334
+ # @return [Hash] Returns the object in the form of hash
335
+ def to_hash
336
+ hash = {}
337
+ self.class.attribute_map.each_pair do |attr, param|
338
+ value = public_method(attr).call
339
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
340
+
341
+ hash[param] = _to_hash(value)
342
+ end
343
+ hash
344
+ end
345
+
346
+ private
347
+
348
+ # Outputs non-array value in the form of hash
349
+ # For object, use to_hash. Otherwise, just return the value
350
+ # @param [Object] value Any valid value
351
+ # @return [Hash] Returns the value in the form of hash
352
+ def _to_hash(value)
353
+ if value.is_a?(Array)
354
+ value.compact.map { |v| _to_hash(v) }
355
+ elsif value.is_a?(Hash)
356
+ {}.tap do |hash|
357
+ value.each { |k, v| hash[k] = _to_hash(v) }
358
+ end
359
+ elsif value.respond_to? :to_hash
360
+ value.to_hash
361
+ else
362
+ value
363
+ end
364
+ end
365
+ end
366
+ end
367
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength