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
@@ -10,10 +10,12 @@ module OCI
10
10
  REGION_AP_SEOUL_1 = 'ap-seoul-1'.freeze,
11
11
  REGION_AP_TOKYO_1 = 'ap-tokyo-1'.freeze,
12
12
  REGION_CA_TORONTO_1 = 'ca-toronto-1'.freeze,
13
- REGION_US_PHOENIX_1 = 'us-phoenix-1'.freeze,
14
- REGION_US_ASHBURN_1 = 'us-ashburn-1'.freeze,
15
13
  REGION_EU_FRANKFURT_1 = 'eu-frankfurt-1'.freeze,
14
+ REGION_EU_ZURICH_1 = 'eu-zurich-1'.freeze,
15
+ REGION_SA_SAOPAULO_1 = 'sa-saopaulo-1'.freeze,
16
16
  REGION_UK_LONDON_1 = 'uk-london-1'.freeze,
17
+ REGION_US_PHOENIX_1 = 'us-phoenix-1'.freeze,
18
+ REGION_US_ASHBURN_1 = 'us-ashburn-1'.freeze,
17
19
  REGION_US_LANGLEY_1 = 'us-langley-1'.freeze,
18
20
  REGION_US_LUKE_1 = 'us-luke-1'.freeze,
19
21
  REGION_US_GOV_ASHBURN_1 = 'us-gov-ashburn-1'.freeze,
@@ -23,13 +25,15 @@ module OCI
23
25
 
24
26
  REGION_SHORT_NAMES_TO_LONG_NAMES = {
25
27
  'bom': REGION_AP_MUMBAI_1,
28
+ 'fra': REGION_EU_FRANKFURT_1,
29
+ 'gru': REGION_SA_SAOPAULO_1,
30
+ 'iad': REGION_US_ASHBURN_1,
26
31
  'icn': REGION_AP_SEOUL_1,
32
+ 'lhr': REGION_UK_LONDON_1,
27
33
  'nrt': REGION_AP_TOKYO_1,
28
- 'yyz': REGION_CA_TORONTO_1,
29
34
  'phx': REGION_US_PHOENIX_1,
30
- 'iad': REGION_US_ASHBURN_1,
31
- 'fra': REGION_EU_FRANKFURT_1,
32
- 'lhr': REGION_UK_LONDON_1
35
+ 'yyz': REGION_CA_TORONTO_1,
36
+ 'zrh': REGION_EU_ZURICH_1
33
37
  }.freeze
34
38
 
35
39
  # --- Start of region realm mapping ---
@@ -38,10 +42,12 @@ module OCI
38
42
  'ap-seoul-1': 'oc1'.freeze,
39
43
  'ap-tokyo-1': 'oc1'.freeze,
40
44
  'ca-toronto-1': 'oc1'.freeze,
41
- 'us-phoenix-1': 'oc1'.freeze,
42
- 'us-ashburn-1': 'oc1'.freeze,
43
45
  'eu-frankfurt-1': 'oc1'.freeze,
46
+ 'eu-zurich-1': 'oc1'.freeze,
47
+ 'sa-saopaulo-1': 'oc1'.freeze,
44
48
  'uk-london-1': 'oc1'.freeze,
49
+ 'us-phoenix-1': 'oc1'.freeze,
50
+ 'us-ashburn-1': 'oc1'.freeze,
45
51
  'us-langley-1': 'oc2'.freeze,
46
52
  'us-luke-1': 'oc2'.freeze,
47
53
  'us-gov-ashburn-1': 'oc3'.freeze,
