Class: ApolloDeploySignalSdkRails::ApiKey
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::ApiKey
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: ApiKey
Instance Attribute Summary collapse
- #config_id ⇒ String
- #created_at ⇒ String
- #enabled ⇒ Boolean
- #expires_at ⇒ String?
- #id ⇒ String
- #last_request ⇒ String?
- #metadata ⇒ Hash{String => String}
- #name ⇒ String?
- #organization_id ⇒ String
- #permissions ⇒ Hash{String => Array<String>}
- #prefix ⇒ String?
- #project_id ⇒ String?
- #rate_limit_enabled ⇒ Boolean
- #rate_limit_max ⇒ Integer?
- #rate_limit_time_window ⇒ Integer?
- #remaining ⇒ Integer?
- #request_count ⇒ Integer
- #start ⇒ String?
- #updated_at ⇒ String
Class Method Summary collapse
-
.from_json(attributes) ⇒ ApiKey
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(id:, config_id:, name:, start:, prefix:, organization_id:, project_id:, enabled:, rate_limit_enabled:, rate_limit_time_window:, rate_limit_max:, request_count:, remaining:, last_request:, expires_at:, created_at:, updated_at:, metadata:, permissions:) ⇒ ApiKey
constructor
A new instance of ApiKey.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(id:, config_id:, name:, start:, prefix:, organization_id:, project_id:, enabled:, rate_limit_enabled:, rate_limit_time_window:, rate_limit_max:, request_count:, remaining:, last_request:, expires_at:, created_at:, updated_at:, metadata:, permissions:) ⇒ ApiKey
Returns a new instance of ApiKey.
3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3710 def initialize(id: , config_id: , name: , start: , prefix: , organization_id: , project_id: , enabled: , rate_limit_enabled: , rate_limit_time_window: , rate_limit_max: , request_count: , remaining: , last_request: , expires_at: , created_at: , updated_at: , metadata: , permissions: ) @id = id @config_id = config_id @name = name @start = start @prefix = prefix @organization_id = organization_id @project_id = project_id @enabled = enabled @rate_limit_enabled = rate_limit_enabled @rate_limit_time_window = rate_limit_time_window @rate_limit_max = rate_limit_max @request_count = request_count @remaining = remaining @last_request = last_request @expires_at = expires_at @created_at = created_at @updated_at = updated_at @metadata = @permissions = end |
Instance Attribute Details
#config_id ⇒ String
3673 3674 3675 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3673 def config_id @config_id end |
#created_at ⇒ String
3701 3702 3703 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3701 def created_at @created_at end |
#enabled ⇒ Boolean
3685 3686 3687 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3685 def enabled @enabled end |
#expires_at ⇒ String?
3699 3700 3701 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3699 def expires_at @expires_at end |
#id ⇒ String
3671 3672 3673 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3671 def id @id end |
#last_request ⇒ String?
3697 3698 3699 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3697 def last_request @last_request end |
#metadata ⇒ Hash{String => String}
3705 3706 3707 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3705 def @metadata end |
#name ⇒ String?
3675 3676 3677 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3675 def name @name end |
#organization_id ⇒ String
3681 3682 3683 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3681 def organization_id @organization_id end |
#permissions ⇒ Hash{String => Array<String>}
3707 3708 3709 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3707 def @permissions end |
#prefix ⇒ String?
3679 3680 3681 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3679 def prefix @prefix end |
#project_id ⇒ String?
3683 3684 3685 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3683 def project_id @project_id end |
#rate_limit_enabled ⇒ Boolean
3687 3688 3689 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3687 def rate_limit_enabled @rate_limit_enabled end |
#rate_limit_max ⇒ Integer?
3691 3692 3693 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3691 def rate_limit_max @rate_limit_max end |
#rate_limit_time_window ⇒ Integer?
3689 3690 3691 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3689 def rate_limit_time_window @rate_limit_time_window end |
#remaining ⇒ Integer?
3695 3696 3697 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3695 def remaining @remaining end |
#request_count ⇒ Integer
3693 3694 3695 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3693 def request_count @request_count end |
#start ⇒ String?
3677 3678 3679 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3677 def start @start end |
#updated_at ⇒ String
3703 3704 3705 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3703 def updated_at @updated_at end |
Class Method Details
.from_json(attributes) ⇒ ApiKey
Create an instance from a parsed JSON hash.
3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3760 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( id: attributes.key?("id") ? attributes["id"] : attributes[:id], config_id: attributes.key?("configId") ? attributes["configId"] : attributes[:config_id], name: attributes.key?("name") ? attributes["name"] : attributes[:name], start: attributes.key?("start") ? attributes["start"] : attributes[:start], prefix: attributes.key?("prefix") ? attributes["prefix"] : attributes[:prefix], organization_id: attributes.key?("organizationId") ? attributes["organizationId"] : attributes[:organization_id], project_id: attributes.key?("projectId") ? attributes["projectId"] : attributes[:project_id], enabled: attributes.key?("enabled") ? attributes["enabled"] : attributes[:enabled], rate_limit_enabled: attributes.key?("rateLimitEnabled") ? attributes["rateLimitEnabled"] : attributes[:rate_limit_enabled], rate_limit_time_window: attributes.key?("rateLimitTimeWindow") ? attributes["rateLimitTimeWindow"] : attributes[:rate_limit_time_window], rate_limit_max: attributes.key?("rateLimitMax") ? attributes["rateLimitMax"] : attributes[:rate_limit_max], request_count: attributes.key?("requestCount") ? attributes["requestCount"] : attributes[:request_count], remaining: attributes.key?("remaining") ? attributes["remaining"] : attributes[:remaining], last_request: attributes.key?("lastRequest") ? attributes["lastRequest"] : attributes[:last_request], expires_at: attributes.key?("expiresAt") ? attributes["expiresAt"] : attributes[:expires_at], created_at: attributes.key?("createdAt") ? attributes["createdAt"] : attributes[:created_at], updated_at: attributes.key?("updatedAt") ? attributes["updatedAt"] : attributes[:updated_at], metadata: attributes.key?("metadata") ? attributes["metadata"] : attributes[:metadata], permissions: attributes.key?("permissions") ? attributes["permissions"] : attributes[:permissions], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3733 def to_h { id: @id, config_id: @config_id, name: @name, start: @start, prefix: @prefix, organization_id: @organization_id, project_id: @project_id, enabled: @enabled, rate_limit_enabled: @rate_limit_enabled, rate_limit_time_window: @rate_limit_time_window, rate_limit_max: @rate_limit_max, request_count: @request_count, remaining: @remaining, last_request: @last_request, expires_at: @expires_at, created_at: @created_at, updated_at: @updated_at, metadata: @metadata, permissions: @permissions, }.compact end |