oci 2.5.9 → 2.5.10

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 (129) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/oci/autoscaling/auto_scaling_client.rb +73 -0
  4. data/lib/oci/autoscaling/autoscaling.rb +1 -0
  5. data/lib/oci/autoscaling/models/change_auto_scaling_compartment_details.rb +154 -0
  6. data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +0 -1
  7. data/lib/oci/container_engine/models/work_request_error.rb +0 -1
  8. data/lib/oci/core/blockstorage_client.rb +342 -0
  9. data/lib/oci/core/compute_client.rb +77 -5
  10. data/lib/oci/core/compute_client_composite_operations.rb +3 -3
  11. data/lib/oci/core/compute_management_client.rb +211 -0
  12. data/lib/oci/core/core.rb +27 -0
  13. data/lib/oci/core/models/add_network_security_group_security_rules_details.rb +153 -0
  14. data/lib/oci/core/models/add_security_rule_details.rb +388 -0
  15. data/lib/oci/core/models/added_network_security_group_security_rules.rb +153 -0
  16. data/lib/oci/core/models/change_boot_volume_backup_compartment_details.rb +153 -0
  17. data/lib/oci/core/models/change_boot_volume_compartment_details.rb +153 -0
  18. data/lib/oci/core/models/change_image_compartment_details.rb +154 -0
  19. data/lib/oci/core/models/change_instance_configuration_compartment_details.rb +155 -0
  20. data/lib/oci/core/models/change_instance_pool_compartment_details.rb +155 -0
  21. data/lib/oci/core/models/change_nat_gateway_compartment_details.rb +153 -0
  22. data/lib/oci/core/models/change_route_table_compartment_details.rb +155 -0
  23. data/lib/oci/core/models/change_security_list_compartment_details.rb +155 -0
  24. data/lib/oci/core/models/change_service_gateway_compartment_details.rb +155 -0
  25. data/lib/oci/core/models/change_subnet_compartment_details.rb +155 -0
  26. data/lib/oci/core/models/change_vcn_compartment_details.rb +155 -0
  27. data/lib/oci/core/models/change_volume_backup_compartment_details.rb +153 -0
  28. data/lib/oci/core/models/change_volume_compartment_details.rb +153 -0
  29. data/lib/oci/core/models/change_volume_group_backup_compartment_details.rb +153 -0
  30. data/lib/oci/core/models/change_volume_group_compartment_details.rb +153 -0
  31. data/lib/oci/core/models/create_network_security_group_details.rb +223 -0
  32. data/lib/oci/core/models/create_vnic_details.rb +18 -1
  33. data/lib/oci/core/models/image.rb +2 -1
  34. data/lib/oci/core/models/instance_configuration.rb +3 -1
  35. data/lib/oci/core/models/instance_configuration_create_vnic_details.rb +18 -1
  36. data/lib/oci/core/models/instance_configuration_instance_source_via_image_details.rb +15 -1
  37. data/lib/oci/core/models/instance_configuration_summary.rb +3 -3
  38. data/lib/oci/core/models/instance_pool.rb +4 -1
  39. data/lib/oci/core/models/instance_pool_summary.rb +3 -3
  40. data/lib/oci/core/models/network_security_group.rb +324 -0
  41. data/lib/oci/core/models/network_security_group_vnic.rb +188 -0
  42. data/lib/oci/core/models/remove_network_security_group_security_rules_details.rb +154 -0
  43. data/lib/oci/core/models/security_list.rb +5 -0
  44. data/lib/oci/core/models/security_rule.rb +455 -0
  45. data/lib/oci/core/models/update_network_security_group_details.rb +189 -0
  46. data/lib/oci/core/models/update_network_security_group_security_rules_details.rb +153 -0
  47. data/lib/oci/core/models/update_security_rule_details.rb +404 -0
  48. data/lib/oci/core/models/update_vnic_details.rb +20 -1
  49. data/lib/oci/core/models/updated_network_security_group_security_rules.rb +153 -0
  50. data/lib/oci/core/models/vnic.rb +18 -1
  51. data/lib/oci/core/virtual_network_client.rb +1228 -132
  52. data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
  53. data/lib/oci/database/database.rb +19 -0
  54. data/lib/oci/database/database_client.rb +1066 -46
  55. data/lib/oci/database/database_client_composite_operations.rb +317 -0
  56. data/lib/oci/database/models/autonomous_container_database.rb +416 -0
  57. data/lib/oci/database/models/autonomous_container_database_backup_config.rb +157 -0
  58. data/lib/oci/database/models/autonomous_container_database_summary.rb +420 -0
  59. data/lib/oci/database/models/autonomous_database.rb +58 -1
  60. data/lib/oci/database/models/autonomous_database_backup.rb +16 -1
  61. data/lib/oci/database/models/autonomous_database_backup_summary.rb +16 -1
  62. data/lib/oci/database/models/autonomous_database_connection_strings.rb +11 -1
  63. data/lib/oci/database/models/autonomous_database_connection_urls.rb +170 -0
  64. data/lib/oci/database/models/autonomous_database_summary.rb +58 -1
  65. data/lib/oci/database/models/autonomous_db_preview_version_summary.rb +224 -0
  66. data/lib/oci/database/models/autonomous_exadata_infrastructure.rb +419 -0
  67. data/lib/oci/database/models/autonomous_exadata_infrastructure_maintenance_window.rb +186 -0
  68. data/lib/oci/database/models/autonomous_exadata_infrastructure_shape_summary.rb +224 -0
  69. data/lib/oci/database/models/autonomous_exadata_infrastructure_summary.rb +436 -0
  70. data/lib/oci/database/models/backup.rb +1 -0
  71. data/lib/oci/database/models/backup_summary.rb +1 -0
  72. data/lib/oci/database/models/create_autonomous_container_database_details.rb +284 -0
  73. data/lib/oci/database/models/create_autonomous_database_base.rb +46 -1
  74. data/lib/oci/database/models/create_autonomous_database_clone_details.rb +13 -1
  75. data/lib/oci/database/models/create_autonomous_database_details.rb +13 -1
  76. data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +34 -1
  77. data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +1 -1
  78. data/lib/oci/database/models/day_of_week.rb +174 -0
  79. data/lib/oci/database/models/db_system.rb +34 -1
  80. data/lib/oci/database/models/db_system_summary.rb +34 -1
  81. data/lib/oci/database/models/launch_autonomous_exadata_infrastructure_details.rb +304 -0
  82. data/lib/oci/database/models/launch_db_system_base.rb +35 -2
  83. data/lib/oci/database/models/launch_db_system_details.rb +11 -2
  84. data/lib/oci/database/models/launch_db_system_from_backup_details.rb +11 -2
  85. data/lib/oci/database/models/maintenance_run.rb +392 -0
  86. data/lib/oci/database/models/maintenance_run_summary.rb +395 -0
  87. data/lib/oci/database/models/maintenance_window.rb +226 -0
  88. data/lib/oci/database/models/month.rb +179 -0
  89. data/lib/oci/database/models/restore_autonomous_database_details.rb +30 -4
  90. data/lib/oci/database/models/update_autonomous_container_database_details.rb +230 -0
  91. data/lib/oci/database/models/update_autonomous_database_details.rb +18 -1
  92. data/lib/oci/database/models/update_autonomous_exadata_infrastructure_details.rb +203 -0
  93. data/lib/oci/database/models/update_db_system_details.rb +37 -4
  94. data/lib/oci/database/models/update_maintenance_run_details.rb +154 -0
  95. data/lib/oci/email/email.rb +1 -0
  96. data/lib/oci/email/email_client.rb +62 -0
  97. data/lib/oci/email/models/change_sender_compartment_details.rb +157 -0
  98. data/lib/oci/key_management/key_management.rb +1 -0
  99. data/lib/oci/key_management/kms_crypto_client.rb +4 -4
  100. data/lib/oci/key_management/kms_management_client.rb +161 -10
  101. data/lib/oci/key_management/kms_management_client_composite_operations.rb +79 -0
  102. data/lib/oci/key_management/kms_vault_client.rb +16 -11
  103. data/lib/oci/key_management/models/key.rb +17 -1
  104. data/lib/oci/key_management/models/schedule_key_deletion_details.rb +156 -0
  105. data/lib/oci/load_balancer/load_balancer.rb +1 -0
  106. data/lib/oci/load_balancer/load_balancer_client.rb +64 -0
  107. data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +50 -0
  108. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +16 -1
  109. data/lib/oci/load_balancer/models/load_balancer.rb +16 -1
  110. data/lib/oci/load_balancer/models/remove_http_request_header_rule.rb +1 -1
  111. data/lib/oci/load_balancer/models/remove_http_response_header_rule.rb +1 -1
  112. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +9 -5
  113. data/lib/oci/load_balancer/models/update_backend_set_details.rb +2 -0
  114. data/lib/oci/load_balancer/models/update_network_security_groups_details.rb +154 -0
  115. data/lib/oci/monitoring/models/metric.rb +1 -0
  116. data/lib/oci/object_storage/models/work_request_error.rb +1 -0
  117. data/lib/oci/resource_manager/models/change_stack_compartment_details.rb +155 -0
  118. data/lib/oci/resource_manager/models/work_request.rb +293 -0
  119. data/lib/oci/resource_manager/models/work_request_error.rb +170 -0
  120. data/lib/oci/resource_manager/models/work_request_log_entry.rb +159 -0
  121. data/lib/oci/resource_manager/models/work_request_resource.rb +217 -0
  122. data/lib/oci/resource_manager/models/work_request_summary.rb +254 -0
  123. data/lib/oci/resource_manager/resource_manager.rb +6 -0
  124. data/lib/oci/resource_manager/resource_manager_client.rb +338 -0
  125. data/lib/oci/resource_manager/resource_manager_client_composite_operations.rb +50 -0
  126. data/lib/oci/streaming/stream_admin_client.rb +2 -2
  127. data/lib/oci/streaming/stream_client.rb +1 -1
  128. data/lib/oci/version.rb +1 -1
  129. metadata +58 -2
