Class: OCI::Marketplace::Models::PublicationSummary
- Inherits:
-
Object
- Object
- OCI::Marketplace::Models::PublicationSummary
- Defined in:
- lib/oci/marketplace/models/publication_summary.rb
Overview
The model for a summary of an Oracle Cloud Infrastructure publication.
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
- 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
-
#compartment_id ⇒ String
[Required] The OCID of the compartment where the publication exists.
- #icon ⇒ OCI::Marketplace::Models::UploadData
-
#id ⇒ String
[Required] The unique identifier for the publication in Marketplace.
-
#lifecycle_state ⇒ String
[Required] The lifecycle state of the publication.
-
#listing_type ⇒ String
[Required] The publisher category to which the publication belongs.
-
#name ⇒ String
[Required] The name of the publication, which is also used in the listing.
-
#package_type ⇒ String
The listing's package type.
-
#short_description ⇒ String
A short description of the publication to use in the listing.
-
#supported_operating_systems ⇒ Array<OCI::Marketplace::Models::OperatingSystem>
The list of operating systems supported by the listing.
-
#time_created ⇒ DateTime
The date and time the publication was created, expressed in RFC 3339 timestamp format.
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 = {}) ⇒ PublicationSummary
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 = {}) ⇒ PublicationSummary
Initializes the object
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 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 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 122 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.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] 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.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. = 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'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment where the publication exists.
33 34 35 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 33 def compartment_id @compartment_id end |
#icon ⇒ OCI::Marketplace::Models::UploadData
48 49 50 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 48 def icon @icon end |
#id ⇒ String
[Required] The unique identifier for the publication in Marketplace.
37 38 39 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 37 def id @id end |
#lifecycle_state ⇒ String
[Required] The lifecycle state of the publication.
29 30 31 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 29 def lifecycle_state @lifecycle_state end |
#listing_type ⇒ String
[Required] The publisher category to which the publication belongs. The publisher category informs where the listing appears for use.
60 61 62 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 60 def listing_type @listing_type end |
#name ⇒ String
[Required] The name of the publication, which is also used in the listing.
41 42 43 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 41 def name @name end |
#package_type ⇒ String
The listing's package type.
52 53 54 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 52 def package_type @package_type end |
#short_description ⇒ String
A short description of the publication to use in the listing.
45 46 47 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 45 def short_description @short_description end |
#supported_operating_systems ⇒ Array<OCI::Marketplace::Models::OperatingSystem>
The list of operating systems supported by the listing.
56 57 58 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 56 def @supported_operating_systems end |
#time_created ⇒ DateTime
The date and time the publication was created, expressed in RFC 3339 timestamp format.
Example: 2016-08-25T21:10:29.600Z
68 69 70 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 68 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 71 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'lifecycle_state': :'lifecycleState', 'compartment_id': :'compartmentId', 'id': :'id', 'name': :'name', 'short_description': :'shortDescription', 'icon': :'icon', 'package_type': :'packageType', 'supported_operating_systems': :'supportedOperatingSystems', 'listing_type': :'listingType', 'time_created': :'timeCreated' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 89 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'lifecycle_state': :'String', 'compartment_id': :'String', 'id': :'String', 'name': :'String', 'short_description': :'String', 'icon': :'OCI::Marketplace::Models::UploadData', 'package_type': :'String', 'supported_operating_systems': :'Array<OCI::Marketplace::Models::OperatingSystem>', 'listing_type': :'String', 'time_created': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 210 def ==(other) return true if equal?(other) self.class == other.class && lifecycle_state == other.lifecycle_state && compartment_id == other.compartment_id && id == other.id && name == other.name && short_description == other.short_description && icon == other.icon && package_type == other.package_type && == other. && listing_type == other.listing_type && time_created == other.time_created end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 249 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
229 230 231 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 229 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
238 239 240 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 238 def hash [lifecycle_state, compartment_id, id, name, short_description, icon, package_type, , listing_type, time_created].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
282 283 284 285 286 287 288 289 290 291 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 282 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
276 277 278 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 276 def to_s to_hash.to_s end |