Class: OCI::Core::Models::AppCatalogListingResourceVersion
- Inherits:
-
Object
- Object
- OCI::Core::Models::AppCatalogListingResourceVersion
- Defined in:
- lib/oci/core/models/app_catalog_listing_resource_version.rb
Overview
Listing Resource Version
Constant Summary collapse
- ALLOWED_ACTIONS_ENUM =
rubocop:disable Metrics/LineLength
[ ALLOWED_ACTIONS_SNAPSHOT = 'SNAPSHOT'.freeze, ALLOWED_ACTIONS_BOOT_VOLUME_DETACH = 'BOOT_VOLUME_DETACH'.freeze, ALLOWED_ACTIONS_PRESERVE_BOOT_VOLUME = 'PRESERVE_BOOT_VOLUME'.freeze, ALLOWED_ACTIONS_SERIAL_CONSOLE_ACCESS = 'SERIAL_CONSOLE_ACCESS'.freeze, ALLOWED_ACTIONS_BOOT_RECOVERY = 'BOOT_RECOVERY'.freeze, ALLOWED_ACTIONS_BACKUP_BOOT_VOLUME = 'BACKUP_BOOT_VOLUME'.freeze, ALLOWED_ACTIONS_CAPTURE_CONSOLE_HISTORY = 'CAPTURE_CONSOLE_HISTORY'.freeze, ALLOWED_ACTIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#accessible_ports ⇒ Array<Integer>
List of accessible ports for instances launched with this listing resource version.
-
#allowed_actions ⇒ Array<String>
Allowed actions for the listing resource.
-
#available_regions ⇒ Array<String>
List of regions that this listing resource version is available.
-
#compatible_shapes ⇒ Array<String>
Array of shapes compatible with this resource.
-
#listing_id ⇒ String
The OCID of the listing this resource version belongs to.
-
#listing_resource_id ⇒ String
OCID of the listing resource.
-
#listing_resource_version ⇒ String
Resource Version.
-
#time_published ⇒ DateTime
Date and time the listing resource version was published, in RFC3339 format.
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 = {}) ⇒ AppCatalogListingResourceVersion
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 = {}) ⇒ AppCatalogListingResourceVersion
Initializes the object
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 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 112 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.listing_id = attributes[:'listingId'] if attributes[:'listingId'] raise 'You cannot provide both :listingId and :listing_id' if attributes.key?(:'listingId') && attributes.key?(:'listing_id') self.listing_id = attributes[:'listing_id'] if attributes[:'listing_id'] self.time_published = attributes[:'timePublished'] if attributes[:'timePublished'] raise 'You cannot provide both :timePublished and :time_published' if attributes.key?(:'timePublished') && attributes.key?(:'time_published') self.time_published = attributes[:'time_published'] if attributes[:'time_published'] self.listing_resource_id = attributes[:'listingResourceId'] if attributes[:'listingResourceId'] raise 'You cannot provide both :listingResourceId and :listing_resource_id' if attributes.key?(:'listingResourceId') && attributes.key?(:'listing_resource_id') self.listing_resource_id = attributes[:'listing_resource_id'] if attributes[:'listing_resource_id'] self.listing_resource_version = attributes[:'listingResourceVersion'] if attributes[:'listingResourceVersion'] raise 'You cannot provide both :listingResourceVersion and :listing_resource_version' if attributes.key?(:'listingResourceVersion') && attributes.key?(:'listing_resource_version') self.listing_resource_version = attributes[:'listing_resource_version'] if attributes[:'listing_resource_version'] self.available_regions = attributes[:'availableRegions'] if attributes[:'availableRegions'] raise 'You cannot provide both :availableRegions and :available_regions' if attributes.key?(:'availableRegions') && attributes.key?(:'available_regions') self.available_regions = attributes[:'available_regions'] if attributes[:'available_regions'] self.compatible_shapes = attributes[:'compatibleShapes'] if attributes[:'compatibleShapes'] raise 'You cannot provide both :compatibleShapes and :compatible_shapes' if attributes.key?(:'compatibleShapes') && attributes.key?(:'compatible_shapes') self.compatible_shapes = attributes[:'compatible_shapes'] if attributes[:'compatible_shapes'] self.accessible_ports = attributes[:'accessiblePorts'] if attributes[:'accessiblePorts'] raise 'You cannot provide both :accessiblePorts and :accessible_ports' if attributes.key?(:'accessiblePorts') && attributes.key?(:'accessible_ports') self.accessible_ports = attributes[:'accessible_ports'] if attributes[:'accessible_ports'] self.allowed_actions = attributes[:'allowedActions'] if attributes[:'allowedActions'] raise 'You cannot provide both :allowedActions and :allowed_actions' if attributes.key?(:'allowedActions') && attributes.key?(:'allowed_actions') self.allowed_actions = attributes[:'allowed_actions'] if attributes[:'allowed_actions'] end |
Instance Attribute Details
#accessible_ports ⇒ Array<Integer>
List of accessible ports for instances launched with this listing resource version.
60 61 62 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 60 def accessible_ports @accessible_ports end |
#allowed_actions ⇒ Array<String>
Allowed actions for the listing resource.
64 65 66 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 64 def allowed_actions @allowed_actions end |
#available_regions ⇒ Array<String>
List of regions that this listing resource version is available.
For information about Regions, see [Regions](docs.cloud.oracle.com/#General/Concepts/regions.htm).
Example: ‘["us-ashburn-1", "us-phoenix-1"]`
47 48 49 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 47 def available_regions @available_regions end |
#compatible_shapes ⇒ Array<String>
Array of shapes compatible with this resource.
You may enumerate all available shapes by calling list_shapes.
Example: ‘["VM.Standard1.1", "VM.Standard1.2"]`
56 57 58 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 56 def compatible_shapes @compatible_shapes end |
#listing_id ⇒ String
The OCID of the listing this resource version belongs to.
23 24 25 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 23 def listing_id @listing_id end |
#listing_resource_id ⇒ String
OCID of the listing resource.
33 34 35 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 33 def listing_resource_id @listing_resource_id end |
#listing_resource_version ⇒ String
Resource Version.
37 38 39 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 37 def listing_resource_version @listing_resource_version end |
#time_published ⇒ DateTime
Date and time the listing resource version was published, in RFC3339 format. Example: ‘2018-03-20T12:32:53.532Z`
29 30 31 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 29 def time_published @time_published end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 67 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'listing_id': :'listingId', 'time_published': :'timePublished', 'listing_resource_id': :'listingResourceId', 'listing_resource_version': :'listingResourceVersion', 'available_regions': :'availableRegions', 'compatible_shapes': :'compatibleShapes', 'accessible_ports': :'accessiblePorts', 'allowed_actions': :'allowedActions' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 83 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'listing_id': :'String', 'time_published': :'DateTime', 'listing_resource_id': :'String', 'listing_resource_version': :'String', 'available_regions': :'Array<String>', 'compatible_shapes': :'Array<String>', 'accessible_ports': :'Array<Integer>', 'allowed_actions': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 196 def ==(other) return true if equal?(other) self.class == other.class && listing_id == other.listing_id && time_published == other.time_published && listing_resource_id == other.listing_resource_id && listing_resource_version == other.listing_resource_version && available_regions == other.available_regions && compatible_shapes == other.compatible_shapes && accessible_ports == other.accessible_ports && allowed_actions == other.allowed_actions end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 233 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
213 214 215 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 213 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
222 223 224 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 222 def hash [listing_id, time_published, listing_resource_id, listing_resource_version, available_regions, compatible_shapes, accessible_ports, allowed_actions].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
266 267 268 269 270 271 272 273 274 275 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 266 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
260 261 262 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 260 def to_s to_hash.to_s end |