Class: NgrokAPI::Models::KubernetesOperator
- Inherits:
-
Object
- Object
- NgrokAPI::Models::KubernetesOperator
- Defined in:
- lib/ngrokapi/models/kubernetes_operator.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#binding ⇒ Object
readonly
Returns the value of attribute binding.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#deployment ⇒ Object
readonly
Returns the value of attribute deployment.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#enabled_features ⇒ Object
readonly
Returns the value of attribute enabled_features.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#principal ⇒ Object
readonly
Returns the value of attribute principal.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#delete ⇒ Object
Delete a Kubernetes Operator.
-
#initialize(client: nil, attrs: {}) ⇒ KubernetesOperator
constructor
A new instance of KubernetesOperator.
- #to_h ⇒ Object
- #to_s ⇒ Object
-
#update(description: nil, metadata: nil, enabled_features: nil, region: nil, binding: nil, deployment: nil) ⇒ Object
Update an existing Kubernetes operator by ID.
Constructor Details
#initialize(client: nil, attrs: {}) ⇒ KubernetesOperator
Returns a new instance of KubernetesOperator.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 24 def initialize(client: nil, attrs: {}) @client = client @attrs = attrs @id = @attrs['id'] unless @attrs['uri'].nil? @uri = URI(@attrs['uri']) end @created_at = @attrs['created_at'] @updated_at = @attrs['updated_at'] @description = @attrs['description'] @metadata = @attrs['metadata'] @principal = @attrs['principal'] @enabled_features = @attrs['enabled_features'] @region = @attrs['region'] @deployment = @attrs['deployment'] @binding = @attrs['binding'] end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def attrs @attrs end |
#binding ⇒ Object (readonly)
Returns the value of attribute binding.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def binding @binding end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def client @client end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def created_at @created_at end |
#deployment ⇒ Object (readonly)
Returns the value of attribute deployment.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def deployment @deployment end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def description @description end |
#enabled_features ⇒ Object (readonly)
Returns the value of attribute enabled_features.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def enabled_features @enabled_features end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def @metadata end |
#principal ⇒ Object (readonly)
Returns the value of attribute principal.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def principal @principal end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def region @region end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def updated_at @updated_at end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
10 11 12 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 10 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object
42 43 44 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 42 def ==(other) @attrs == other.attrs end |
#delete ⇒ Object
Delete a Kubernetes Operator
87 88 89 90 91 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 87 def delete @client.delete( id: @id ) end |
#to_h ⇒ Object
50 51 52 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 50 def to_h @attrs.to_h end |
#to_s ⇒ Object
46 47 48 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 46 def to_s @attrs.to_s end |
#update(description: nil, metadata: nil, enabled_features: nil, region: nil, binding: nil, deployment: nil) ⇒ Object
Update an existing Kubernetes operator by ID.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/ngrokapi/models/kubernetes_operator.rb', line 58 def update( description: nil, metadata: nil, enabled_features: nil, region: nil, binding: nil, deployment: nil ) @description = description if description @metadata = if @enabled_features = enabled_features if enabled_features @region = region if region @binding = binding if binding @deployment = deployment if deployment @client.update( id: @id, description: description, metadata: , enabled_features: enabled_features, region: region, binding: binding, deployment: deployment ) end |