@@ -41,6 +41,19 @@ module OCI
41
41
  # @return [Hash<String, Hash<String, Object>>]
42
42
  attr_accessor :defined_tags
43
43
 
44
+ # The list of Network Security Group [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with this DB system.
45
+ # A maximum of 5 allowed.
46
+ #
47
+ # @return [Array<String>]
48
+ attr_accessor :nsg_ids
49
+
50
+ # The list of Network Security Group [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with the backup network of this DB system.
51
+ # Applicable only to Exadata DB systems.
52
+ # A maximum of 5 allowed.
53
+ #
54
+ # @return [Array<String>]
55
+ attr_accessor :backup_network_nsg_ids
56
+
44
57
  # Attribute mapping from ruby-style variable name to JSON key.
45
58
  def self.attribute_map
46
59
  {
@@ -50,7 +63,9 @@ module OCI
50
63
  'ssh_public_keys': :'sshPublicKeys',
51
64
  'data_storage_size_in_gbs': :'dataStorageSizeInGBs',
52
65
  'freeform_tags': :'freeformTags',
53
- 'defined_tags': :'definedTags'
66
+ 'defined_tags': :'definedTags',
67
+ 'nsg_ids': :'nsgIds',
68
+ 'backup_network_nsg_ids': :'backupNetworkNsgIds'
54
69
  # rubocop:enable Style/SymbolLiteral
55
70
  }
