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 =
[ 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
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 166 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 113 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.
61 62 63 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 61 def accessible_ports @accessible_ports end |
#allowed_actions ⇒ Array<String>
Allowed actions for the listing resource.
65 66 67 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 65 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.
Example: [\"us-ashburn-1\", \"us-phoenix-1\"]
48 49 50 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 48 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\"]
57 58 59 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 57 def compatible_shapes @compatible_shapes end |
#listing_id ⇒ String
The OCID of the listing this resource version belongs to.
24 25 26 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 24 def listing_id @listing_id end |
#listing_resource_id ⇒ String
OCID of the listing resource.
34 35 36 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 34 def listing_resource_id @listing_resource_id end |
#listing_resource_version ⇒ String
Resource Version.
38 39 40 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 38 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
30 31 32 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 30 def time_published @time_published end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 68 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.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 84 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.
195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 195 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
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 232 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
212 213 214 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 212 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
221 222 223 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 221 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
265 266 267 268 269 270 271 272 273 274 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 265 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
259 260 261 |
# File 'lib/oci/core/models/app_catalog_listing_resource_version.rb', line 259 def to_s to_hash.to_s end |