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
@@ -0,0 +1,153 @@
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
+ # Contains details indicating which compartment the resource should move to
8
+ class Core::Models::ChangeVolumeGroupCompartmentDetails
9
+ # **[Required]** The OCID of the new compartment
10
+ # @return [String]
11
+ attr_accessor :compartment_id
12
+
13
+ # Attribute mapping from ruby-style variable name to JSON key.
14
+ def self.attribute_map
15
+ {
16
+ # rubocop:disable Style/SymbolLiteral
17
+ 'compartment_id': :'compartmentId'
18
+ # rubocop:enable Style/SymbolLiteral
19
+ }
20
+ end
21
+
22
+ # Attribute type mapping.
23
+ def self.swagger_types
24
+ {
25
+ # rubocop:disable Style/SymbolLiteral
26
+ 'compartment_id': :'String'
27
+ # rubocop:enable Style/SymbolLiteral
28
+ }
29
+ end
30
+
31
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
32
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
33
+
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
38
+ def initialize(attributes = {})
39
+ return unless attributes.is_a?(Hash)
40
+
41
+ # convert string to symbol for hash key
42
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
43
+
44
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
45
+
46
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
47
+
48
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
49
+ end
50
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
51
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
52
+
53
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
54
+
55
+
56
+ # Checks equality by comparing each attribute.
57
+ # @param [Object] other the other object to be compared
58
+ def ==(other)
59
+ return true if equal?(other)
60
+
61
+ self.class == other.class &&
62
+ compartment_id == other.compartment_id
63
+ end
64
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
65
+
66
+ # @see the `==` method
67
+ # @param [Object] other the other object to be compared
68
+ def eql?(other)
69
+ self == other
70
+ end
71
+
72
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
73
+
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [compartment_id].hash
79
+ end
80
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
81
+
82
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
83
+
84
+
85
+ # Builds the object from hash
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ # @return [Object] Returns the model itself
88
+ def build_from_hash(attributes)
89
+ return nil unless attributes.is_a?(Hash)
90
+
91
+ self.class.swagger_types.each_pair do |key, type|
92
+ if type =~ /^Array<(.*)>/i
93
+ # check to ensure the input is an array given that the the attribute
94
+ # is documented as an array but the input is not
95
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
96
+ public_method("#{key}=").call(
97
+ attributes[self.class.attribute_map[key]]
98
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
99
+ )
100
+ end
101
+ elsif !attributes[self.class.attribute_map[key]].nil?
102
+ public_method("#{key}=").call(
103
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
104
+ )
105
+ end
106
+ # or else data not found in attributes(hash), not an issue as the data can be optional
107
+ end
108
+
109
+ self
110
+ end
111
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
112
+
113
+ # Returns the string representation of the object
114
+ # @return [String] String presentation of the object
115
+ def to_s
116
+ to_hash.to_s
117
+ end
118
+
119
+ # Returns the object in the form of hash
120
+ # @return [Hash] Returns the object in the form of hash
121
+ def to_hash
122
+ hash = {}
123
+ self.class.attribute_map.each_pair do |attr, param|
124
+ value = public_method(attr).call
125
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
126
+
127
+ hash[param] = _to_hash(value)
128
+ end
129
+ hash
130
+ end
131
+
132
+ private
133
+
134
+ # Outputs non-array value in the form of hash
135
+ # For object, use to_hash. Otherwise, just return the value
136
+ # @param [Object] value Any valid value
137
+ # @return [Hash] Returns the value in the form of hash
138
+ def _to_hash(value)
139
+ if value.is_a?(Array)
140
+ value.compact.map { |v| _to_hash(v) }
141
+ elsif value.is_a?(Hash)
142
+ {}.tap do |hash|
143
+ value.each { |k, v| hash[k] = _to_hash(v) }
144
+ end
145
+ elsif value.respond_to? :to_hash
146
+ value.to_hash
147
+ else
148
+ value
149
+ end
150
+ end
151
+ end
152
+ end
153
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,223 @@
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
+ # CreateNetworkSecurityGroupDetails model.
8
+ class Core::Models::CreateNetworkSecurityGroupDetails
9
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment to contain the
10
+ # network security group.
11
+ #
12
+ # @return [String]
13
+ attr_accessor :compartment_id
14
+
15
+ # Defined tags for this resource. Each key is predefined and scoped to a
16
+ # namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
17
+ #
18
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
19
+ #
20
+ # @return [Hash<String, Hash<String, Object>>]
21
+ attr_accessor :defined_tags
22
+
23
+ # A user-friendly name for the network security group. Does not have to be unique.
24
+ # Avoid entering confidential information.
25
+ #
26
+ # @return [String]
27
+ attr_accessor :display_name
28
+
29
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
30
+ # predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
31
+ #
32
+ # Example: `{\"Department\": \"Finance\"}`
33
+ #
34
+ # @return [Hash<String, String>]
35
+ attr_accessor :freeform_tags
36
+
37
+ # **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VCN to create the network
38
+ # security group in.
39
+ #
40
+ # @return [String]
41
+ attr_accessor :vcn_id
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ # rubocop:disable Style/SymbolLiteral
47
+ 'compartment_id': :'compartmentId',
48
+ 'defined_tags': :'definedTags',
49
+ 'display_name': :'displayName',
50
+ 'freeform_tags': :'freeformTags',
51
+ 'vcn_id': :'vcnId'
52
+ # rubocop:enable Style/SymbolLiteral
53
+ }
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.swagger_types
58
+ {
59
+ # rubocop:disable Style/SymbolLiteral
60
+ 'compartment_id': :'String',
61
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
62
+ 'display_name': :'String',
63
+ 'freeform_tags': :'Hash<String, String>',
64
+ 'vcn_id': :'String'
65
+ # rubocop:enable Style/SymbolLiteral
66
+ }
67
+ end
68
+
69
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
70
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
71
+
72
+
73
+ # Initializes the object
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
76
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
77
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
78
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
79
+ # @option attributes [String] :vcn_id The value to assign to the {#vcn_id} property
80
+ def initialize(attributes = {})
81
+ return unless attributes.is_a?(Hash)
82
+
83
+ # convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
85
+
86
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
87
+
88
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
89
+
90
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
91
+
92
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
93
+
94
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
95
+
96
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
97
+
98
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
99
+
100
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
101
+
102
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
103
+
104
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
105
+
106
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
107
+
108
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
109
+
110
+ self.vcn_id = attributes[:'vcnId'] if attributes[:'vcnId']
111
+
112
+ raise 'You cannot provide both :vcnId and :vcn_id' if attributes.key?(:'vcnId') && attributes.key?(:'vcn_id')
113
+
114
+ self.vcn_id = attributes[:'vcn_id'] if attributes[:'vcn_id']
115
+ end
116
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
117
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
118
+
119
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
120
+
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] other the other object to be compared
124
+ def ==(other)
125
+ return true if equal?(other)
126
+
127
+ self.class == other.class &&
128
+ compartment_id == other.compartment_id &&
129
+ defined_tags == other.defined_tags &&
130
+ display_name == other.display_name &&
131
+ freeform_tags == other.freeform_tags &&
132
+ vcn_id == other.vcn_id
133
+ end
134
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
135
+
136
+ # @see the `==` method
137
+ # @param [Object] other the other object to be compared
138
+ def eql?(other)
139
+ self == other
140
+ end
141
+
142
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
143
+
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Fixnum] Hash code
147
+ def hash
148
+ [compartment_id, defined_tags, display_name, freeform_tags, vcn_id].hash
149
+ end
150
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
151
+
152
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
153
+
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def build_from_hash(attributes)
159
+ return nil unless attributes.is_a?(Hash)
160
+
161
+ self.class.swagger_types.each_pair do |key, type|
162
+ if type =~ /^Array<(.*)>/i
163
+ # check to ensure the input is an array given that the the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
166
+ public_method("#{key}=").call(
167
+ attributes[self.class.attribute_map[key]]
168
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
169
+ )
170
+ end
171
+ elsif !attributes[self.class.attribute_map[key]].nil?
172
+ public_method("#{key}=").call(
173
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
174
+ )
175
+ end
176
+ # or else data not found in attributes(hash), not an issue as the data can be optional
177
+ end
178
+
179
+ self
180
+ end
181
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = public_method(attr).call
195
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
196
+
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ private
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+ end
222
+ end
223
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -80,6 +80,13 @@ module OCI
80
80
  # @return [String]
