Class: OCI::ResourceAnalytics::Models::ResourceAnalyticsInstanceOacAttachmentDetails
- Inherits:
-
Object
- Object
- OCI::ResourceAnalytics::Models::ResourceAnalyticsInstanceOacAttachmentDetails
- Defined in:
- lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb
Overview
Additional details needed when attaching the OAC instance.
Example: {\"idcsDomainId\":\"ocid...\",\"networkDetails\":{...}, ...}
Constant Summary collapse
- LICENSE_MODEL_ENUM =
[ LICENSE_MODEL_LICENSE_INCLUDED = 'LICENSE_INCLUDED'.freeze, LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE'.freeze ].freeze
- CAPACITY_TYPE_ENUM =
[ CAPACITY_TYPE_OLPU_COUNT = 'OLPU_COUNT'.freeze, CAPACITY_TYPE_USER_COUNT = 'USER_COUNT'.freeze ].freeze
Instance Attribute Summary collapse
-
#capacity_type ⇒ String
The capacity model to use for the Analytics Instance.
-
#capacity_value ⇒ Integer
The capacity value selected, either the number of OCPUs (OLPU_COUNT) or the number of users (USER_COUNT).
-
#idcs_domain_id ⇒ String
[Required] IDCS domain OCID identifying a stripe and service administrator user.
-
#license_model ⇒ String
The Oracle license model that applies to the OAC instance.
- #network_details ⇒ OCI::ResourceAnalytics::Models::ResourceAnalyticsInstanceOacNetworkDetails
-
#nsg_ids ⇒ Array<String>
Deprecated.
-
#subnet_id ⇒ String
Deprecated.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ResourceAnalyticsInstanceOacAttachmentDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ResourceAnalyticsInstanceOacAttachmentDetails
Initializes the object
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 94 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.idcs_domain_id = attributes[:'idcsDomainId'] if attributes[:'idcsDomainId'] raise 'You cannot provide both :idcsDomainId and :idcs_domain_id' if attributes.key?(:'idcsDomainId') && attributes.key?(:'idcs_domain_id') self.idcs_domain_id = attributes[:'idcs_domain_id'] if attributes[:'idcs_domain_id'] self.network_details = attributes[:'networkDetails'] if attributes[:'networkDetails'] raise 'You cannot provide both :networkDetails and :network_details' if attributes.key?(:'networkDetails') && attributes.key?(:'network_details') self.network_details = attributes[:'network_details'] if attributes[:'network_details'] self.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId'] raise 'You cannot provide both :subnetId and :subnet_id' if attributes.key?(:'subnetId') && attributes.key?(:'subnet_id') self.subnet_id = attributes[:'subnet_id'] if attributes[:'subnet_id'] self.nsg_ids = attributes[:'nsgIds'] if attributes[:'nsgIds'] raise 'You cannot provide both :nsgIds and :nsg_ids' if attributes.key?(:'nsgIds') && attributes.key?(:'nsg_ids') self.nsg_ids = attributes[:'nsg_ids'] if attributes[:'nsg_ids'] self.license_model = attributes[:'licenseModel'] if attributes[:'licenseModel'] self.license_model = "LICENSE_INCLUDED" if license_model.nil? && !attributes.key?(:'licenseModel') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :licenseModel and :license_model' if attributes.key?(:'licenseModel') && attributes.key?(:'license_model') self.license_model = attributes[:'license_model'] if attributes[:'license_model'] self.license_model = "LICENSE_INCLUDED" if license_model.nil? && !attributes.key?(:'licenseModel') && !attributes.key?(:'license_model') # rubocop:disable Style/StringLiterals self.capacity_type = attributes[:'capacityType'] if attributes[:'capacityType'] self.capacity_type = "OLPU_COUNT" if capacity_type.nil? && !attributes.key?(:'capacityType') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :capacityType and :capacity_type' if attributes.key?(:'capacityType') && attributes.key?(:'capacity_type') self.capacity_type = attributes[:'capacity_type'] if attributes[:'capacity_type'] self.capacity_type = "OLPU_COUNT" if capacity_type.nil? && !attributes.key?(:'capacityType') && !attributes.key?(:'capacity_type') # rubocop:disable Style/StringLiterals self.capacity_value = attributes[:'capacityValue'] if attributes[:'capacityValue'] raise 'You cannot provide both :capacityValue and :capacity_value' if attributes.key?(:'capacityValue') && attributes.key?(:'capacity_value') self.capacity_value = attributes[:'capacity_value'] if attributes[:'capacity_value'] end |
Instance Attribute Details
#capacity_type ⇒ String
The capacity model to use for the Analytics Instance.
45 46 47 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 45 def capacity_type @capacity_type end |
#capacity_value ⇒ Integer
The capacity value selected, either the number of OCPUs (OLPU_COUNT) or the number of users (USER_COUNT). This parameter affects the number of OCPUs, amount of memory, and other resources allocated to the Analytics Instance.
49 50 51 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 49 def capacity_value @capacity_value end |
#idcs_domain_id ⇒ String
[Required] IDCS domain OCID identifying a stripe and service administrator user.
26 27 28 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 26 def idcs_domain_id @idcs_domain_id end |
#license_model ⇒ String
The Oracle license model that applies to the OAC instance.
41 42 43 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 41 def license_model @license_model end |
#network_details ⇒ OCI::ResourceAnalytics::Models::ResourceAnalyticsInstanceOacNetworkDetails
29 30 31 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 29 def network_details @network_details end |
#nsg_ids ⇒ Array<String>
Deprecated. Use networkDetails.nsgIds instead.
37 38 39 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 37 def nsg_ids @nsg_ids end |
#subnet_id ⇒ String
Deprecated. Use networkDetails.subnetId instead.
33 34 35 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 33 def subnet_id @subnet_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 52 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'idcs_domain_id': :'idcsDomainId', 'network_details': :'networkDetails', 'subnet_id': :'subnetId', 'nsg_ids': :'nsgIds', 'license_model': :'licenseModel', 'capacity_type': :'capacityType', 'capacity_value': :'capacityValue' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 67 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'idcs_domain_id': :'String', 'network_details': :'OCI::ResourceAnalytics::Models::ResourceAnalyticsInstanceOacNetworkDetails', 'subnet_id': :'String', 'nsg_ids': :'Array<String>', 'license_model': :'String', 'capacity_type': :'String', 'capacity_value': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 170 def ==(other) return true if equal?(other) self.class == other.class && idcs_domain_id == other.idcs_domain_id && network_details == other.network_details && subnet_id == other.subnet_id && nsg_ids == other.nsg_ids && license_model == other.license_model && capacity_type == other.capacity_type && capacity_value == other.capacity_value end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 206 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
186 187 188 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 186 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
195 196 197 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 195 def hash [idcs_domain_id, network_details, subnet_id, nsg_ids, license_model, capacity_type, capacity_value].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
239 240 241 242 243 244 245 246 247 248 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 239 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
233 234 235 |
# File 'lib/oci/resource_analytics/models/resource_analytics_instance_oac_attachment_details.rb', line 233 def to_s to_hash.to_s end |