Class: OCI::Marketplace::Models::Listing

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/marketplace/models/listing.rb

Overview

The model for an Oracle Cloud Infrastructure Marketplace listing.

Constant Summary collapse

COMPATIBLE_ARCHITECTURES_ENUM =
[
  COMPATIBLE_ARCHITECTURES_X86 = 'X86'.freeze,
  COMPATIBLE_ARCHITECTURES_ARM = 'ARM'.freeze,
  COMPATIBLE_ARCHITECTURES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
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
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Listing

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/oci/marketplace/models/listing.rb', line 263

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.version = attributes[:'version'] if attributes[:'version']

  self.tagline = attributes[:'tagline'] if attributes[:'tagline']

  self.keywords = attributes[:'keywords'] if attributes[:'keywords']

  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.usage_information = attributes[:'usageInformation'] if attributes[:'usageInformation']

  raise 'You cannot provide both :usageInformation and :usage_information' if attributes.key?(:'usageInformation') && attributes.key?(:'usage_information')

  self.usage_information = attributes[:'usage_information'] if attributes[:'usage_information']

  self.long_description = attributes[:'longDescription'] if attributes[:'longDescription']

  raise 'You cannot provide both :longDescription and :long_description' if attributes.key?(:'longDescription') && attributes.key?(:'long_description')

  self.long_description = attributes[:'long_description'] if attributes[:'long_description']

  self.license_model_description = attributes[:'licenseModelDescription'] if attributes[:'licenseModelDescription']

  raise 'You cannot provide both :licenseModelDescription and :license_model_description' if attributes.key?(:'licenseModelDescription') && attributes.key?(:'license_model_description')

  self.license_model_description = attributes[:'license_model_description'] if attributes[:'license_model_description']

  self.system_requirements = attributes[:'systemRequirements'] if attributes[:'systemRequirements']

  raise 'You cannot provide both :systemRequirements and :system_requirements' if attributes.key?(:'systemRequirements') && attributes.key?(:'system_requirements')

  self.system_requirements = attributes[:'system_requirements'] if attributes[:'system_requirements']

  self.time_released = attributes[:'timeReleased'] if attributes[:'timeReleased']

  raise 'You cannot provide both :timeReleased and :time_released' if attributes.key?(:'timeReleased') && attributes.key?(:'time_released')

  self.time_released = attributes[:'time_released'] if attributes[:'time_released']

  self.release_notes = attributes[:'releaseNotes'] if attributes[:'releaseNotes']

  raise 'You cannot provide both :releaseNotes and :release_notes' if attributes.key?(:'releaseNotes') && attributes.key?(:'release_notes')

  self.release_notes = attributes[:'release_notes'] if attributes[:'release_notes']

  self.categories = attributes[:'categories'] if attributes[:'categories']

  self.publisher = attributes[:'publisher'] if attributes[:'publisher']

  self.languages = attributes[:'languages'] if attributes[:'languages']

  self.screenshots = attributes[:'screenshots'] if attributes[:'screenshots']

  self.videos = attributes[:'videos'] if attributes[:'videos']

  self.support_contacts = attributes[:'supportContacts'] if attributes[:'supportContacts']

  raise 'You cannot provide both :supportContacts and :support_contacts' if attributes.key?(:'supportContacts') && attributes.key?(:'support_contacts')

  self.support_contacts = attributes[:'support_contacts'] if attributes[:'support_contacts']

  self.support_links = attributes[:'supportLinks'] if attributes[:'supportLinks']

  raise 'You cannot provide both :supportLinks and :support_links' if attributes.key?(:'supportLinks') && attributes.key?(:'support_links')

  self.support_links = attributes[:'support_links'] if attributes[:'support_links']

  self.documentation_links = attributes[:'documentationLinks'] if attributes[:'documentationLinks']

  raise 'You cannot provide both :documentationLinks and :documentation_links' if attributes.key?(:'documentationLinks') && attributes.key?(:'documentation_links')

  self.documentation_links = attributes[:'documentation_links'] if attributes[:'documentation_links']

  self.icon = attributes[:'icon'] if attributes[:'icon']

  self.banner = attributes[:'banner'] if attributes[:'banner']

  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.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.default_package_version = attributes[:'defaultPackageVersion'] if attributes[:'defaultPackageVersion']

  raise 'You cannot provide both :defaultPackageVersion and :default_package_version' if attributes.key?(:'defaultPackageVersion') && attributes.key?(:'default_package_version')

  self.default_package_version = attributes[:'default_package_version'] if attributes[:'default_package_version']

  self.links = attributes[:'links'] if attributes[:'links']

  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.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']

  self.supported_operating_systems = 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.supported_operating_systems = attributes[:'supported_operating_systems'] if attributes[:'supported_operating_systems']
end

Instance Attribute Details



116
117
118
# File 'lib/oci/marketplace/models/listing.rb', line 116

def banner
  @banner
end

#categoriesArray<String>

Categories that the listing belongs to.

Returns:

  • (Array<String>)


83
84
85
# File 'lib/oci/marketplace/models/listing.rb', line 83

def categories
  @categories
end

#compatible_architecturesArray<String>

The list of compatible architectures supported by the listing

Returns:

  • (Array<String>)


120
121
122
# File 'lib/oci/marketplace/models/listing.rb', line 120

def compatible_architectures
  @compatible_architectures
end

#default_package_versionString

The default package version.

Returns:

  • (String)


133
134
135
# File 'lib/oci/marketplace/models/listing.rb', line 133

def default_package_version
  @default_package_version
end

Links to additional documentation provided by the publisher specifically for the listing.



110
111
112
# File 'lib/oci/marketplace/models/listing.rb', line 110

def documentation_links
  @documentation_links
end

#iconOCI::Marketplace::Models::UploadData



113
114
115
# File 'lib/oci/marketplace/models/listing.rb', line 113

def icon
  @icon
end

#idString

The unique identifier for the listing in Marketplace.

Returns:

  • (String)


35
36
37
# File 'lib/oci/marketplace/models/listing.rb', line 35

def id
  @id
end

Indicates whether the listing is included in Featured Listings.

Returns:

  • (BOOLEAN)


141
142
143
# File 'lib/oci/marketplace/models/listing.rb', line 141

def is_featured
  @is_featured
end

#keywordsString

Keywords associated with the listing.

Returns:

  • (String)


51
52
53
# File 'lib/oci/marketplace/models/listing.rb', line 51

def keywords
  @keywords
end

#languagesArray<OCI::Marketplace::Models::Item>

Languages supported by the listing.

Returns:



90
91
92
# File 'lib/oci/marketplace/models/listing.rb', line 90

def languages
  @languages
end

#license_model_descriptionString

A description of the publisher's licensing model for the listing.

Returns:

  • (String)


67
68
69
# File 'lib/oci/marketplace/models/listing.rb', line 67

def license_model_description
  @license_model_description
end

Links to reference material.

Returns:



137
138
139
# File 'lib/oci/marketplace/models/listing.rb', line 137

def links
  @links
end

#listing_typeString

The publisher category to which the listing belongs. The publisher category informs where the listing appears for use.

Returns:

  • (String)


145
146
147
# File 'lib/oci/marketplace/models/listing.rb', line 145

def listing_type
  @listing_type
end

#long_descriptionString

A long description of the listing.

Returns:

  • (String)


63
64
65
# File 'lib/oci/marketplace/models/listing.rb', line 63

def long_description
  @long_description
end

#nameString

The name of the listing.

Returns:

  • (String)


39
40
41
# File 'lib/oci/marketplace/models/listing.rb', line 39

def name
  @name
end

#package_typeString

The listing's package type.

Returns:

  • (String)


129
130
131
# File 'lib/oci/marketplace/models/listing.rb', line 129

def package_type
  @package_type
end

#publisherOCI::Marketplace::Models::Publisher



86
87
88
# File 'lib/oci/marketplace/models/listing.rb', line 86

def publisher
  @publisher
end

#regionsArray<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.)



125
126
127
# File 'lib/oci/marketplace/models/listing.rb', line 125

def regions
  @regions
end

#release_notesString

Release notes for the listing.

Returns:

  • (String)


79
80
81
# File 'lib/oci/marketplace/models/listing.rb', line 79

def release_notes
  @release_notes
end

#screenshotsArray<OCI::Marketplace::Models::Screenshot>

Screenshots of the listing.



94
95
96
# File 'lib/oci/marketplace/models/listing.rb', line 94

def screenshots
  @screenshots
end

#short_descriptionString

A short description of the listing.

Returns:

  • (String)


55
56
57
# File 'lib/oci/marketplace/models/listing.rb', line 55

def short_description
  @short_description
end

#support_contactsArray<OCI::Marketplace::Models::SupportContact>

Contact information to use to get support from the publisher for the listing.



102
103
104
# File 'lib/oci/marketplace/models/listing.rb', line 102

def support_contacts
  @support_contacts
end

Links to support resources for the listing.



106
107
108
# File 'lib/oci/marketplace/models/listing.rb', line 106

def support_links
  @support_links
end

#supported_operating_systemsArray<OCI::Marketplace::Models::OperatingSystem>

List of operating systems supported by the listing.



149
150
151
# File 'lib/oci/marketplace/models/listing.rb', line 149

def supported_operating_systems
  @supported_operating_systems
end

#system_requirementsString

System requirements for the listing.

Returns:

  • (String)


71
72
73
# File 'lib/oci/marketplace/models/listing.rb', line 71

def system_requirements
  @system_requirements
end

#taglineString

The tagline of the listing.

Returns:

  • (String)


47
48
49
# File 'lib/oci/marketplace/models/listing.rb', line 47

def tagline
  @tagline
end

#time_releasedDateTime

The release date of the listing.

Returns:

  • (DateTime)


75
76
77
# File 'lib/oci/marketplace/models/listing.rb', line 75

def time_released
  @time_released
end

#usage_informationString

Usage information for the listing.

Returns:

  • (String)


59
60
61
# File 'lib/oci/marketplace/models/listing.rb', line 59

def usage_information
  @usage_information
end

#versionString

The version of the listing.

Returns:

  • (String)


43
44
45
# File 'lib/oci/marketplace/models/listing.rb', line 43

def version
  @version
end

#videosArray<OCI::Marketplace::Models::NamedLink>

Videos of the listing.



98
99
100
# File 'lib/oci/marketplace/models/listing.rb', line 98

def videos
  @videos
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/oci/marketplace/models/listing.rb', line 152

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'name': :'name',
    'version': :'version',
    'tagline': :'tagline',
    'keywords': :'keywords',
    'short_description': :'shortDescription',
    'usage_information': :'usageInformation',
    'long_description': :'longDescription',
    'license_model_description': :'licenseModelDescription',
    'system_requirements': :'systemRequirements',
    'time_released': :'timeReleased',
    'release_notes': :'releaseNotes',
    'categories': :'categories',
    'publisher': :'publisher',
    'languages': :'languages',
    'screenshots': :'screenshots',
    'videos': :'videos',
    'support_contacts': :'supportContacts',
    'support_links': :'supportLinks',
    'documentation_links': :'documentationLinks',
    'icon': :'icon',
    'banner': :'banner',
    'compatible_architectures': :'compatibleArchitectures',
    'regions': :'regions',
    'package_type': :'packageType',
    'default_package_version': :'defaultPackageVersion',
    'links': :'links',
    'is_featured': :'isFeatured',
    'listing_type': :'listingType',
    'supported_operating_systems': :'supportedOperatingSystems'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/marketplace/models/listing.rb', line 190

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'name': :'String',
    'version': :'String',
    'tagline': :'String',
    'keywords': :'String',
    'short_description': :'String',
    'usage_information': :'String',
    'long_description': :'String',
    'license_model_description': :'String',
    'system_requirements': :'String',
    'time_released': :'DateTime',
    'release_notes': :'String',
    'categories': :'Array<String>',
    'publisher': :'OCI::Marketplace::Models::Publisher',
    'languages': :'Array<OCI::Marketplace::Models::Item>',
    'screenshots': :'Array<OCI::Marketplace::Models::Screenshot>',
    'videos': :'Array<OCI::Marketplace::Models::NamedLink>',
    'support_contacts': :'Array<OCI::Marketplace::Models::SupportContact>',
    'support_links': :'Array<OCI::Marketplace::Models::NamedLink>',
    'documentation_links': :'Array<OCI::Marketplace::Models::DocumentationLink>',
    'icon': :'OCI::Marketplace::Models::UploadData',
    'banner': :'OCI::Marketplace::Models::UploadData',
    'compatible_architectures': :'Array<String>',
    'regions': :'Array<OCI::Marketplace::Models::Region>',
    'package_type': :'String',
    'default_package_version': :'String',
    'links': :'Array<OCI::Marketplace::Models::Link>',
    'is_featured': :'BOOLEAN',
    'listing_type': :'String',
    'supported_operating_systems': :'Array<OCI::Marketplace::Models::OperatingSystem>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
# File 'lib/oci/marketplace/models/listing.rb', line 447

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    name == other.name &&
    version == other.version &&
    tagline == other.tagline &&
    keywords == other.keywords &&
    short_description == other.short_description &&
    usage_information == other.usage_information &&
    long_description == other.long_description &&
    license_model_description == other.license_model_description &&
    system_requirements == other.system_requirements &&
    time_released == other.time_released &&
    release_notes == other.release_notes &&
    categories == other.categories &&
    publisher == other.publisher &&
    languages == other.languages &&
    screenshots == other.screenshots &&
    videos == other.videos &&
    support_contacts == other.support_contacts &&
    support_links == other.support_links &&
    documentation_links == other.documentation_links &&
    icon == other.icon &&
    banner == other.banner &&
    compatible_architectures == other.compatible_architectures &&
    regions == other.regions &&
    package_type == other.package_type &&
    default_package_version == other.default_package_version &&
    links == other.links &&
    is_featured == other.is_featured &&
    listing_type == other.listing_type &&
    supported_operating_systems == other.supported_operating_systems
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# File 'lib/oci/marketplace/models/listing.rb', line 506

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


486
487
488
# File 'lib/oci/marketplace/models/listing.rb', line 486

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



495
496
497
# File 'lib/oci/marketplace/models/listing.rb', line 495

def hash
  [id, name, version, tagline, keywords, short_description, usage_information, long_description, license_model_description, system_requirements, time_released, release_notes, categories, publisher, languages, screenshots, videos, support_contacts, support_links, documentation_links, icon, banner, compatible_architectures, regions, package_type, default_package_version, links, is_featured, listing_type, supported_operating_systems].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



539
540
541
542
543
544
545
546
547
548
# File 'lib/oci/marketplace/models/listing.rb', line 539

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



533
534
535
# File 'lib/oci/marketplace/models/listing.rb', line 533

def to_s
  to_hash.to_s
end