81
81
  attr_accessor :hostname_label
82
82
 
83
+ # A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more
84
+ # information about NSGs, see
85
+ # {NetworkSecurityGroup}.
86
+ #
87
+ # @return [Array<String>]
88
+ attr_accessor :nsg_ids
89
+
83
90
  # A private IP address of your choice to assign to the VNIC. Must be an
84
91
  # available IP address within the subnet's CIDR. If you don't specify a
85
92
  # value, Oracle automatically assigns a private IP address from the subnet.
@@ -121,6 +128,7 @@ module OCI
121
128
  'display_name': :'displayName',
122
129
  'freeform_tags': :'freeformTags',
123
130
  'hostname_label': :'hostnameLabel',
131
+ 'nsg_ids': :'nsgIds',
124
132
  'private_ip': :'privateIp',
125
133
  'skip_source_dest_check': :'skipSourceDestCheck',
126
134
  'subnet_id': :'subnetId'
@@ -137,6 +145,7 @@ module OCI
137
145
  'display_name': :'String',
138
146
  'freeform_tags': :'Hash<String, String>',
139
147
  'hostname_label': :'String',
148
+ 'nsg_ids': :'Array<String>',
140
149
  'private_ip': :'String',
141
150
  'skip_source_dest_check': :'BOOLEAN',
