Class: OCI::MarketplacePublisher::Models::CreateListingRevisionDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/marketplace_publisher/models/create_listing_revision_details.rb

Overview

The model for an Oracle Cloud Infrastructure Marketplace Publisher listing revision.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateListingRevisionDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 175

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

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

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

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

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

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

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

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

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

  self.content_language = attributes[:'contentLanguage'] if attributes[:'contentLanguage']

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

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

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

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

  self.pricing_type = attributes[:'pricingType'] if attributes[:'pricingType']

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
end

Instance Attribute Details

#categoriesArray<String>

[Required] The categories for the listing revision.

Returns:

  • (Array<String>)


52
53
54
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 52

def categories
  @categories
end

#content_languageOCI::MarketplacePublisher::Models::LanguageItem



59
60
61
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 59

def content_language
  @content_language
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


91
92
93
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 91

def defined_tags
  @defined_tags
end

#display_nameString

The name for the listing revision.

Returns:

  • (String)


13
14
15
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 13

def display_name
  @display_name
end

#freeform_tagsHash<String, String>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}

Returns:

  • (Hash<String, String>)


85
86
87
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 85

def freeform_tags
  @freeform_tags
end

#headlineString

[Required] Single line introduction for the listing revision.

Returns:

  • (String)


24
25
26
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 24

def headline
  @headline
end

#keywordsString

Keywords associated with the listing revision.

Returns:

  • (String)


32
33
34
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 32

def keywords
  @keywords
end

#listing_idString

[Required] The unique identifier for the listing this revision belongs to.

Returns:

  • (String)


17
18
19
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 17

def listing_id
  @listing_id
end

#long_descriptionString

A long description for the listing revision.

Returns:

  • (String)


44
45
46
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 44

def long_description
  @long_description
end

#marketsArray<String>

The markets supported by the listing revision.

Returns:

  • (Array<String>)


56
57
58
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 56

def markets
  @markets
end

#pricing_typeString

[Required] The pricing model for the listing revision.

Returns:

  • (String)


79
80
81
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 79

def pricing_type
  @pricing_type
end

#short_descriptionString

A short description for the listing revision.

Returns:

  • (String)


36
37
38
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 36

def short_description
  @short_description
end

#statusString

The current status of the Listing revision.

Returns:

  • (String)


75
76
77
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 75

def status
  @status
end

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

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



67
68
69
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 67

def support_contacts
  @support_contacts
end

Links to support resources for the listing revision.



71
72
73
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 71

def support_links
  @support_links
end

#supportedlanguagesArray<OCI::MarketplacePublisher::Models::LanguageItem>

Languages supported by the publisher for the listing revision.



63
64
65
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 63

def supportedlanguages
  @supportedlanguages
end

#system_requirementsString

System requirements for the listing revision.

Returns:

  • (String)


48
49
50
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 48

def system_requirements
  @system_requirements
end

#taglineString

The tagline for the listing revision.

Returns:

  • (String)


28
29
30
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 28

def tagline
  @tagline
end

#usage_informationString

Usage information for the listing revision.

Returns:

  • (String)


40
41
42
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 40

def usage_information
  @usage_information
end

#version_detailsOCI::MarketplacePublisher::Models::VersionDetails



20
21
22
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 20

def version_details
  @version_details
end

Class Method Details

.attribute_mapObject

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



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 94

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'displayName',
    'listing_id': :'listingId',
    'version_details': :'versionDetails',
    'headline': :'headline',
    'tagline': :'tagline',
    'keywords': :'keywords',
    'short_description': :'shortDescription',
    'usage_information': :'usageInformation',
    'long_description': :'longDescription',
    'system_requirements': :'systemRequirements',
    'categories': :'categories',
    'markets': :'markets',
    'content_language': :'contentLanguage',
    'supportedlanguages': :'supportedlanguages',
    'support_contacts': :'supportContacts',
    'support_links': :'supportLinks',
    'status': :'status',
    'pricing_type': :'pricingType',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 122

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'String',
    'listing_id': :'String',
    'version_details': :'OCI::MarketplacePublisher::Models::VersionDetails',
    'headline': :'String',
    'tagline': :'String',
    'keywords': :'String',
    'short_description': :'String',
    'usage_information': :'String',
    'long_description': :'String',
    'system_requirements': :'String',
    'categories': :'Array<String>',
    'markets': :'Array<String>',
    'content_language': :'OCI::MarketplacePublisher::Models::LanguageItem',
    'supportedlanguages': :'Array<OCI::MarketplacePublisher::Models::LanguageItem>',
    'support_contacts': :'Array<OCI::MarketplacePublisher::Models::SupportContact>',
    'support_links': :'Array<OCI::MarketplacePublisher::Models::NamedLink>',
    'status': :'String',
    'pricing_type': :'String',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>'
    # 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



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
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 281

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

  self.class == other.class &&
    display_name == other.display_name &&
    listing_id == other.listing_id &&
    version_details == other.version_details &&
    headline == other.headline &&
    tagline == other.tagline &&
    keywords == other.keywords &&
    short_description == other.short_description &&
    usage_information == other.usage_information &&
    long_description == other.long_description &&
    system_requirements == other.system_requirements &&
    categories == other.categories &&
    markets == other.markets &&
    content_language == other.content_language &&
    supportedlanguages == other.supportedlanguages &&
    support_contacts == other.support_contacts &&
    support_links == other.support_links &&
    status == other.status &&
    pricing_type == other.pricing_type &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags
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



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 330

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


310
311
312
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 310

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



319
320
321
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 319

def hash
  [display_name, listing_id, version_details, headline, tagline, keywords, short_description, usage_information, long_description, system_requirements, categories, markets, content_language, supportedlanguages, support_contacts, support_links, status, pricing_type, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



363
364
365
366
367
368
369
370
371
372
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 363

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



357
358
359
# File 'lib/oci/marketplace_publisher/models/create_listing_revision_details.rb', line 357

def to_s
  to_hash.to_s
end