Class: OCI::Marketplace::Models::ListingSummary
- Inherits:
-
Object
- Object
- OCI::Marketplace::Models::ListingSummary
- Defined in:
- lib/oci/marketplace/models/listing_summary.rb
Overview
The model for a summary of an Oracle Cloud Infrastructure Marketplace listing.
Constant Summary collapse
- PACKAGE_TYPE_ENUM =
[ PACKAGE_TYPE_ORCHESTRATION = 'ORCHESTRATION'.freeze, PACKAGE_TYPE_IMAGE = 'IMAGE'.freeze, PACKAGE_TYPE_CONTAINER = 'CONTAINER'.freeze, PACKAGE_TYPE_KUBERNETES = 'KUBERNETES'.freeze, PACKAGE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PRICING_TYPES_ENUM =
[ PRICING_TYPES_FREE = 'FREE'.freeze, PRICING_TYPES_BYOL = 'BYOL'.freeze, PRICING_TYPES_PAYGO = 'PAYGO'.freeze, PRICING_TYPES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- COMPATIBLE_ARCHITECTURES_ENUM =
[ COMPATIBLE_ARCHITECTURES_X86 = 'X86'.freeze, COMPATIBLE_ARCHITECTURES_ARM = 'ARM'.freeze, COMPATIBLE_ARCHITECTURES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LISTING_TYPE_ENUM =
[ LISTING_TYPE_COMMUNITY = 'COMMUNITY'.freeze, LISTING_TYPE_PARTNER = 'PARTNER'.freeze, LISTING_TYPE_PRIVATE = 'PRIVATE'.freeze, LISTING_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#categories ⇒ Array<String>
Product categories that the listing belongs to.
-
#compatible_architectures ⇒ Array<String>
The list of compatible architectures supported by the listing.
- #icon ⇒ OCI::Marketplace::Models::UploadData
-
#id ⇒ String
The unique identifier for the listing in Marketplace.
-
#is_featured ⇒ BOOLEAN
Indicates whether the listing is featured.
-
#is_rover_exportable ⇒ BOOLEAN
True if this application is Rover exportable.
-
#listing_type ⇒ String
The publisher category to which the listing belongs.
-
#name ⇒ String
The name of the listing.
-
#package_type ⇒ String
The listing's package type.
-
#pricing_types ⇒ Array<String>
Summary of the pricing types available across all packages in the listing.
- #publisher ⇒ OCI::Marketplace::Models::PublisherSummary
-
#regions ⇒ Array<OCI::Marketplace::Models::Region>
The regions where you can deploy the listing.
-
#short_description ⇒ String
A short description of the listing.
-
#supported_operating_systems ⇒ Array<OCI::Marketplace::Models::OperatingSystem>
The list of operating systems supported by the listing.
-
#tagline ⇒ String
The tagline of the listing.
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 = {}) ⇒ ListingSummary
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 = {}) ⇒ ListingSummary
Initializes the object
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 166 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.id = attributes[:'id'] if attributes[:'id'] self.name = attributes[:'name'] if attributes[:'name'] self.short_description = attributes[:'shortDescription'] if attributes[:'shortDescription'] raise 'You cannot provide both :shortDescription and :short_description' if attributes.key?(:'shortDescription') && attributes.key?(:'short_description') self.short_description = attributes[:'short_description'] if attributes[:'short_description'] self.is_rover_exportable = attributes[:'isRoverExportable'] unless attributes[:'isRoverExportable'].nil? self.is_rover_exportable = false if is_rover_exportable.nil? && !attributes.key?(:'isRoverExportable') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isRoverExportable and :is_rover_exportable' if attributes.key?(:'isRoverExportable') && attributes.key?(:'is_rover_exportable') self.is_rover_exportable = attributes[:'is_rover_exportable'] unless attributes[:'is_rover_exportable'].nil? self.is_rover_exportable = false if is_rover_exportable.nil? && !attributes.key?(:'isRoverExportable') && !attributes.key?(:'is_rover_exportable') # rubocop:disable Style/StringLiterals self.tagline = attributes[:'tagline'] if attributes[:'tagline'] self.icon = attributes[:'icon'] if attributes[:'icon'] self.package_type = attributes[:'packageType'] if attributes[:'packageType'] raise 'You cannot provide both :packageType and :package_type' if attributes.key?(:'packageType') && attributes.key?(:'package_type') self.package_type = attributes[:'package_type'] if attributes[:'package_type'] self.pricing_types = attributes[:'pricingTypes'] if attributes[:'pricingTypes'] raise 'You cannot provide both :pricingTypes and :pricing_types' if attributes.key?(:'pricingTypes') && attributes.key?(:'pricing_types') self.pricing_types = attributes[:'pricing_types'] if attributes[:'pricing_types'] self.compatible_architectures = attributes[:'compatibleArchitectures'] if attributes[:'compatibleArchitectures'] raise 'You cannot provide both :compatibleArchitectures and :compatible_architectures' if attributes.key?(:'compatibleArchitectures') && attributes.key?(:'compatible_architectures') self.compatible_architectures = attributes[:'compatible_architectures'] if attributes[:'compatible_architectures'] self.regions = attributes[:'regions'] if attributes[:'regions'] self.is_featured = attributes[:'isFeatured'] unless attributes[:'isFeatured'].nil? raise 'You cannot provide both :isFeatured and :is_featured' if attributes.key?(:'isFeatured') && attributes.key?(:'is_featured') self.is_featured = attributes[:'is_featured'] unless attributes[:'is_featured'].nil? self.categories = attributes[:'categories'] if attributes[:'categories'] self.publisher = attributes[:'publisher'] if attributes[:'publisher'] self. = attributes[:'supportedOperatingSystems'] if attributes[:'supportedOperatingSystems'] raise 'You cannot provide both :supportedOperatingSystems and :supported_operating_systems' if attributes.key?(:'supportedOperatingSystems') && attributes.key?(:'supported_operating_systems') self. = attributes[:'supported_operating_systems'] if attributes[:'supported_operating_systems'] self.listing_type = attributes[:'listingType'] if attributes[:'listingType'] raise 'You cannot provide both :listingType and :listing_type' if attributes.key?(:'listingType') && attributes.key?(:'listing_type') self.listing_type = attributes[:'listing_type'] if attributes[:'listing_type'] end |
Instance Attribute Details
#categories ⇒ Array<String>
Product categories that the listing belongs to.
86 87 88 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 86 def categories @categories end |
#compatible_architectures ⇒ Array<String>
The list of compatible architectures supported by the listing
73 74 75 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 73 def compatible_architectures @compatible_architectures end |
#icon ⇒ OCI::Marketplace::Models::UploadData
61 62 63 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 61 def icon @icon end |
#id ⇒ String
The unique identifier for the listing in Marketplace.
42 43 44 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 42 def id @id end |
#is_featured ⇒ BOOLEAN
Indicates whether the listing is featured.
82 83 84 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 82 def is_featured @is_featured end |
#is_rover_exportable ⇒ BOOLEAN
True if this application is Rover exportable
54 55 56 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 54 def is_rover_exportable @is_rover_exportable end |
#listing_type ⇒ String
The publisher category to which the listing belongs. The publisher category informs where the listing appears for use.
97 98 99 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 97 def listing_type @listing_type end |
#name ⇒ String
The name of the listing.
46 47 48 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 46 def name @name end |
#package_type ⇒ String
The listing's package type.
65 66 67 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 65 def package_type @package_type end |
#pricing_types ⇒ Array<String>
Summary of the pricing types available across all packages in the listing.
69 70 71 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 69 def pricing_types @pricing_types end |
#publisher ⇒ OCI::Marketplace::Models::PublisherSummary
89 90 91 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 89 def publisher @publisher end |
#regions ⇒ Array<OCI::Marketplace::Models::Region>
The regions where you can deploy the listing. (Some listings have restrictions that limit their deployment to United States regions only.)
78 79 80 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 78 def regions @regions end |
#short_description ⇒ String
A short description of the listing.
50 51 52 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 50 def short_description @short_description end |
#supported_operating_systems ⇒ Array<OCI::Marketplace::Models::OperatingSystem>
The list of operating systems supported by the listing.
93 94 95 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 93 def @supported_operating_systems end |
#tagline ⇒ String
The tagline of the listing.
58 59 60 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 58 def tagline @tagline end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 100 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'name': :'name', 'short_description': :'shortDescription', 'is_rover_exportable': :'isRoverExportable', 'tagline': :'tagline', 'icon': :'icon', 'package_type': :'packageType', 'pricing_types': :'pricingTypes', 'compatible_architectures': :'compatibleArchitectures', 'regions': :'regions', 'is_featured': :'isFeatured', 'categories': :'categories', 'publisher': :'publisher', 'supported_operating_systems': :'supportedOperatingSystems', 'listing_type': :'listingType' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 123 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'name': :'String', 'short_description': :'String', 'is_rover_exportable': :'BOOLEAN', 'tagline': :'String', 'icon': :'OCI::Marketplace::Models::UploadData', 'package_type': :'String', 'pricing_types': :'Array<String>', 'compatible_architectures': :'Array<String>', 'regions': :'Array<OCI::Marketplace::Models::Region>', 'is_featured': :'BOOLEAN', 'categories': :'Array<String>', 'publisher': :'OCI::Marketplace::Models::PublisherSummary', 'supported_operating_systems': :'Array<OCI::Marketplace::Models::OperatingSystem>', 'listing_type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 310 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && name == other.name && short_description == other.short_description && is_rover_exportable == other.is_rover_exportable && tagline == other.tagline && icon == other.icon && package_type == other.package_type && pricing_types == other.pricing_types && compatible_architectures == other.compatible_architectures && regions == other.regions && is_featured == other.is_featured && categories == other.categories && publisher == other.publisher && == other. && listing_type == other.listing_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 354 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
334 335 336 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 334 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
343 344 345 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 343 def hash [id, name, short_description, is_rover_exportable, tagline, icon, package_type, pricing_types, compatible_architectures, regions, is_featured, categories, publisher, , listing_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
387 388 389 390 391 392 393 394 395 396 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 387 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
381 382 383 |
# File 'lib/oci/marketplace/models/listing_summary.rb', line 381 def to_s to_hash.to_s end |