56
71
  end
@@ -64,7 +79,9 @@ module OCI
64
79
  'ssh_public_keys': :'Array<String>',
65
80
  'data_storage_size_in_gbs': :'Integer',
66
81
  'freeform_tags': :'Hash<String, String>',
67
- 'defined_tags': :'Hash<String, Hash<String, Object>>'
82
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
83
+ 'nsg_ids': :'Array<String>',
84
+ 'backup_network_nsg_ids': :'Array<String>'
68
85
  # rubocop:enable Style/SymbolLiteral
69
86
  }
70
87
  end
@@ -81,6 +98,8 @@ module OCI
81
98
  # @option attributes [Integer] :data_storage_size_in_gbs The value to assign to the {#data_storage_size_in_gbs} property
82
99
  # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
83
100
  # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
101
+ # @option attributes [Array<String>] :nsg_ids The value to assign to the {#nsg_ids} property
102
+ # @option attributes [Array<String>] :backup_network_nsg_ids The value to assign to the {#backup_network_nsg_ids} property
84
103
  def initialize(attributes = {})
85
104
  return unless attributes.is_a?(Hash)
86
105
 
@@ -118,6 +137,18 @@ module OCI
118
137
  raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
119
138
 
120
139
  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
140
+
141
+ self.nsg_ids = attributes[:'nsgIds'] if attributes[:'nsgIds']
142
+
143
+ raise 'You cannot provide both :nsgIds and :nsg_ids' if attributes.key?(:'nsgIds') && attributes.key?(:'nsg_ids')
144
+
145
+ self.nsg_ids = attributes[:'nsg_ids'] if attributes[:'nsg_ids']
146
+
147
+ self.backup_network_nsg_ids = attributes[:'backupNetworkNsgIds'] if attributes[:'backupNetworkNsgIds']
148
+
149
+ raise 'You cannot provide both :backupNetworkNsgIds and :backup_network_nsg_ids' if attributes.key?(:'backupNetworkNsgIds') && attributes.key?(:'backup_network_nsg_ids')
150
+
151
+ self.backup_network_nsg_ids = attributes[:'backup_network_nsg_ids'] if attributes[:'backup_network_nsg_ids']
121
152
  end