142
151
  'subnet_id': :'String'
@@ -155,6 +164,7 @@ module OCI
155
164
  # @option attributes [String] :display_name The value to assign to the {#display_name} property
156
165
  # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
157
166
  # @option attributes [String] :hostname_label The value to assign to the {#hostname_label} property
167
+ # @option attributes [Array<String>] :nsg_ids The value to assign to the {#nsg_ids} property
158
168
  # @option attributes [String] :private_ip The value to assign to the {#private_ip} property
159
169
  # @option attributes [BOOLEAN] :skip_source_dest_check The value to assign to the {#skip_source_dest_check} property
160
170
  # @option attributes [String] :subnet_id The value to assign to the {#subnet_id} property
@@ -194,6 +204,12 @@ module OCI
194
204
 
195
205
  self.hostname_label = attributes[:'hostname_label'] if attributes[:'hostname_label']
196
206
 
207
+ self.nsg_ids = attributes[:'nsgIds'] if attributes[:'nsgIds']
208
+
209
+ raise 'You cannot provide both :nsgIds and :nsg_ids' if attributes.key?(:'nsgIds') && attributes.key?(:'nsg_ids')
210
+
211
+ self.nsg_ids = attributes[:'nsg_ids'] if attributes[:'nsg_ids']
212
+
197
213
  self.private_ip = attributes[:'privateIp'] if attributes[:'privateIp']
198
214
 
199
215
  raise 'You cannot provide both :privateIp and :private_ip' if attributes.key?(:'privateIp') && attributes.key?(:'private_ip')
@@ -229,6 +245,7 @@ module OCI
229
245
  display_name == other.display_name &&
230
246
  freeform_tags == other.freeform_tags &&
231
247
  hostname_label == other.hostname_label &&
248
+ nsg_ids == other.nsg_ids &&
232
249
  private_ip == other.private_ip &&
233
250
  skip_source_dest_check == other.skip_source_dest_check &&
234
251
  subnet_id == other.subnet_id
@@ -247,7 +264,7 @@ module OCI
247
264
  # Calculates hash code according to all attributes.
248
265
  # @return [Fixnum] Hash code
249
266
  def hash
250
- [assign_public_ip, defined_tags, display_name, freeform_tags, hostname_label, private_ip, skip_source_dest_check, subnet_id].hash
267
+ [assign_public_ip, defined_tags, display_name, freeform_tags, hostname_label, nsg_ids, private_ip, skip_source_dest_check, subnet_id].hash
251
268
  end
252
269
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
253
270
 
@@ -112,7 +112,8 @@ module OCI
112
112
  # @return [OCI::Core::Models::InstanceAgentFeatures]
113
113
  attr_accessor :agent_features
114
114
 
115
- # Image size (1 MB = 1048576 bytes)
115
+ # The boot volume size for an instance launched from this image, (1 MB = 1048576 bytes).
116
+ # Note this is not the same as the size of the image when it was exported or the actual size of the image.
116
117
  #
117
118
  # Example: `47694`
118
119
  #