Class: TurnkeyClient::CreateTvcDeploymentIntent
- Inherits:
-
Object
- Object
- TurnkeyClient::CreateTvcDeploymentIntent
- Defined in:
- lib/turnkey_client/models/create_tvc_deployment_intent.rb
Instance Attribute Summary collapse
-
#app_id ⇒ Object
The unique identifier of the to-be-deployed TVC application.
-
#debug_mode ⇒ Object
Optional flag to indicate whether to deploy the TVC app in debug mode, which includes additional logging and debugging tools.
-
#expected_pivot_digest ⇒ Object
Digest of the pivot binary in the pivot container.
-
#health_check_port ⇒ Object
Port to use for health checks.
-
#health_check_type ⇒ Object
Returns the value of attribute health_check_type.
-
#nonce ⇒ Object
Optional nonce to ensure uniqueness of the deployment manifest.
-
#pivot_args ⇒ Object
Arguments to pass to the pivot binary at startup.
-
#pivot_container_encrypted_pull_secret ⇒ Object
Optional encrypted pull secret to authorize Turnkey to pull the pivot container image.
-
#pivot_container_image_url ⇒ Object
URL of the container containing the pivot binary.
-
#pivot_path ⇒ Object
Location of the binary in the pivot container.
-
#public_ingress_port ⇒ Object
Port to use for public ingress.
-
#qos_version ⇒ Object
The QuorumOS version to use to deploy this application.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CreateTvcDeploymentIntent
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CreateTvcDeploymentIntent
Initializes the object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 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 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 97 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcDeploymentIntent` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcDeploymentIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'app_id') self.app_id = attributes[:'app_id'] end if attributes.key?(:'qos_version') self.qos_version = attributes[:'qos_version'] end if attributes.key?(:'pivot_container_image_url') self.pivot_container_image_url = attributes[:'pivot_container_image_url'] end if attributes.key?(:'pivot_path') self.pivot_path = attributes[:'pivot_path'] end if attributes.key?(:'pivot_args') if (value = attributes[:'pivot_args']).is_a?(Array) self.pivot_args = value end end if attributes.key?(:'expected_pivot_digest') self.expected_pivot_digest = attributes[:'expected_pivot_digest'] end if attributes.key?(:'nonce') self.nonce = attributes[:'nonce'] end if attributes.key?(:'pivot_container_encrypted_pull_secret') self.pivot_container_encrypted_pull_secret = attributes[:'pivot_container_encrypted_pull_secret'] end if attributes.key?(:'debug_mode') self.debug_mode = attributes[:'debug_mode'] end if attributes.key?(:'health_check_type') self.health_check_type = attributes[:'health_check_type'] end if attributes.key?(:'health_check_port') self.health_check_port = attributes[:'health_check_port'] end if attributes.key?(:'public_ingress_port') self.public_ingress_port = attributes[:'public_ingress_port'] end end |
Instance Attribute Details
#app_id ⇒ Object
The unique identifier of the to-be-deployed TVC application
16 17 18 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 16 def app_id @app_id end |
#debug_mode ⇒ Object
Optional flag to indicate whether to deploy the TVC app in debug mode, which includes additional logging and debugging tools. Default is false.
40 41 42 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 40 def debug_mode @debug_mode end |
#expected_pivot_digest ⇒ Object
Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity.
31 32 33 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 31 def expected_pivot_digest @expected_pivot_digest end |
#health_check_port ⇒ Object
Port to use for health checks.
45 46 47 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 45 def health_check_port @health_check_port end |
#health_check_type ⇒ Object
Returns the value of attribute health_check_type.
42 43 44 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 42 def health_check_type @health_check_type end |
#nonce ⇒ Object
Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds.
34 35 36 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 34 def nonce @nonce end |
#pivot_args ⇒ Object
Arguments to pass to the pivot binary at startup. Encoded as a list of strings, for example ["–foo", "bar"]
28 29 30 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 28 def pivot_args @pivot_args end |
#pivot_container_encrypted_pull_secret ⇒ Object
Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty.
37 38 39 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 37 def pivot_container_encrypted_pull_secret @pivot_container_encrypted_pull_secret end |
#pivot_container_image_url ⇒ Object
URL of the container containing the pivot binary
22 23 24 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 22 def pivot_container_image_url @pivot_container_image_url end |
#pivot_path ⇒ Object
Location of the binary in the pivot container
25 26 27 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 25 def pivot_path @pivot_path end |
#public_ingress_port ⇒ Object
Port to use for public ingress.
48 49 50 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 48 def public_ingress_port @public_ingress_port end |
#qos_version ⇒ Object
The QuorumOS version to use to deploy this application
19 20 21 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 19 def qos_version @qos_version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 51 def self.attribute_map { :'app_id' => :'appId', :'qos_version' => :'qosVersion', :'pivot_container_image_url' => :'pivotContainerImageUrl', :'pivot_path' => :'pivotPath', :'pivot_args' => :'pivotArgs', :'expected_pivot_digest' => :'expectedPivotDigest', :'nonce' => :'nonce', :'pivot_container_encrypted_pull_secret' => :'pivotContainerEncryptedPullSecret', :'debug_mode' => :'debugMode', :'health_check_type' => :'healthCheckType', :'health_check_port' => :'healthCheckPort', :'public_ingress_port' => :'publicIngressPort' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
253 254 255 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 253 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
87 88 89 90 91 92 93 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 87 def self.openapi_nullable Set.new([ :'nonce', :'pivot_container_encrypted_pull_secret', :'debug_mode', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 69 def self.openapi_types { :'app_id' => :'Object', :'qos_version' => :'Object', :'pivot_container_image_url' => :'Object', :'pivot_path' => :'Object', :'pivot_args' => :'Object', :'expected_pivot_digest' => :'Object', :'nonce' => :'Object', :'pivot_container_encrypted_pull_secret' => :'Object', :'debug_mode' => :'Object', :'health_check_type' => :'Object', :'health_check_port' => :'Object', :'public_ingress_port' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 221 def ==(o) return true if self.equal?(o) self.class == o.class && app_id == o.app_id && qos_version == o.qos_version && pivot_container_image_url == o.pivot_container_image_url && pivot_path == o.pivot_path && pivot_args == o.pivot_args && expected_pivot_digest == o.expected_pivot_digest && nonce == o.nonce && pivot_container_encrypted_pull_secret == o.pivot_container_encrypted_pull_secret && debug_mode == o.debug_mode && health_check_type == o.health_check_type && health_check_port == o.health_check_port && public_ingress_port == o.public_ingress_port end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 283 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model TurnkeyClient.const_get(type).build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
352 353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 352 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 260 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) end end self end |
#eql?(o) ⇒ Boolean
240 241 242 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 240 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
246 247 248 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 246 def hash [app_id, qos_version, pivot_container_image_url, pivot_path, pivot_args, expected_pivot_digest, nonce, pivot_container_encrypted_pull_secret, debug_mode, health_check_type, health_check_port, public_ingress_port].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 163 def list_invalid_properties invalid_properties = Array.new if @app_id.nil? invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') end if @qos_version.nil? invalid_properties.push('invalid value for "qos_version", qos_version cannot be nil.') end if @pivot_container_image_url.nil? invalid_properties.push('invalid value for "pivot_container_image_url", pivot_container_image_url cannot be nil.') end if @pivot_path.nil? invalid_properties.push('invalid value for "pivot_path", pivot_path cannot be nil.') end if @pivot_args.nil? invalid_properties.push('invalid value for "pivot_args", pivot_args cannot be nil.') end if @expected_pivot_digest.nil? invalid_properties.push('invalid value for "expected_pivot_digest", expected_pivot_digest cannot be nil.') end if @health_check_type.nil? invalid_properties.push('invalid value for "health_check_type", health_check_type cannot be nil.') end if @health_check_port.nil? invalid_properties.push('invalid value for "health_check_port", health_check_port cannot be nil.') end if @public_ingress_port.nil? invalid_properties.push('invalid value for "public_ingress_port", public_ingress_port cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
328 329 330 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 328 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 334 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
322 323 324 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 322 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/turnkey_client/models/create_tvc_deployment_intent.rb', line 206 def valid? return false if @app_id.nil? return false if @qos_version.nil? return false if @pivot_container_image_url.nil? return false if @pivot_path.nil? return false if @pivot_args.nil? return false if @expected_pivot_digest.nil? return false if @health_check_type.nil? return false if @health_check_port.nil? return false if @public_ingress_port.nil? true end |