Class: SDM::ProxyClusterKey
- Inherits:
-
Object
- Object
- SDM::ProxyClusterKey
- Defined in:
- lib/models/porcelain.rb
Overview
Proxy Cluster Keys are authentication keys for all proxies within a cluster. The proxies within a cluster share the same key. One cluster can have multiple keys in order to facilitate key rotation.
Instance Attribute Summary collapse
-
#created_at ⇒ Object
The timestamp when this key was created.
-
#id ⇒ Object
Unique identifier of the Relay.
-
#last_used_at ⇒ Object
The timestamp when this key was last used, if at all.
-
#proxy_cluster_id ⇒ Object
The ID of the proxy cluster which this key authenticates to.
Instance Method Summary collapse
-
#initialize(created_at: nil, id: nil, last_used_at: nil, proxy_cluster_id: nil) ⇒ ProxyClusterKey
constructor
A new instance of ProxyClusterKey.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(created_at: nil, id: nil, last_used_at: nil, proxy_cluster_id: nil) ⇒ ProxyClusterKey
Returns a new instance of ProxyClusterKey.
12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 |
# File 'lib/models/porcelain.rb', line 12458 def initialize( created_at: nil, id: nil, last_used_at: nil, proxy_cluster_id: nil ) @created_at = created_at == nil ? nil : created_at @id = id == nil ? "" : id @last_used_at = last_used_at == nil ? nil : last_used_at @proxy_cluster_id = proxy_cluster_id == nil ? "" : proxy_cluster_id end |
Instance Attribute Details
#created_at ⇒ Object
The timestamp when this key was created.
12450 12451 12452 |
# File 'lib/models/porcelain.rb', line 12450 def created_at @created_at end |
#id ⇒ Object
Unique identifier of the Relay.
12452 12453 12454 |
# File 'lib/models/porcelain.rb', line 12452 def id @id end |
#last_used_at ⇒ Object
The timestamp when this key was last used, if at all.
12454 12455 12456 |
# File 'lib/models/porcelain.rb', line 12454 def last_used_at @last_used_at end |
#proxy_cluster_id ⇒ Object
The ID of the proxy cluster which this key authenticates to.
12456 12457 12458 |
# File 'lib/models/porcelain.rb', line 12456 def proxy_cluster_id @proxy_cluster_id end |
Instance Method Details
#to_json(options = {}) ⇒ Object
12470 12471 12472 12473 12474 12475 12476 |
# File 'lib/models/porcelain.rb', line 12470 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |