Class: NgrokAPI::Models::SSHUserCertificate
- Inherits:
-
Object
- Object
- NgrokAPI::Models::SSHUserCertificate
- Defined in:
- lib/ngrokapi/models/ssh_user_certificate.rb
Instance Attribute Summary collapse
-
#certificate ⇒ Object
readonly
Returns the value of attribute certificate.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#critical_options ⇒ Object
readonly
Returns the value of attribute critical_options.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#extensions ⇒ Object
readonly
Returns the value of attribute extensions.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key_type ⇒ Object
readonly
Returns the value of attribute key_type.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#principals ⇒ Object
readonly
Returns the value of attribute principals.
-
#public_key ⇒ Object
readonly
Returns the value of attribute public_key.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#ssh_certificate_authority_id ⇒ Object
readonly
Returns the value of attribute ssh_certificate_authority_id.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
-
#valid_after ⇒ Object
readonly
Returns the value of attribute valid_after.
-
#valid_until ⇒ Object
readonly
Returns the value of attribute valid_until.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#delete ⇒ Object
Delete an SSH User Certificate.
-
#initialize(client:, result:) ⇒ SSHUserCertificate
constructor
A new instance of SSHUserCertificate.
- #to_s ⇒ Object
-
#update(description: nil, metadata: nil) ⇒ Object
Update an SSH User Certificate.
Constructor Details
#initialize(client:, result:) ⇒ SSHUserCertificate
Returns a new instance of SSHUserCertificate.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 23 def initialize(client:, result:) @client = client @result = result @id = @result['id'] @uri = @result['uri'] @created_at = @result['created_at'] @description = @result['description'] @metadata = @result['metadata'] @public_key = @result['public_key'] @key_type = @result['key_type'] @ssh_certificate_authority_id = @result['ssh_certificate_authority_id'] @principals = @result['principals'] @critical_options = @result['critical_options'] @extensions = @result['extensions'] @valid_after = @result['valid_after'] @valid_until = @result['valid_until'] @certificate = @result['certificate'] end |
Instance Attribute Details
#certificate ⇒ Object (readonly)
Returns the value of attribute certificate.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def certificate @certificate end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def client @client end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def created_at @created_at end |
#critical_options ⇒ Object (readonly)
Returns the value of attribute critical_options.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def @critical_options end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def description @description end |
#extensions ⇒ Object (readonly)
Returns the value of attribute extensions.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def extensions @extensions end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def id @id end |
#key_type ⇒ Object (readonly)
Returns the value of attribute key_type.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def key_type @key_type end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def @metadata end |
#principals ⇒ Object (readonly)
Returns the value of attribute principals.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def principals @principals end |
#public_key ⇒ Object (readonly)
Returns the value of attribute public_key.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def public_key @public_key end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def result @result end |
#ssh_certificate_authority_id ⇒ Object (readonly)
Returns the value of attribute ssh_certificate_authority_id.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def @ssh_certificate_authority_id end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def uri @uri end |
#valid_after ⇒ Object (readonly)
Returns the value of attribute valid_after.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def valid_after @valid_after end |
#valid_until ⇒ Object (readonly)
Returns the value of attribute valid_until.
6 7 8 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 6 def valid_until @valid_until end |
Instance Method Details
#==(other) ⇒ Object
42 43 44 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 42 def ==(other) @result == other.result end |
#delete ⇒ Object
Delete an SSH User Certificate
54 55 56 57 58 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 54 def delete @client.delete( id: @id ) end |
#to_s ⇒ Object
46 47 48 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 46 def to_s @result.to_s end |
#update(description: nil, metadata: nil) ⇒ Object
Update an SSH User Certificate
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/ngrokapi/models/ssh_user_certificate.rb', line 64 def update( description: nil, metadata: nil ) @description = description if description @metadata = if @client.update( id: @id, description: description, metadata: ) end |