122
153
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
123
154
  # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -136,7 +167,9 @@ module OCI
136
167
  ssh_public_keys == other.ssh_public_keys &&
137
168
  data_storage_size_in_gbs == other.data_storage_size_in_gbs &&
138
169
  freeform_tags == other.freeform_tags &&
139
- defined_tags == other.defined_tags
170
+ defined_tags == other.defined_tags &&
171
+ nsg_ids == other.nsg_ids &&
172
+ backup_network_nsg_ids == other.backup_network_nsg_ids
140
173
  end
141
174
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
142
175
 
@@ -152,7 +185,7 @@ module OCI
152
185
  # Calculates hash code according to all attributes.
153
186
  # @return [Fixnum] Hash code
154
187
  def hash
155
- [cpu_core_count, version, ssh_public_keys, data_storage_size_in_gbs, freeform_tags, defined_tags].hash
188
+ [cpu_core_count, version, ssh_public_keys, data_storage_size_in_gbs, freeform_tags, defined_tags, nsg_ids, backup_network_nsg_ids].hash
156
189
  end
157
190
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
158
191
 
@@ -0,0 +1,154 @@
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
+ # Describes the modification parameters for the Maintenance Run.
8
+ #
9
+ class Database::Models::UpdateMaintenanceRunDetails
10
+ # If set to false, skips the Maintenance Run.
11
+ # @return [BOOLEAN]
12
+ attr_accessor :is_enabled
13
+
14
+ # Attribute mapping from ruby-style variable name to JSON key.
15
+ def self.attribute_map
16
+ {
17
+ # rubocop:disable Style/SymbolLiteral
18
+ 'is_enabled': :'isEnabled'
19
+ # rubocop:enable Style/SymbolLiteral
20
+ }
21
+ end
22
+
23
+ # Attribute type mapping.
24
+ def self.swagger_types
25
+ {
26
+ # rubocop:disable Style/SymbolLiteral
27
+ 'is_enabled': :'BOOLEAN'
28
+ # rubocop:enable Style/SymbolLiteral
29
+ }
30
+ end
31
+
32
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
33
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
34
+
35
+
36
+ # Initializes the object
37
+ # @param [Hash] attributes Model attributes in the form of hash
38
+ # @option attributes [BOOLEAN] :is_enabled The value to assign to the {#is_enabled} property
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ self.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil?
46
+
47
+ raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled')
48
+
49
+ self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil?
50
+ end
51
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
52
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
53
+
54
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
55
+
56
+
57
+ # Checks equality by comparing each attribute.
58
+ # @param [Object] other the other object to be compared
59
+ def ==(other)
60
+ return true if equal?(other)
61
+
62
+ self.class == other.class &&
63
+ is_enabled == other.is_enabled
64
+ end
65
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
66
+
67
+ # @see the `==` method
68
+ # @param [Object] other the other object to be compared
69
+ def eql?(other)
70
+ self == other
71
+ end
72
+
73
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
74
+
75
+
76
+ # Calculates hash code according to all attributes.
77
+ # @return [Fixnum] Hash code
78
+ def hash
79
+ [is_enabled].hash
80
+ end
81
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
82
+
83
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
84
+
85
+
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def build_from_hash(attributes)
90
+ return nil unless attributes.is_a?(Hash)
91
+
92
+ self.class.swagger_types.each_pair do |key, type|
93
+ if type =~ /^Array<(.*)>/i
94
+ # check to ensure the input is an array given that the the attribute
95
+ # is documented as an array but the input is not
96
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
97
+ public_method("#{key}=").call(
98
+ attributes[self.class.attribute_map[key]]
99
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
100
+ )
101
+ end
102
+ elsif !attributes[self.class.attribute_map[key]].nil?
103
+ public_method("#{key}=").call(
104
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
105
+ )
106
+ end
107
+ # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
113
+
114
+ # Returns the string representation of the object
115
+ # @return [String] String presentation of the object
116
+ def to_s
117
+ to_hash.to_s
118
+ end
119
+
120
+ # Returns the object in the form of hash
121
+ # @return [Hash] Returns the object in the form of hash
122
+ def to_hash
123
+ hash = {}
124
+ self.class.attribute_map.each_pair do |attr, param|
125
+ value = public_method(attr).call
126
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
127
+
128
+ hash[param] = _to_hash(value)
129
+ end
130
+ hash
131
+ end
132
+
133
+ private
134
+
135
+ # Outputs non-array value in the form of hash
136
+ # For object, use to_hash. Otherwise, just return the value
137
+ # @param [Object] value Any valid value
138
+ # @return [Hash] Returns the value in the form of hash
139
+ def _to_hash(value)
140
+ if value.is_a?(Array)
141
+ value.compact.map { |v| _to_hash(v) }
142
+ elsif value.is_a?(Hash)
143
+ {}.tap do |hash|
144
+ value.each { |k, v| hash[k] = _to_hash(v) }
145
+ end
146
+ elsif value.respond_to? :to_hash
147
+ value.to_hash
148
+ else
149
+ value
150
+ end
151
+ end
152
+ end
153
+ end
154
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -10,6 +10,7 @@ module OCI
10
10
  end
