# frozen_string_literal: true module NgrokAPI module Models class SSHCertificateAuthority attr_reader :client, :attrs, :id, :uri, :created_at, :description, :metadata, :public_key, :key_type def initialize(client: nil, attrs: {}) @client = client @attrs = attrs @id = @attrs['id'] @uri = @attrs['uri'] @created_at = @attrs['created_at'] @description = @attrs['description'] @metadata = @attrs['metadata'] @public_key = @attrs['public_key'] @key_type = @attrs['key_type'] end def ==(other) @attrs == other.attrs end def to_s @attrs.to_s end def to_h @attrs.to_h end ## # Delete an SSH Certificate Authority # # https://ngrok.com/docs/api#api-ssh-certificate-authorities-delete def delete @client.delete( id: @id ) end ## # Update an SSH Certificate Authority # # https://ngrok.com/docs/api#api-ssh-certificate-authorities-update def update( description: nil, metadata: nil ) @description = description if description @metadata = metadata if metadata @client.update( id: @id, description: description, metadata: metadata ) end end end end