Class: OCI::FleetAppsManagement::Models::CatalogSourceTemplateConfig
- Inherits:
-
CatalogSourcePayload
- Object
- CatalogSourcePayload
- OCI::FleetAppsManagement::Models::CatalogSourceTemplateConfig
- Defined in:
- lib/oci/fleet_apps_management/models/catalog_source_template_config.rb
Overview
Catalog source template config.
Instance Attribute Summary collapse
-
#description ⇒ String
Template Description.
-
#long_description ⇒ String
Template Long Description.
-
#template_display_name ⇒ String
Template Display Name.
-
#zip_file_base64_encoded ⇒ String
The Base64 encoded template.
Attributes inherited from CatalogSourcePayload
#config_source_type, #working_directory
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 = {}) ⇒ CatalogSourceTemplateConfig
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.
Methods inherited from CatalogSourcePayload
Constructor Details
#initialize(attributes = {}) ⇒ CatalogSourceTemplateConfig
Initializes the object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 72 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['configSourceType'] = 'STACK_TEMPLATE_CATALOG_SOURCE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.zip_file_base64_encoded = attributes[:'zipFileBase64Encoded'] if attributes[:'zipFileBase64Encoded'] raise 'You cannot provide both :zipFileBase64Encoded and :zip_file_base64_encoded' if attributes.key?(:'zipFileBase64Encoded') && attributes.key?(:'zip_file_base64_encoded') self.zip_file_base64_encoded = attributes[:'zip_file_base64_encoded'] if attributes[:'zip_file_base64_encoded'] self.description = attributes[:'description'] if attributes[:'description'] 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.template_display_name = attributes[:'templateDisplayName'] if attributes[:'templateDisplayName'] raise 'You cannot provide both :templateDisplayName and :template_display_name' if attributes.key?(:'templateDisplayName') && attributes.key?(:'template_display_name') self.template_display_name = attributes[:'template_display_name'] if attributes[:'template_display_name'] end |
Instance Attribute Details
#description ⇒ String
Template Description
21 22 23 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 21 def description @description end |
#long_description ⇒ String
Template Long Description
26 27 28 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 26 def long_description @long_description end |
#template_display_name ⇒ String
Template Display Name
31 32 33 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 31 def template_display_name @template_display_name end |
#zip_file_base64_encoded ⇒ String
The Base64 encoded template. This payload will trigger CreateTemplate API, where the parameter will be passed.
16 17 18 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 16 def zip_file_base64_encoded @zip_file_base64_encoded end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 34 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'config_source_type': :'configSourceType', 'working_directory': :'workingDirectory', 'zip_file_base64_encoded': :'zipFileBase64Encoded', 'description': :'description', 'long_description': :'longDescription', 'template_display_name': :'templateDisplayName' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 48 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'config_source_type': :'String', 'working_directory': :'String', 'zip_file_base64_encoded': :'String', 'description': :'String', 'long_description': :'String', 'template_display_name': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 110 def ==(other) return true if equal?(other) self.class == other.class && config_source_type == other.config_source_type && working_directory == other.working_directory && zip_file_base64_encoded == other.zip_file_base64_encoded && description == other.description && long_description == other.long_description && template_display_name == other.template_display_name end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 145 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
125 126 127 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 125 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
134 135 136 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 134 def hash [config_source_type, working_directory, zip_file_base64_encoded, description, long_description, template_display_name].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 178 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
172 173 174 |
# File 'lib/oci/fleet_apps_management/models/catalog_source_template_config.rb', line 172 def to_s to_hash.to_s end |