11
11
 
12
12
  # Require models
13
+ require 'oci/email/models/change_sender_compartment_details'
13
14
  require 'oci/email/models/create_sender_details'
14
15
  require 'oci/email/models/create_suppression_details'
15
16
  require 'oci/email/models/sender'
@@ -7,6 +7,9 @@ require 'logger'
7
7
  module OCI
8
8
  # API for the Email Delivery service. Use this API to send high-volume, application-generated
9
9
  # emails. For more information, see [Overview of the Email Delivery Service](/iaas/Content/Email/Concepts/overview.htm).
10
+ #
11
+ #
12
+ # **Note:** Write actions (POST, UPDATE, DELETE) may take several minutes to propagate and be reflected by the API. If a subsequent read request fails to reflect your changes, wait a few minutes and try again.
10
13
  class Email::EmailClient
11
14
  # Client used to make HTTP requests.
12
15
  # @return [OCI::ApiClient]
@@ -109,6 +112,65 @@ module OCI
109
112
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
110
113
 
111
114
 
115
+ # Moves a sender into a different compartment. When provided, If-Match is checked against ETag values of the resource.
116
+ # @param [String] sender_id The unique OCID of the sender.
117
+ # @param [OCI::Email::Models::ChangeSenderCompartmentDetails] change_sender_compartment_details Details for moving a sender into a different compartment.
118
+ # @param [Hash] opts the optional parameters
119
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
120
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
121
+ # @option opts [String] :if_match Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match`
122
+ # parameter to the value of the etag from a previous get, create, or update response for that resource. The resource
123
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
124
+ #
125
+ # @option opts [String] :opc_request_id The request ID for tracing from the system
126
+ # @return [Response] A Response object with data of type nil
127
+ def change_sender_compartment(sender_id, change_sender_compartment_details, opts = {})
128
+ logger.debug 'Calling operation EmailClient#change_sender_compartment.' if logger
129
+
130
+ raise "Missing the required parameter 'sender_id' when calling change_sender_compartment." if sender_id.nil?
131
+ raise "Missing the required parameter 'change_sender_compartment_details' when calling change_sender_compartment." if change_sender_compartment_details.nil?
132
+ raise "Parameter value for 'sender_id' must not be blank" if OCI::Internal::Util.blank_string?(sender_id)
133
+
134
+ path = '/senders/{senderId}/actions/changeCompartment'.sub('{senderId}', sender_id.to_s)
135
+ operation_signing_strategy = :standard
136
+
137
+ # rubocop:disable Style/NegatedIf
138
+ # Query Params
139
+ query_params = {}
140
+
141
+ # Header Params
142
+ header_params = {}
143
+ header_params[:accept] = 'application/json'
144
+ header_params[:'content-type'] = 'application/json'
145
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
146
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
147
+ # rubocop:enable Style/NegatedIf
148
+
149
+ post_body = @api_client.object_to_http_body(change_sender_compartment_details)
150
+
151
+ # rubocop:disable Metrics/BlockLength
152
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'EmailClient#change_sender_compartment') do
153
+ @api_client.call_api(
154
+ :POST,
155
+ path,
156
+ endpoint,
157
+ header_params: header_params,
158
+ query_params: query_params,
159
+ operation_signing_strategy: operation_signing_strategy,
160
+ body: post_body
161
+ )
162
+ end
163
+ # rubocop:enable Metrics/BlockLength
164
+ end
165
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
166
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
167
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
168
+
169
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
170
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
171
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
172
+
173
+
112
174
  # Creates a sender for a tenancy in a given compartment.
