Class: OCI::MarketplacePublisher::Models::CreateOciListingRevisionDetails

Inherits:
CreateListingRevisionDetails show all
Defined in:
lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb

Overview

Listing revision update details for listings

Constant Summary

Constants inherited from CreateListingRevisionDetails

OCI::MarketplacePublisher::Models::CreateListingRevisionDetails::LISTING_TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from CreateListingRevisionDetails

#content_language, #defined_tags, #display_name, #freeform_tags, #headline, #keywords, #listing_id, #listing_type, #long_description, #short_description, #status, #support_contacts, #support_links, #supportedlanguages, #tagline, #usage_information

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CreateListingRevisionDetails

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ CreateOciListingRevisionDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



143
144
145
146
147
148
149
150
151
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 143

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  attributes['listingType'] = 'OCI_APPLICATION'

  super(attributes)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

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

  self.pricing_plans = attributes[:'pricingPlans'] if attributes[:'pricingPlans']

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

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

  self.vanity_url = attributes[:'vanityUrl'] if attributes[:'vanityUrl']

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

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

  self.recommended_service_provider_listing_ids = attributes[:'recommendedServiceProviderListingIds'] if attributes[:'recommendedServiceProviderListingIds']

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

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

  self.availability_and_pricing_policy = attributes[:'availabilityAndPricingPolicy'] if attributes[:'availabilityAndPricingPolicy']

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

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

  self.is_rover_exportable = attributes[:'isRoverExportable'] unless attributes[:'isRoverExportable'].nil?

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

Instance Attribute Details

#availability_and_pricing_policyString

Listing availability and Pricing Policy statement.

Returns:

  • (String)


41
42
43
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 41

def availability_and_pricing_policy
  @availability_and_pricing_policy
end

#is_rover_exportableBOOLEAN

Is this listing rover exportable

Returns:

  • (BOOLEAN)


45
46
47
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 45

def is_rover_exportable
  @is_rover_exportable
end

#pricing_plansArray<OCI::MarketplacePublisher::Models::PricingPlan>

List of Pricing Plans provider by publisher.



29
30
31
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 29

def pricing_plans
  @pricing_plans
end

#pricing_typeString

[Required] The pricing model for the listing revision.

Returns:

  • (String)


21
22
23
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 21

def pricing_type
  @pricing_type
end

#productsArray<OCI::MarketplacePublisher::Models::ListingProduct>

[Required] List of Products subscribed by listing.



25
26
27
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 25

def products
  @products
end

OCIDs of service listings attached to lead gen listing

Returns:

  • (Array<String>)


37
38
39
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 37

def recommended_service_provider_listing_ids
  @recommended_service_provider_listing_ids
end

#system_requirementsString

System requirements for the listing revision.

Returns:

  • (String)


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

def system_requirements
  @system_requirements
end

#vanity_urlString

Custom link to the listing

Returns:

  • (String)


33
34
35
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 33

def vanity_url
  @vanity_url
end

#version_detailsOCI::MarketplacePublisher::Models::VersionDetails



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

def version_details
  @version_details
end

Class Method Details

.attribute_mapObject

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



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 48

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'displayName',
    'listing_id': :'listingId',
    'listing_type': :'listingType',
    'headline': :'headline',
    'tagline': :'tagline',
    'keywords': :'keywords',
    'short_description': :'shortDescription',
    'usage_information': :'usageInformation',
    'long_description': :'longDescription',
    'content_language': :'contentLanguage',
    'supportedlanguages': :'supportedlanguages',
    'support_contacts': :'supportContacts',
    'support_links': :'supportLinks',
    'status': :'status',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'version_details': :'versionDetails',
    'system_requirements': :'systemRequirements',
    'pricing_type': :'pricingType',
    'products': :'products',
    'pricing_plans': :'pricingPlans',
    'vanity_url': :'vanityUrl',
    'recommended_service_provider_listing_ids': :'recommendedServiceProviderListingIds',
    'availability_and_pricing_policy': :'availabilityAndPricingPolicy',
    'is_rover_exportable': :'isRoverExportable'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 81

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'String',
    'listing_id': :'String',
    'listing_type': :'String',
    'headline': :'String',
    'tagline': :'String',
    'keywords': :'String',
    'short_description': :'String',
    'usage_information': :'String',
    'long_description': :'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',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'version_details': :'OCI::MarketplacePublisher::Models::VersionDetails',
    'system_requirements': :'String',
    'pricing_type': :'String',
    'products': :'Array<OCI::MarketplacePublisher::Models::ListingProduct>',
    'pricing_plans': :'Array<OCI::MarketplacePublisher::Models::PricingPlan>',
    'vanity_url': :'String',
    'recommended_service_provider_listing_ids': :'Array<String>',
    'availability_and_pricing_policy': :'String',
    'is_rover_exportable': :'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



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

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

  self.class == other.class &&
    display_name == other.display_name &&
    listing_id == other.listing_id &&
    listing_type == other.listing_type &&
    headline == other.headline &&
    tagline == other.tagline &&
    keywords == other.keywords &&
    short_description == other.short_description &&
    usage_information == other.usage_information &&
    long_description == other.long_description &&
    content_language == other.content_language &&
    supportedlanguages == other.supportedlanguages &&
    support_contacts == other.support_contacts &&
    support_links == other.support_links &&
    status == other.status &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    version_details == other.version_details &&
    system_requirements == other.system_requirements &&
    pricing_type == other.pricing_type &&
    products == other.products &&
    pricing_plans == other.pricing_plans &&
    vanity_url == other.vanity_url &&
    recommended_service_provider_listing_ids == other.recommended_service_provider_listing_ids &&
    availability_and_pricing_policy == other.availability_and_pricing_policy &&
    is_rover_exportable == other.is_rover_exportable
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



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 265

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


245
246
247
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 245

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



254
255
256
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 254

def hash
  [display_name, listing_id, listing_type, headline, tagline, keywords, short_description, usage_information, long_description, content_language, supportedlanguages, support_contacts, support_links, status, freeform_tags, defined_tags, version_details, system_requirements, pricing_type, products, pricing_plans, vanity_url, recommended_service_provider_listing_ids, availability_and_pricing_policy, is_rover_exportable].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



298
299
300
301
302
303
304
305
306
307
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 298

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



292
293
294
# File 'lib/oci/marketplace_publisher/models/create_oci_listing_revision_details.rb', line 292

def to_s
  to_hash.to_s
end