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_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](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) 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](tools.ietf.org/html/rfc3339) 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
119 120 121 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 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 119 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](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment where the publication exists.
30 31 32 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 30 def compartment_id @compartment_id end |
#icon ⇒ OCI::Marketplace::Models::UploadData
45 46 47 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 45 def icon @icon end |
#id ⇒ String
**[Required]** The unique identifier for the publication in Marketplace.
34 35 36 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 34 def id @id end |
#lifecycle_state ⇒ String
**[Required]** The lifecycle state of the publication.
26 27 28 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 26 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.
57 58 59 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 57 def listing_type @listing_type end |
#name ⇒ String
**[Required]** The name of the publication, which is also used in the listing.
38 39 40 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 38 def name @name end |
#package_type ⇒ String
The listing's package type.
49 50 51 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 49 def package_type @package_type end |
#short_description ⇒ String
A short description of the publication to use in the listing.
42 43 44 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 42 def short_description @short_description end |
#supported_operating_systems ⇒ Array<OCI::Marketplace::Models::OperatingSystem>
The list of operating systems supported by the listing.
53 54 55 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 53 def @supported_operating_systems end |
#time_created ⇒ DateTime
The date and time the publication was created, expressed in [RFC 3339](tools.ietf.org/html/rfc3339) timestamp format.
Example: `2016-08-25T21:10:29.600Z`
65 66 67 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 65 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 68 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.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 86 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.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 207 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
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 246 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
226 227 228 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 226 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
235 236 237 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 235 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
279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 279 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
273 274 275 |
# File 'lib/oci/marketplace/models/publication_summary.rb', line 273 def to_s to_hash.to_s end |