Class: OCI::Cims::Models::CreateResourceDetails
- Inherits:
-
Object
- Object
- OCI::Cims::Models::CreateResourceDetails
- Defined in:
- lib/oci/cims/models/create_resource_details.rb
Overview
Details of Ticket Item
Constant Summary collapse
- REGION_ENUM =
[ REGION_DEV = 'DEV'.freeze, REGION_SEA = 'SEA'.freeze, REGION_INTEG_NEXT = 'INTEG_NEXT'.freeze, REGION_INTEG_STABLE = 'INTEG_STABLE'.freeze, REGION_PHX = 'PHX'.freeze, REGION_IAD = 'IAD'.freeze, REGION_FRA = 'FRA'.freeze, REGION_EU_FRANKFURT_1 = 'EU_FRANKFURT_1'.freeze, REGION_LHR = 'LHR'.freeze, REGION_YYZ = 'YYZ'.freeze, REGION_NRT = 'NRT'.freeze, REGION_US_LANGLEY_1 = 'US_LANGLEY_1'.freeze, REGION_US_LUKE_1 = 'US_LUKE_1'.freeze, REGION_ICN = 'ICN'.freeze, REGION_BOM = 'BOM'.freeze, REGION_GRU = 'GRU'.freeze, REGION_US_GOV_ASHBURN_1 = 'US_GOV_ASHBURN_1'.freeze, REGION_US_GOV_PHOENIX_1 = 'US_GOV_PHOENIX_1'.freeze, REGION_US_GOV_CHICAGO_1 = 'US_GOV_CHICAGO_1'.freeze, REGION_SYD = 'SYD'.freeze, REGION_ZRH = 'ZRH'.freeze, REGION_JED = 'JED'.freeze, REGION_AMS = 'AMS'.freeze, REGION_KIX = 'KIX'.freeze, REGION_MEL = 'MEL'.freeze, REGION_YUL = 'YUL'.freeze, REGION_HYD = 'HYD'.freeze, REGION_YNY = 'YNY'.freeze, REGION_TIW = 'TIW'.freeze ].freeze
- AVAILABILITY_DOMAIN_ENUM =
[ AVAILABILITY_DOMAIN_DEV_1 = 'DEV_1'.freeze, AVAILABILITY_DOMAIN_DEV_2 = 'DEV_2'.freeze, AVAILABILITY_DOMAIN_DEV_3 = 'DEV_3'.freeze, AVAILABILITY_DOMAIN_INTEG_NEXT_1 = 'INTEG_NEXT_1'.freeze, AVAILABILITY_DOMAIN_INTEG_STABLE_1 = 'INTEG_STABLE_1'.freeze, AVAILABILITY_DOMAIN_SEA_AD_1 = 'SEA_AD_1'.freeze, AVAILABILITY_DOMAIN_SEA_AD_2 = 'SEA_AD_2'.freeze, AVAILABILITY_DOMAIN_SEA_AD_3 = 'SEA_AD_3'.freeze, AVAILABILITY_DOMAIN_PHX_AD_1 = 'PHX_AD_1'.freeze, AVAILABILITY_DOMAIN_PHX_AD_2 = 'PHX_AD_2'.freeze, AVAILABILITY_DOMAIN_PHX_AD_3 = 'PHX_AD_3'.freeze, AVAILABILITY_DOMAIN_US_ASHBURN_AD_1 = 'US_ASHBURN_AD_1'.freeze, AVAILABILITY_DOMAIN_US_ASHBURN_AD_2 = 'US_ASHBURN_AD_2'.freeze, AVAILABILITY_DOMAIN_US_ASHBURN_AD_3 = 'US_ASHBURN_AD_3'.freeze, AVAILABILITY_DOMAIN_US_ASHBURN_AD_4 = 'US_ASHBURN_AD_4'.freeze, AVAILABILITY_DOMAIN_EU_FRANKFURT_1_AD_1 = 'EU_FRANKFURT_1_AD_1'.freeze, AVAILABILITY_DOMAIN_EU_FRANKFURT_1_AD_2 = 'EU_FRANKFURT_1_AD_2'.freeze, AVAILABILITY_DOMAIN_EU_FRANKFURT_1_AD_3 = 'EU_FRANKFURT_1_AD_3'.freeze, AVAILABILITY_DOMAIN_UK_LONDON_1_AD_1 = 'UK_LONDON_1_AD_1'.freeze, AVAILABILITY_DOMAIN_UK_LONDON_1_AD_2 = 'UK_LONDON_1_AD_2'.freeze, AVAILABILITY_DOMAIN_UK_LONDON_1_AD_3 = 'UK_LONDON_1_AD_3'.freeze, AVAILABILITY_DOMAIN_CA_TORONTO_1_AD_1 = 'CA_TORONTO_1_AD_1'.freeze, AVAILABILITY_DOMAIN_AP_TOKYO_1_AD_1 = 'AP_TOKYO_1_AD_1'.freeze, AVAILABILITY_DOMAIN_AP_SEOUL_1_AD_1 = 'AP_SEOUL_1_AD_1'.freeze, AVAILABILITY_DOMAIN_AP_MUMBAI_1_AD_1 = 'AP_MUMBAI_1_AD_1'.freeze, AVAILABILITY_DOMAIN_SA_SAOPAULO_1_AD_1 = 'SA_SAOPAULO_1_AD_1'.freeze, AVAILABILITY_DOMAIN_US_LUKE_1_AD_1 = 'US_LUKE_1_AD_1'.freeze, AVAILABILITY_DOMAIN_US_LANGLEY_1_AD_1 = 'US_LANGLEY_1_AD_1'.freeze, AVAILABILITY_DOMAIN_ME_JEDDAH_1_AD_1 = 'ME_JEDDAH_1_AD_1'.freeze, AVAILABILITY_DOMAIN_AP_OSAKA_1_AD_1 = 'AP_OSAKA_1_AD_1'.freeze, AVAILABILITY_DOMAIN_AP_SYDNEY_1_AD_1 = 'AP_SYDNEY_1_AD_1'.freeze, AVAILABILITY_DOMAIN_EU_ZURICH_1_AD_1 = 'EU_ZURICH_1_AD_1'.freeze, AVAILABILITY_DOMAIN_EU_AMSTERDAM_1_AD_1 = 'EU_AMSTERDAM_1_AD_1'.freeze, AVAILABILITY_DOMAIN_AP_MELBOURNE_1_AD_1 = 'AP_MELBOURNE_1_AD_1'.freeze, AVAILABILITY_DOMAIN_CA_MONTREAL_1_AD_1 = 'CA_MONTREAL_1_AD_1'.freeze, AVAILABILITY_DOMAIN_AP_HYDERABAD_1_AD_1 = 'AP_HYDERABAD_1_AD_1'.freeze, AVAILABILITY_DOMAIN_AP_CHUNCHEON_1_AD_1 = 'AP_CHUNCHEON_1_AD_1'.freeze, AVAILABILITY_DOMAIN_US_TACOMA_1_AD_1 = 'US_TACOMA_1_AD_1'.freeze, AVAILABILITY_DOMAIN_NO_AD = 'NO_AD'.freeze ].freeze
Instance Attribute Summary collapse
-
#availability_domain ⇒ String
List of OCI ADs.
- #item ⇒ OCI::Cims::Models::CreateItemDetails
-
#region ⇒ String
List of OCI regions.
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 = {}) ⇒ CreateResourceDetails
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 = {}) ⇒ CreateResourceDetails
Initializes the object
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 126 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.item = attributes[:'item'] if attributes[:'item'] self.region = attributes[:'region'] if attributes[:'region'] self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain'] raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain') self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain'] end |
Instance Attribute Details
#availability_domain ⇒ String
List of OCI ADs
93 94 95 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 93 def availability_domain @availability_domain end |
#item ⇒ OCI::Cims::Models::CreateItemDetails
85 86 87 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 85 def item @item end |
#region ⇒ String
List of OCI regions
89 90 91 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 89 def region @region end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
96 97 98 99 100 101 102 103 104 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 96 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'item': :'item', 'region': :'region', 'availability_domain': :'availabilityDomain' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 107 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'item': :'OCI::Cims::Models::CreateItemDetails', 'region': :'String', 'availability_domain': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
166 167 168 169 170 171 172 173 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 166 def ==(other) return true if equal?(other) self.class == other.class && item == other.item && region == other.region && availability_domain == other.availability_domain end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 198 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
178 179 180 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 178 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
187 188 189 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 187 def hash [item, region, availability_domain].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 231 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
225 226 227 |
# File 'lib/oci/cims/models/create_resource_details.rb', line 225 def to_s to_hash.to_s end |