@@ -0,0 +1,291 @@
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
+ # Represents the current state of the stream archiver.
9
+ #
10
+ class Streaming::Models::Archiver
11
+ LIFECYCLE_STATE_ENUM = [
12
+ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
13
+ LIFECYCLE_STATE_STOPPED = 'STOPPED'.freeze,
14
+ LIFECYCLE_STATE_STARTING = 'STARTING'.freeze,
15
+ LIFECYCLE_STATE_RUNNING = 'RUNNING'.freeze,
16
+ LIFECYCLE_STATE_STOPPING = 'STOPPING'.freeze,
17
+ LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
18
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
19
+ ].freeze
20
+
21
+ START_POSITION_ENUM = [
22
+ START_POSITION_LATEST = 'LATEST'.freeze,
23
+ START_POSITION_TRIM_HORIZON = 'TRIM_HORIZON'.freeze,
24
+ START_POSITION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
25
+ ].freeze
26
+
27
+ # Time when the resource was created.
28
+ # @return [DateTime]
29
+ attr_accessor :time_created
30
+
31
+ # The state of the stream archiver.
32
+ # @return [String]
33
+ attr_reader :lifecycle_state
34
+
35
+ # The name of the bucket.
36
+ # @return [String]
37
+ attr_accessor :bucket_name
38
+
39
+ # The flag to create a new bucket or use existing one.
40
+ # @return [BOOLEAN]
41
+ attr_accessor :use_existing_bucket
42
+
43
+ # The start message.
44
+ # @return [String]
45
+ attr_reader :start_position
46
+
47
+ # The batch rollover size in megabytes.
48
+ # @return [Integer]
49
+ attr_accessor :batch_rollover_size_in_mbs
50
+
51
+ # The rollover time in seconds.
52
+ # @return [Integer]
53
+ attr_accessor :batch_rollover_time_in_seconds
54
+
55
+ # If an operation failed this property contained the last error occurred.
56
+ # @return [OCI::Streaming::Models::ArchiverError]
57
+ attr_accessor :error
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ # rubocop:disable Style/SymbolLiteral
63
+ 'time_created': :'timeCreated',
64
+ 'lifecycle_state': :'lifecycleState',
65
+ 'bucket_name': :'bucketName',
66
+ 'use_existing_bucket': :'useExistingBucket',
67
+ 'start_position': :'startPosition',
68
+ 'batch_rollover_size_in_mbs': :'batchRolloverSizeInMBs',
69
+ 'batch_rollover_time_in_seconds': :'batchRolloverTimeInSeconds',
70
+ 'error': :'error'
71
+ # rubocop:enable Style/SymbolLiteral
72
+ }
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.swagger_types
77
+ {
78
+ # rubocop:disable Style/SymbolLiteral
79
+ 'time_created': :'DateTime',
80
+ 'lifecycle_state': :'String',
81
+ 'bucket_name': :'String',
82
+ 'use_existing_bucket': :'BOOLEAN',
83
+ 'start_position': :'String',
84
+ 'batch_rollover_size_in_mbs': :'Integer',
85
+ 'batch_rollover_time_in_seconds': :'Integer',
86
+ 'error': :'OCI::Streaming::Models::ArchiverError'
87
+ # rubocop:enable Style/SymbolLiteral
88
+ }
89
+ end
90
+
91
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
92
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
93
+
94
+
95
+ # Initializes the object
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
98
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
99
+ # @option attributes [String] :bucket_name The value to assign to the {#bucket_name} property
100
+ # @option attributes [BOOLEAN] :use_existing_bucket The value to assign to the {#use_existing_bucket} property
101
+ # @option attributes [String] :start_position The value to assign to the {#start_position} property
102
+ # @option attributes [Integer] :batch_rollover_size_in_mbs The value to assign to the {#batch_rollover_size_in_mbs} property
103
+ # @option attributes [Integer] :batch_rollover_time_in_seconds The value to assign to the {#batch_rollover_time_in_seconds} property
104
+ # @option attributes [OCI::Streaming::Models::ArchiverError] :error The value to assign to the {#error} property
105
+ def initialize(attributes = {})
106
+ return unless attributes.is_a?(Hash)
107
+
108
+ # convert string to symbol for hash key
109
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
110
+
111
+ self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
112
+
113
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
114
+
115
+ self.time_created = attributes[:'time_created'] if attributes[:'time_created']
116
+
117
+ self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
118
+
119
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
120
+
121
+ self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
122
+
123
+ self.bucket_name = attributes[:'bucketName'] if attributes[:'bucketName']
124
+
125
+ raise 'You cannot provide both :bucketName and :bucket_name' if attributes.key?(:'bucketName') && attributes.key?(:'bucket_name')
126
+
127
+ self.bucket_name = attributes[:'bucket_name'] if attributes[:'bucket_name']
128
+
129
+ self.use_existing_bucket = attributes[:'useExistingBucket'] unless attributes[:'useExistingBucket'].nil?
130
+
131
+ raise 'You cannot provide both :useExistingBucket and :use_existing_bucket' if attributes.key?(:'useExistingBucket') && attributes.key?(:'use_existing_bucket')
132
+
133
+ self.use_existing_bucket = attributes[:'use_existing_bucket'] unless attributes[:'use_existing_bucket'].nil?
134
+
135
+ self.start_position = attributes[:'startPosition'] if attributes[:'startPosition']
136
+
137
+ raise 'You cannot provide both :startPosition and :start_position' if attributes.key?(:'startPosition') && attributes.key?(:'start_position')
138
+
139
+ self.start_position = attributes[:'start_position'] if attributes[:'start_position']
140
+
141
+ self.batch_rollover_size_in_mbs = attributes[:'batchRolloverSizeInMBs'] if attributes[:'batchRolloverSizeInMBs']
142
+
143
+ raise 'You cannot provide both :batchRolloverSizeInMBs and :batch_rollover_size_in_mbs' if attributes.key?(:'batchRolloverSizeInMBs') && attributes.key?(:'batch_rollover_size_in_mbs')
144
+
145
+ self.batch_rollover_size_in_mbs = attributes[:'batch_rollover_size_in_mbs'] if attributes[:'batch_rollover_size_in_mbs']
146
+
147
+ self.batch_rollover_time_in_seconds = attributes[:'batchRolloverTimeInSeconds'] if attributes[:'batchRolloverTimeInSeconds']
148
+
149
+ raise 'You cannot provide both :batchRolloverTimeInSeconds and :batch_rollover_time_in_seconds' if attributes.key?(:'batchRolloverTimeInSeconds') && attributes.key?(:'batch_rollover_time_in_seconds')
150
+
151
+ self.batch_rollover_time_in_seconds = attributes[:'batch_rollover_time_in_seconds'] if attributes[:'batch_rollover_time_in_seconds']
152
+
153
+ self.error = attributes[:'error'] if attributes[:'error']
154
+ end
155
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
156
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
157
+
158
+ # Custom attribute writer method checking allowed values (enum).
159
+ # @param [Object] lifecycle_state Object to be assigned
160
+ def lifecycle_state=(lifecycle_state)
161
+ # rubocop:disable Style/ConditionalAssignment
162
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
163
+ OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
164
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
165
+ else
166
+ @lifecycle_state = lifecycle_state
167
+ end
168
+ # rubocop:enable Style/ConditionalAssignment
169
+ end
170
+
171
+ # Custom attribute writer method checking allowed values (enum).
172
+ # @param [Object] start_position Object to be assigned
173
+ def start_position=(start_position)
174
+ # rubocop:disable Style/ConditionalAssignment
175
+ if start_position && !START_POSITION_ENUM.include?(start_position)
176
+ OCI.logger.debug("Unknown value for 'start_position' [" + start_position + "]. Mapping to 'START_POSITION_UNKNOWN_ENUM_VALUE'") if OCI.logger
177
+ @start_position = START_POSITION_UNKNOWN_ENUM_VALUE
178
+ else
179
+ @start_position = start_position
180
+ end
181
+ # rubocop:enable Style/ConditionalAssignment
182
+ end
183
+
184
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
185
+
186
+
187
+ # Checks equality by comparing each attribute.
188
+ # @param [Object] other the other object to be compared
189
+ def ==(other)
190
+ return true if equal?(other)
191
+
192
+ self.class == other.class &&
193
+ time_created == other.time_created &&
194
+ lifecycle_state == other.lifecycle_state &&
195
+ bucket_name == other.bucket_name &&
196
+ use_existing_bucket == other.use_existing_bucket &&
197
+ start_position == other.start_position &&
198
+ batch_rollover_size_in_mbs == other.batch_rollover_size_in_mbs &&
199
+ batch_rollover_time_in_seconds == other.batch_rollover_time_in_seconds &&
200
+ error == other.error
201
+ end
202
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
203
+
204
+ # @see the `==` method
205
+ # @param [Object] other the other object to be compared
206
+ def eql?(other)
207
+ self == other
208
+ end
209
+
210
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
211
+
212
+
213
+ # Calculates hash code according to all attributes.
214
+ # @return [Fixnum] Hash code
215
+ def hash
216
+ [time_created, lifecycle_state, bucket_name, use_existing_bucket, start_position, batch_rollover_size_in_mbs, batch_rollover_time_in_seconds, error].hash
217
+ end
218
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
219
+
220
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
221
+
222
+
223
+ # Builds the object from hash
224
+ # @param [Hash] attributes Model attributes in the form of hash
225
+ # @return [Object] Returns the model itself
226
+ def build_from_hash(attributes)
227
+ return nil unless attributes.is_a?(Hash)
228
+
229
+ self.class.swagger_types.each_pair do |key, type|
230
+ if type =~ /^Array<(.*)>/i
231
+ # check to ensure the input is an array given that the the attribute
232
+ # is documented as an array but the input is not
233
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
234
+ public_method("#{key}=").call(
235
+ attributes[self.class.attribute_map[key]]
236
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
237
+ )
238
+ end
239
+ elsif !attributes[self.class.attribute_map[key]].nil?
240
+ public_method("#{key}=").call(
241
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
242
+ )
243
+ end
244
+ # or else data not found in attributes(hash), not an issue as the data can be optional
245
+ end
246
+
247
+ self
248
+ end
249
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
250
+
251
+ # Returns the string representation of the object
252
+ # @return [String] String presentation of the object
253
+ def to_s
254
+ to_hash.to_s
255
+ end
256
+
257
+ # Returns the object in the form of hash
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_hash
260
+ hash = {}
261
+ self.class.attribute_map.each_pair do |attr, param|
262
+ value = public_method(attr).call
263
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
264
+
265
+ hash[param] = _to_hash(value)
266
+ end
267
+ hash
268
+ end
269
+
270
+ private
271
+
272
+ # Outputs non-array value in the form of hash
273
+ # For object, use to_hash. Otherwise, just return the value
274
+ # @param [Object] value Any valid value
275
+ # @return [Hash] Returns the value in the form of hash
276
+ def _to_hash(value)
277
+ if value.is_a?(Array)
278
+ value.compact.map { |v| _to_hash(v) }
279
+ elsif value.is_a?(Hash)
280
+ {}.tap do |hash|
281
+ value.each { |k, v| hash[k] = _to_hash(v) }
282
+ end
283
+ elsif value.respond_to? :to_hash
284
+ value.to_hash
285
+ else
286
+ value
287
+ end
288
+ end
289
+ end
290
+ end
291
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,159 @@
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
+ # An error related to a stream archiver.
8
+ class Streaming::Models::ArchiverError
9
+ # A short error code that defines the error, meant for programmatic parsing.
10
+ # @return [String]
11
+ attr_accessor :code
12
+
13
+ # A human-readable error string.
14
+ # @return [String]
15
+ attr_accessor :message
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ # rubocop:disable Style/SymbolLiteral
21
+ 'code': :'code',
22
+ 'message': :'message'
23
+ # rubocop:enable Style/SymbolLiteral
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ # rubocop:disable Style/SymbolLiteral
31
+ 'code': :'String',
32
+ 'message': :'String'
33
+ # rubocop:enable Style/SymbolLiteral
34
+ }
35
+ end
36
+
37
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
38
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
39
+
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ # @option attributes [String] :code The value to assign to the {#code} property
44
+ # @option attributes [String] :message The value to assign to the {#message} property
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
+
51
+ self.code = attributes[:'code'] if attributes[:'code']
52
+
53
+ self.message = attributes[:'message'] if attributes[:'message']
54
+ end
55
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
56
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
57
+
58
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
59
+
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] other the other object to be compared
63
+ def ==(other)
64
+ return true if equal?(other)
65
+
66
+ self.class == other.class &&
67
+ code == other.code &&
68
+ message == other.message
69
+ end
70
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
71
+
72
+ # @see the `==` method
73
+ # @param [Object] other the other object to be compared
74
+ def eql?(other)
75
+ self == other
76
+ end
77
+
78
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
79
+
80
+
81
+ # Calculates hash code according to all attributes.
82
+ # @return [Fixnum] Hash code
83
+ def hash
84
+ [code, message].hash
85
+ end
86
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
87
+
88
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
89
+
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def build_from_hash(attributes)
95
+ return nil unless attributes.is_a?(Hash)
96
+
97
+ self.class.swagger_types.each_pair do |key, type|
98
+ if type =~ /^Array<(.*)>/i
99
+ # check to ensure the input is an array given that the the attribute
100
+ # is documented as an array but the input is not
101
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
102
+ public_method("#{key}=").call(
103
+ attributes[self.class.attribute_map[key]]
104
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
105
+ )
106
+ end
107
+ elsif !attributes[self.class.attribute_map[key]].nil?
108
+ public_method("#{key}=").call(
109
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
110
+ )
111
+ end
112
+ # or else data not found in attributes(hash), not an issue as the data can be optional
113
+ end
114
+
115
+ self
116
+ end
117
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
118
+
119
+ # Returns the string representation of the object
120
+ # @return [String] String presentation of the object
121
+ def to_s
122
+ to_hash.to_s
123
+ end
124
+
125
+ # Returns the object in the form of hash
126
+ # @return [Hash] Returns the object in the form of hash
127
+ def to_hash
128
+ hash = {}
129
+ self.class.attribute_map.each_pair do |attr, param|
130
+ value = public_method(attr).call
131
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
132
+
133
+ hash[param] = _to_hash(value)
134
+ end
135
+ hash
136
+ end
137
+
138
+ private
139
+
140
+ # Outputs non-array value in the form of hash
141
+ # For object, use to_hash. Otherwise, just return the value
142
+ # @param [Object] value Any valid value
143
+ # @return [Hash] Returns the value in the form of hash
144
+ def _to_hash(value)
145
+ if value.is_a?(Array)
146
+ value.compact.map { |v| _to_hash(v) }
147
+ elsif value.is_a?(Hash)
148
+ {}.tap do |hash|
149
+ value.each { |k, v| hash[k] = _to_hash(v) }
150
+ end
151
+ elsif value.respond_to? :to_hash
152
+ value.to_hash
153
+ else
154
+ value
155
+ end
156
+ end
157
+ end
158
+ end
159
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength