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

PACKAGE_TYPE_ENUM =
[
  PACKAGE_TYPE_ORCHESTRATION = 'ORCHESTRATION'.freeze,
  PACKAGE_TYPE_IMAGE = 'IMAGE'.freeze,
  PACKAGE_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):



225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
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
# File 'lib/oci/marketplace/models/listing.rb', line 225

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.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?
end

Instance Attribute Details



100
101
102
# File 'lib/oci/marketplace/models/listing.rb', line 100

def banner
  @banner
end

#categoriesArray<String>

Categories that the listing belongs to.

Returns:

  • (Array<String>)


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

def categories
  @categories
end

#default_package_versionString

The default package version.

Returns:

  • (String)


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

def default_package_version
  @default_package_version
end

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



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

def documentation_links
  @documentation_links
end

#iconOCI::Marketplace::Models::UploadData



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

def icon
  @icon
end

#idString

The unique identifier for the listing in Marketplace.

Returns:

  • (String)


19
20
21
# File 'lib/oci/marketplace/models/listing.rb', line 19

def id
  @id
end

Indicates whether the listing is included in Featured Listings.

Returns:

  • (BOOLEAN)


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

def is_featured
  @is_featured
end

#keywordsString

Keywords associated with the listing.

Returns:

  • (String)


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

def keywords
  @keywords
end

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

Languages supported by the listing.

Returns:



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

def languages
  @languages
end

#license_model_descriptionString

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

Returns:

  • (String)


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

def license_model_description
  @license_model_description
end

Links to reference material.

Returns:



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

def links
  @links
end

#long_descriptionString

A long description of the listing.

Returns:

  • (String)


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

def long_description
  @long_description
end

#nameString

The name of the listing.

Returns:

  • (String)


23
24
25
# File 'lib/oci/marketplace/models/listing.rb', line 23

def name
  @name
end

#package_typeString

The listing's package type.

Returns:

  • (String)


108
109
110
# File 'lib/oci/marketplace/models/listing.rb', line 108

def package_type
  @package_type
end

#publisherOCI::Marketplace::Models::Publisher



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

def publisher
  @publisher
end

#regionsArray<OCI::Marketplace::Models::Region>

The regions where the listing is eligible to be deployed.



104
105
106
# File 'lib/oci/marketplace/models/listing.rb', line 104

def regions
  @regions
end

#release_notesString

Release notes for the listing.

Returns:

  • (String)


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

def release_notes
  @release_notes
end

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

Screenshots of the listing.



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

def screenshots
  @screenshots
end

#short_descriptionString

A short description of the listing.

Returns:

  • (String)


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

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.



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

def support_contacts
  @support_contacts
end

Links to support resources for the listing.



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

def support_links
  @support_links
end

#system_requirementsString

System requirements for the listing.

Returns:

  • (String)


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

def system_requirements
  @system_requirements
end

#taglineString

The tagline of the listing.

Returns:

  • (String)


31
32
33
# File 'lib/oci/marketplace/models/listing.rb', line 31

def tagline
  @tagline
end

#time_releasedDateTime

The release date of the listing.

Returns:

  • (DateTime)


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

def time_released
  @time_released
end

#usage_informationString

Usage information for the listing.

Returns:

  • (String)


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

def usage_information
  @usage_information
end

#versionString

The version of the listing.

Returns:

  • (String)


27
28
29
# File 'lib/oci/marketplace/models/listing.rb', line 27

def version
  @version
end

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

Videos of the listing.



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

def videos
  @videos
end

Class Method Details

.attribute_mapObject

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



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

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',
    'regions': :'regions',
    'package_type': :'packageType',
    'default_package_version': :'defaultPackageVersion',
    'links': :'links',
    'is_featured': :'isFeatured'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

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',
    'regions': :'Array<OCI::Marketplace::Models::Region>',
    'package_type': :'String',
    'default_package_version': :'String',
    'links': :'Array<OCI::Marketplace::Models::Link>',
    'is_featured': :'BOOLEAN'
    # 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



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

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 &&
    regions == other.regions &&
    package_type == other.package_type &&
    default_package_version == other.default_package_version &&
    links == other.links &&
    is_featured == other.is_featured
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



414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/oci/marketplace/models/listing.rb', line 414

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


394
395
396
# File 'lib/oci/marketplace/models/listing.rb', line 394

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



403
404
405
# File 'lib/oci/marketplace/models/listing.rb', line 403

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, regions, package_type, default_package_version, links, is_featured].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



447
448
449
450
451
452
453
454
455
456
# File 'lib/oci/marketplace/models/listing.rb', line 447

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



441
442
443
# File 'lib/oci/marketplace/models/listing.rb', line 441

def to_s
  to_hash.to_s
end