113
175
  # @param [OCI::Email::Models::CreateSenderDetails] create_sender_details Create a sender.
114
176
  # @param [Hash] opts the optional parameters
@@ -0,0 +1,157 @@
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
+ # The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment
8
+ # into which the resource should be moved.
9
+ #
10
+ class Email::Models::ChangeSenderCompartmentDetails
11
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment
12
+ # into which the sender should be moved.
13
+ #
14
+ # @return [String]
15
+ attr_accessor :compartment_id
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ # rubocop:disable Style/SymbolLiteral
21
+ 'compartment_id': :'compartmentId'
22
+ # rubocop:enable Style/SymbolLiteral
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ # rubocop:disable Style/SymbolLiteral
30
+ 'compartment_id': :'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] :compartment_id The value to assign to the {#compartment_id} property
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
+
48
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
49
+
50
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
51
+
52
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
53
+ end
54
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
55
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
56
+
57
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
58
+
59
+
60
+ # Checks equality by comparing each attribute.
61
+ # @param [Object] other the other object to be compared
62
+ def ==(other)
63
+ return true if equal?(other)
64
+
65
+ self.class == other.class &&
66
+ compartment_id == other.compartment_id
67
+ end
68
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
69
+
70
+ # @see the `==` method
71
+ # @param [Object] other the other object to be compared
72
+ def eql?(other)
73
+ self == other
74
+ end
75
+
76
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
77
+
78
+
79
+ # Calculates hash code according to all attributes.
80
+ # @return [Fixnum] Hash code
81
+ def hash
82
+ [compartment_id].hash
83
+ end
84
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
85
+
86
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
87
+
88
+
89
+ # Builds the object from hash
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ # @return [Object] Returns the model itself
92
+ def build_from_hash(attributes)
93
+ return nil unless attributes.is_a?(Hash)
94
+
95
+ self.class.swagger_types.each_pair do |key, type|
96
+ if type =~ /^Array<(.*)>/i
97
+ # check to ensure the input is an array given that the the attribute
98
+ # is documented as an array but the input is not
99
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
100
+ public_method("#{key}=").call(
101
+ attributes[self.class.attribute_map[key]]
102
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
103
+ )
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ public_method("#{key}=").call(
107
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
108
+ )
109
+ end
110
+ # or else data not found in attributes(hash), not an issue as the data can be optional
111
+ end
112
+
113
+ self
114
+ end
115
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
116
+
117
+ # Returns the string representation of the object
118
+ # @return [String] String presentation of the object
119
+ def to_s
120
+ to_hash.to_s
121
+ end
122
+
123
+ # Returns the object in the form of hash
124
+ # @return [Hash] Returns the object in the form of hash
125
+ def to_hash
126
+ hash = {}
127
+ self.class.attribute_map.each_pair do |attr, param|
128
+ value = public_method(attr).call
129
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
130
+
131
+ hash[param] = _to_hash(value)
132
+ end
133
+ hash
134
+ end
135
+
136
+ private
137
+
138
+ # Outputs non-array value in the form of hash
139
+ # For object, use to_hash. Otherwise, just return the value
140
+ # @param [Object] value Any valid value
141
+ # @return [Hash] Returns the value in the form of hash
142
+ def _to_hash(value)
143
+ if value.is_a?(Array)
144
+ value.compact.map { |v| _to_hash(v) }
145
+ elsif value.is_a?(Hash)
146
+ {}.tap do |hash|
147
+ value.each { |k, v| hash[k] = _to_hash(v) }
148
+ end
149
+ elsif value.respond_to? :to_hash
150
+ value.to_hash
151
+ else
152
+ value
153
+ end
154
+ end
155
+ end
156
+ end
157
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength