Class: OCI::Devops::Models::ContainerInstanceConfig
- Inherits:
- 
      ContainerConfig
      
        - Object
- ContainerConfig
- OCI::Devops::Models::ContainerInstanceConfig
 
- Defined in:
- lib/oci/devops/models/container_instance_config.rb
Overview
Specifies ContainerInstance configuration.
Constant Summary
Constants inherited from ContainerConfig
OCI::Devops::Models::ContainerConfig::CONTAINER_CONFIG_TYPE_ENUM
Instance Attribute Summary collapse
- 
  
    
      #availability_domain  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Availability domain where the ContainerInstance will be created. 
- 
  
    
      #compartment_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The OCID of the compartment where the ContainerInstance will be created. 
- 
  
    
      #network_channel  ⇒ OCI::Devops::Models::NetworkChannel 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    This attribute is required. 
- 
  
    
      #shape_config  ⇒ OCI::Devops::Models::ShapeConfig 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    This attribute is required. 
- 
  
    
      #shape_name  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The shape of the ContainerInstance. 
Attributes inherited from ContainerConfig
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 = {})  ⇒ ContainerInstanceConfig 
    
    
  
  
  
    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 ContainerConfig
Constructor Details
#initialize(attributes = {}) ⇒ ContainerInstanceConfig
Initializes the object
| 71 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 102 103 104 105 106 107 108 109 110 | # File 'lib/oci/devops/models/container_instance_config.rb', line 71 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['containerConfigType'] = 'CONTAINER_INSTANCE_CONFIG' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 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.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain'] raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain') self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain'] self.shape_name = attributes[:'shapeName'] if attributes[:'shapeName'] raise 'You cannot provide both :shapeName and :shape_name' if attributes.key?(:'shapeName') && attributes.key?(:'shape_name') self.shape_name = attributes[:'shape_name'] if attributes[:'shape_name'] self.shape_config = attributes[:'shapeConfig'] if attributes[:'shapeConfig'] raise 'You cannot provide both :shapeConfig and :shape_config' if attributes.key?(:'shapeConfig') && attributes.key?(:'shape_config') self.shape_config = attributes[:'shape_config'] if attributes[:'shape_config'] self.network_channel = attributes[:'networkChannel'] if attributes[:'networkChannel'] raise 'You cannot provide both :networkChannel and :network_channel' if attributes.key?(:'networkChannel') && attributes.key?(:'network_channel') self.network_channel = attributes[:'network_channel'] if attributes[:'network_channel'] end | 
Instance Attribute Details
#availability_domain ⇒ String
Availability domain where the ContainerInstance will be created.
| 18 19 20 | # File 'lib/oci/devops/models/container_instance_config.rb', line 18 def availability_domain @availability_domain end | 
#compartment_id ⇒ String
The OCID of the compartment where the ContainerInstance will be created.
| 14 15 16 | # File 'lib/oci/devops/models/container_instance_config.rb', line 14 def compartment_id @compartment_id end | 
#network_channel ⇒ OCI::Devops::Models::NetworkChannel
This attribute is required.
| 30 31 32 | # File 'lib/oci/devops/models/container_instance_config.rb', line 30 def network_channel @network_channel end | 
#shape_config ⇒ OCI::Devops::Models::ShapeConfig
This attribute is required.
| 26 27 28 | # File 'lib/oci/devops/models/container_instance_config.rb', line 26 def shape_config @shape_config end | 
#shape_name ⇒ String
[Required] The shape of the ContainerInstance. The shape determines the resources available to the ContainerInstance.
| 22 23 24 | # File 'lib/oci/devops/models/container_instance_config.rb', line 22 def shape_name @shape_name end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 33 34 35 36 37 38 39 40 41 42 43 44 | # File 'lib/oci/devops/models/container_instance_config.rb', line 33 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'container_config_type': :'containerConfigType', 'compartment_id': :'compartmentId', 'availability_domain': :'availabilityDomain', 'shape_name': :'shapeName', 'shape_config': :'shapeConfig', 'network_channel': :'networkChannel' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 47 48 49 50 51 52 53 54 55 56 57 58 | # File 'lib/oci/devops/models/container_instance_config.rb', line 47 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'container_config_type': :'String', 'compartment_id': :'String', 'availability_domain': :'String', 'shape_name': :'String', 'shape_config': :'OCI::Devops::Models::ShapeConfig', 'network_channel': :'OCI::Devops::Models::NetworkChannel' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 119 120 121 122 123 124 125 126 127 128 129 | # File 'lib/oci/devops/models/container_instance_config.rb', line 119 def ==(other) return true if equal?(other) self.class == other.class && container_config_type == other.container_config_type && compartment_id == other.compartment_id && availability_domain == other.availability_domain && shape_name == other.shape_name && shape_config == other.shape_config && network_channel == other.network_channel end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | # File 'lib/oci/devops/models/container_instance_config.rb', line 154 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
| 134 135 136 | # File 'lib/oci/devops/models/container_instance_config.rb', line 134 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 143 144 145 | # File 'lib/oci/devops/models/container_instance_config.rb', line 143 def hash [container_config_type, compartment_id, availability_domain, shape_name, shape_config, network_channel].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 187 188 189 190 191 192 193 194 195 196 | # File 'lib/oci/devops/models/container_instance_config.rb', line 187 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
| 181 182 183 | # File 'lib/oci/devops/models/container_instance_config.rb', line 181 def to_s to_hash.to_s end |