Class: OCI::ServiceCatalog::Models::ApplicationSummary
- Inherits:
-
Object
- Object
- OCI::ServiceCatalog::Models::ApplicationSummary
- Defined in:
- lib/oci/service_catalog/models/application_summary.rb
Overview
The model for summary of an application in service catalog.
Constant Summary collapse
- PRICING_TYPE_ENUM =
[ PRICING_TYPE_FREE = 'FREE'.freeze, PRICING_TYPE_BYOL = 'BYOL'.freeze, PRICING_TYPE_PAYGO = 'PAYGO'.freeze, PRICING_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PACKAGE_TYPE_ENUM =
[ PACKAGE_TYPE_STACK = 'STACK'.freeze, PACKAGE_TYPE_IMAGE = 'IMAGE'.freeze, PACKAGE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#categories ⇒ Array<String>
Product categories that the application belongs to.
-
#display_name ⇒ String
[Required] The name that service catalog should use to display this application.
-
#entity_id ⇒ String
[Required] Identifier of the application from a service catalog.
-
#entity_type ⇒ String
[Required] The type of an application in the service catalog.
-
#is_featured ⇒ BOOLEAN
Indicates whether the application is featured.
- #logo ⇒ OCI::ServiceCatalog::Models::UploadData
-
#package_type ⇒ String
The type of the packages withing the application.
-
#pricing_type ⇒ String
Summary of the pricing types available across all packages in the application.
- #publisher ⇒ OCI::ServiceCatalog::Models::PublisherSummary
-
#short_description ⇒ String
A short description of the application.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys.
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 = {}) ⇒ ApplicationSummary
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 = {}) ⇒ ApplicationSummary
Initializes the object
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 176 177 178 179 180 181 182 183 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 124 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.entity_id = attributes[:'entityId'] if attributes[:'entityId'] raise 'You cannot provide both :entityId and :entity_id' if attributes.key?(:'entityId') && attributes.key?(:'entity_id') self.entity_id = attributes[:'entity_id'] if attributes[:'entity_id'] self.entity_type = attributes[:'entityType'] if attributes[:'entityType'] raise 'You cannot provide both :entityType and :entity_type' if attributes.key?(:'entityType') && attributes.key?(:'entity_type') self.entity_type = attributes[:'entity_type'] if attributes[:'entity_type'] 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.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? self.publisher = attributes[:'publisher'] if attributes[:'publisher'] 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.logo = attributes[:'logo'] if attributes[:'logo'] 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.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.categories = attributes[:'categories'] if attributes[:'categories'] self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#categories ⇒ Array<String>
Product categories that the application belongs to.
61 62 63 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 61 def categories @categories end |
#display_name ⇒ String
[Required] The name that service catalog should use to display this application.
35 36 37 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 35 def display_name @display_name end |
#entity_id ⇒ String
[Required] Identifier of the application from a service catalog.
27 28 29 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 27 def entity_id @entity_id end |
#entity_type ⇒ String
[Required] The type of an application in the service catalog.
31 32 33 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 31 def entity_type @entity_type end |
#is_featured ⇒ BOOLEAN
Indicates whether the application is featured.
39 40 41 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 39 def is_featured @is_featured end |
#logo ⇒ OCI::ServiceCatalog::Models::UploadData
49 50 51 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 49 def logo @logo end |
#package_type ⇒ String
The type of the packages withing the application.
57 58 59 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 57 def package_type @package_type end |
#pricing_type ⇒ String
Summary of the pricing types available across all packages in the application.
53 54 55 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 53 def pricing_type @pricing_type end |
#publisher ⇒ OCI::ServiceCatalog::Models::PublisherSummary
42 43 44 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 42 def publisher @publisher end |
#short_description ⇒ String
A short description of the application.
46 47 48 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 46 def short_description @short_description end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
67 68 69 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 67 def @system_tags end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 70 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'entity_id': :'entityId', 'entity_type': :'entityType', 'display_name': :'displayName', 'is_featured': :'isFeatured', 'publisher': :'publisher', 'short_description': :'shortDescription', 'logo': :'logo', 'pricing_type': :'pricingType', 'package_type': :'packageType', 'categories': :'categories', 'system_tags': :'systemTags' # 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 105 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 89 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'entity_id': :'String', 'entity_type': :'String', 'display_name': :'String', 'is_featured': :'BOOLEAN', 'publisher': :'OCI::ServiceCatalog::Models::PublisherSummary', 'short_description': :'String', 'logo': :'OCI::ServiceCatalog::Models::UploadData', 'pricing_type': :'String', 'package_type': :'String', 'categories': :'Array<String>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 218 def ==(other) return true if equal?(other) self.class == other.class && entity_id == other.entity_id && entity_type == other.entity_type && display_name == other.display_name && is_featured == other.is_featured && publisher == other.publisher && short_description == other.short_description && logo == other.logo && pricing_type == other.pricing_type && package_type == other.package_type && categories == other.categories && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 258 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
238 239 240 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 238 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
247 248 249 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 247 def hash [entity_id, entity_type, display_name, is_featured, publisher, short_description, logo, pricing_type, package_type, categories, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
291 292 293 294 295 296 297 298 299 300 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 291 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
285 286 287 |
# File 'lib/oci/service_catalog/models/application_summary.rb', line 285 def to_s to_hash.to_s end |