oci 2.5.11 → 2.6.0

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 (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,178 @@
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
+ # CreateTransferApplianceEntitlementDetails model.
8
+ class Dts::Models::CreateTransferApplianceEntitlementDetails
9
+ # @return [String]
10
+ attr_accessor :compartment_id
11
+
12
+ # @return [String]
13
+ attr_accessor :requestor_name
14
+
15
+ # @return [String]
16
+ attr_accessor :requestor_email
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ # rubocop:disable Style/SymbolLiteral
22
+ 'compartment_id': :'compartmentId',
23
+ 'requestor_name': :'requestorName',
24
+ 'requestor_email': :'requestorEmail'
25
+ # rubocop:enable Style/SymbolLiteral
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ # rubocop:disable Style/SymbolLiteral
33
+ 'compartment_id': :'String',
34
+ 'requestor_name': :'String',
35
+ 'requestor_email': :'String'
36
+ # rubocop:enable Style/SymbolLiteral
37
+ }
38
+ end
39
+
40
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
41
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
42
+
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
47
+ # @option attributes [String] :requestor_name The value to assign to the {#requestor_name} property
48
+ # @option attributes [String] :requestor_email The value to assign to the {#requestor_email} property
49
+ def initialize(attributes = {})
50
+ return unless attributes.is_a?(Hash)
51
+
52
+ # convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
54
+
55
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
56
+
57
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
58
+
59
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
60
+
61
+ self.requestor_name = attributes[:'requestorName'] if attributes[:'requestorName']
62
+
63
+ raise 'You cannot provide both :requestorName and :requestor_name' if attributes.key?(:'requestorName') && attributes.key?(:'requestor_name')
64
+
65
+ self.requestor_name = attributes[:'requestor_name'] if attributes[:'requestor_name']
66
+
67
+ self.requestor_email = attributes[:'requestorEmail'] if attributes[:'requestorEmail']
68
+
69
+ raise 'You cannot provide both :requestorEmail and :requestor_email' if attributes.key?(:'requestorEmail') && attributes.key?(:'requestor_email')
70
+
71
+ self.requestor_email = attributes[:'requestor_email'] if attributes[:'requestor_email']
72
+ end
73
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
74
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
75
+
76
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
77
+
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] other the other object to be compared
81
+ def ==(other)
82
+ return true if equal?(other)
83
+
84
+ self.class == other.class &&
85
+ compartment_id == other.compartment_id &&
86
+ requestor_name == other.requestor_name &&
87
+ requestor_email == other.requestor_email
88
+ end
89
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
90
+
91
+ # @see the `==` method
92
+ # @param [Object] other the other object to be compared
93
+ def eql?(other)
94
+ self == other
95
+ end
96
+
97
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
98
+
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Fixnum] Hash code
102
+ def hash
103
+ [compartment_id, requestor_name, requestor_email].hash
104
+ end
105
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
106
+
107
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
108
+
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+
116
+ self.class.swagger_types.each_pair do |key, type|
117
+ if type =~ /^Array<(.*)>/i
118
+ # check to ensure the input is an array given that the the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
121
+ public_method("#{key}=").call(
122
+ attributes[self.class.attribute_map[key]]
123
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
124
+ )
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ public_method("#{key}=").call(
128
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
129
+ )
130
+ end
131
+ # or else data not found in attributes(hash), not an issue as the data can be optional
132
+ end
133
+
134
+ self
135
+ end
136
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
137
+
138
+ # Returns the string representation of the object
139
+ # @return [String] String presentation of the object
140
+ def to_s
141
+ to_hash.to_s
142
+ end
143
+
144
+ # Returns the object in the form of hash
145
+ # @return [Hash] Returns the object in the form of hash
146
+ def to_hash
147
+ hash = {}
148
+ self.class.attribute_map.each_pair do |attr, param|
149
+ value = public_method(attr).call
150
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
151
+
152
+ hash[param] = _to_hash(value)
153
+ end
154
+ hash
155
+ end
156
+
157
+ private
158
+
159
+ # Outputs non-array value in the form of hash
160
+ # For object, use to_hash. Otherwise, just return the value
161
+ # @param [Object] value Any valid value
162
+ # @return [Hash] Returns the value in the form of hash
163
+ def _to_hash(value)
164
+ if value.is_a?(Array)
165
+ value.compact.map { |v| _to_hash(v) }
166
+ elsif value.is_a?(Hash)
167
+ {}.tap do |hash|
168
+ value.each { |k, v| hash[k] = _to_hash(v) }
169
+ end
170
+ elsif value.respond_to? :to_hash
171
+ value.to_hash
172
+ else
173
+ value
174
+ end
175
+ end
176
+ end
177
+ end
178
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,165 @@
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
+ # CreateTransferDeviceDetails model.
8
+ class Dts::Models::CreateTransferDeviceDetails
9
+ # @return [String]
10
+ attr_accessor :serial_number
11
+
12
+ # @return [String]
13
+ attr_accessor :iscsi_iqn
14
+
15
+ # Attribute mapping from ruby-style variable name to JSON key.
16
+ def self.attribute_map
17
+ {
18
+ # rubocop:disable Style/SymbolLiteral
19
+ 'serial_number': :'serialNumber',
20
+ 'iscsi_iqn': :'iscsiIQN'
21
+ # rubocop:enable Style/SymbolLiteral
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.swagger_types
27
+ {
28
+ # rubocop:disable Style/SymbolLiteral
29
+ 'serial_number': :'String',
30
+ 'iscsi_iqn': :'String'
31
+ # rubocop:enable Style/SymbolLiteral
32
+ }
33
+ end
34
+
35
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
36
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
37
+
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ # @option attributes [String] :serial_number The value to assign to the {#serial_number} property
42
+ # @option attributes [String] :iscsi_iqn The value to assign to the {#iscsi_iqn} property
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
+
49
+ self.serial_number = attributes[:'serialNumber'] if attributes[:'serialNumber']
50
+
51
+ raise 'You cannot provide both :serialNumber and :serial_number' if attributes.key?(:'serialNumber') && attributes.key?(:'serial_number')
52
+
53
+ self.serial_number = attributes[:'serial_number'] if attributes[:'serial_number']
54
+
55
+ self.iscsi_iqn = attributes[:'iscsiIQN'] if attributes[:'iscsiIQN']
56
+
57
+ raise 'You cannot provide both :iscsiIQN and :iscsi_iqn' if attributes.key?(:'iscsiIQN') && attributes.key?(:'iscsi_iqn')
58
+
59
+ self.iscsi_iqn = attributes[:'iscsi_iqn'] if attributes[:'iscsi_iqn']
60
+ end
61
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
62
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
63
+
64
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
65
+
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] other the other object to be compared
69
+ def ==(other)
70
+ return true if equal?(other)
71
+
72
+ self.class == other.class &&
73
+ serial_number == other.serial_number &&
74
+ iscsi_iqn == other.iscsi_iqn
75
+ end
76
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
77
+
78
+ # @see the `==` method
79
+ # @param [Object] other the other object to be compared
80
+ def eql?(other)
81
+ self == other
82
+ end
83
+
84
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
85
+
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Fixnum] Hash code
89
+ def hash
90
+ [serial_number, iscsi_iqn].hash
91
+ end
92
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
93
+
94
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
95
+
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def build_from_hash(attributes)
101
+ return nil unless attributes.is_a?(Hash)
102
+
103
+ self.class.swagger_types.each_pair do |key, type|
104
+ if type =~ /^Array<(.*)>/i
105
+ # check to ensure the input is an array given that the the attribute
106
+ # is documented as an array but the input is not
107
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
108
+ public_method("#{key}=").call(
109
+ attributes[self.class.attribute_map[key]]
110
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
111
+ )
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ public_method("#{key}=").call(
115
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
116
+ )
117
+ end
118
+ # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ end
120
+
121
+ self
122
+ end
123
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
124
+
125
+ # Returns the string representation of the object
126
+ # @return [String] String presentation of the object
127
+ def to_s
128
+ to_hash.to_s
129
+ end
130
+
131
+ # Returns the object in the form of hash
132
+ # @return [Hash] Returns the object in the form of hash
133
+ def to_hash
134
+ hash = {}
135
+ self.class.attribute_map.each_pair do |attr, param|
136
+ value = public_method(attr).call
137
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
138
+
139
+ hash[param] = _to_hash(value)
140
+ end
141
+ hash
142
+ end
143
+
144
+ private
145
+
146
+ # Outputs non-array value in the form of hash
147
+ # For object, use to_hash. Otherwise, just return the value
148
+ # @param [Object] value Any valid value
149
+ # @return [Hash] Returns the value in the form of hash
150
+ def _to_hash(value)
151
+ if value.is_a?(Array)
152
+ value.compact.map { |v| _to_hash(v) }
153
+ elsif value.is_a?(Hash)
154
+ {}.tap do |hash|
155
+ value.each { |k, v| hash[k] = _to_hash(v) }
156
+ end
157
+ elsif value.respond_to? :to_hash
158
+ value.to_hash
159
+ else
160
+ value
161
+ end
162
+ end
163
+ end
164
+ end
165
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,238 @@
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
+ # CreateTransferJobDetails model.
8
+ class Dts::Models::CreateTransferJobDetails
9
+ DEVICE_TYPE_ENUM = [
10
+ DEVICE_TYPE_DISK = 'DISK'.freeze,
11
+ DEVICE_TYPE_APPLIANCE = 'APPLIANCE'.freeze
12
+ ].freeze
13
+
14
+ # @return [String]
15
+ attr_accessor :compartment_id
16
+
17
+ # @return [String]
18
+ attr_accessor :upload_bucket_name
19
+
20
+ # @return [String]
21
+ attr_accessor :display_name
22
+
23
+ # @return [String]
24
+ attr_reader :device_type
25
+
26
+ # Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
27
+ # Example: `{\"bar-key\": \"value\"}`
28
+ #
29
+ # @return [Hash<String, String>]
30
+ attr_accessor :freeform_tags
31
+
32
+ # Usage of predefined tag keys. These predefined keys are scoped to namespaces.
33
+ # Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}`
34
+ #
35
+ # @return [Hash<String, Hash<String, Object>>]
36
+ attr_accessor :defined_tags
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ # rubocop:disable Style/SymbolLiteral
42
+ 'compartment_id': :'compartmentId',
43
+ 'upload_bucket_name': :'uploadBucketName',
44
+ 'display_name': :'displayName',
45
+ 'device_type': :'deviceType',
46
+ 'freeform_tags': :'freeformTags',
47
+ 'defined_tags': :'definedTags'
48
+ # rubocop:enable Style/SymbolLiteral
49
+ }
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.swagger_types
54
+ {
55
+ # rubocop:disable Style/SymbolLiteral
56
+ 'compartment_id': :'String',
57
+ 'upload_bucket_name': :'String',
58
+ 'display_name': :'String',
59
+ 'device_type': :'String',
60
+ 'freeform_tags': :'Hash<String, String>',
61
+ 'defined_tags': :'Hash<String, Hash<String, Object>>'
62
+ # rubocop:enable Style/SymbolLiteral
63
+ }
64
+ end
65
+
66
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
67
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
68
+
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
73
+ # @option attributes [String] :upload_bucket_name The value to assign to the {#upload_bucket_name} property
74
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
75
+ # @option attributes [String] :device_type The value to assign to the {#device_type} property
76
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
77
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
78
+ def initialize(attributes = {})
79
+ return unless attributes.is_a?(Hash)
80
+
81
+ # convert string to symbol for hash key
82
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
83
+
84
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
85
+
86
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
87
+
88
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
89
+
90
+ self.upload_bucket_name = attributes[:'uploadBucketName'] if attributes[:'uploadBucketName']
91
+
92
+ raise 'You cannot provide both :uploadBucketName and :upload_bucket_name' if attributes.key?(:'uploadBucketName') && attributes.key?(:'upload_bucket_name')
93
+
94
+ self.upload_bucket_name = attributes[:'upload_bucket_name'] if attributes[:'upload_bucket_name']
95
+
96
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
97
+
98
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
99
+
100
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
101
+
102
+ self.device_type = attributes[:'deviceType'] if attributes[:'deviceType']
103
+ self.device_type = "DISK" if device_type.nil? && !attributes.key?(:'deviceType') # rubocop:disable Style/StringLiterals
104
+
105
+ raise 'You cannot provide both :deviceType and :device_type' if attributes.key?(:'deviceType') && attributes.key?(:'device_type')
106
+
107
+ self.device_type = attributes[:'device_type'] if attributes[:'device_type']
108
+ self.device_type = "DISK" if device_type.nil? && !attributes.key?(:'deviceType') && !attributes.key?(:'device_type') # rubocop:disable Style/StringLiterals
109
+
110
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
111
+
112
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
113
+
114
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
115
+
116
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
117
+
118
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
119
+
120
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
121
+ end
122
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
123
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
124
+
125
+ # Custom attribute writer method checking allowed values (enum).
126
+ # @param [Object] device_type Object to be assigned
127
+ def device_type=(device_type)
128
+ raise "Invalid value for 'device_type': this must be one of the values in DEVICE_TYPE_ENUM." if device_type && !DEVICE_TYPE_ENUM.include?(device_type)
129
+
130
+ @device_type = device_type
131
+ end
132
+
133
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
134
+
135
+
136
+ # Checks equality by comparing each attribute.
137
+ # @param [Object] other the other object to be compared
138
+ def ==(other)
139
+ return true if equal?(other)
140
+
141
+ self.class == other.class &&
142
+ compartment_id == other.compartment_id &&
143
+ upload_bucket_name == other.upload_bucket_name &&
144
+ display_name == other.display_name &&
145
+ device_type == other.device_type &&
146
+ freeform_tags == other.freeform_tags &&
147
+ defined_tags == other.defined_tags
148
+ end
149
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
150
+
151
+ # @see the `==` method
152
+ # @param [Object] other the other object to be compared
153
+ def eql?(other)
154
+ self == other
155
+ end
156
+
157
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
158
+
159
+
160
+ # Calculates hash code according to all attributes.
161
+ # @return [Fixnum] Hash code
162
+ def hash
163
+ [compartment_id, upload_bucket_name, display_name, device_type, freeform_tags, defined_tags].hash
164
+ end
165
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
166
+
167
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
168
+
169
+
170
+ # Builds the object from hash
171
+ # @param [Hash] attributes Model attributes in the form of hash
172
+ # @return [Object] Returns the model itself
173
+ def build_from_hash(attributes)
174
+ return nil unless attributes.is_a?(Hash)
175
+
176
+ self.class.swagger_types.each_pair do |key, type|
177
+ if type =~ /^Array<(.*)>/i
178
+ # check to ensure the input is an array given that the the attribute
179
+ # is documented as an array but the input is not
180
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
181
+ public_method("#{key}=").call(
182
+ attributes[self.class.attribute_map[key]]
183
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
184
+ )
185
+ end
186
+ elsif !attributes[self.class.attribute_map[key]].nil?
187
+ public_method("#{key}=").call(
188
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
189
+ )
190
+ end
191
+ # or else data not found in attributes(hash), not an issue as the data can be optional
192
+ end
193
+
194
+ self
195
+ end
196
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = public_method(attr).call
210
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ private
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+ end
237
+ end
238
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength