Class: ApolloDeploySignalSdkRails::ProjectResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::ProjectResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: ProjectResponse
Instance Attribute Summary collapse
- #created_at ⇒ String
- #id ⇒ String
- #limits ⇒ ProjectLimitsModel
- #name ⇒ String
- #region ⇒ String
- #slug ⇒ String
- #status ⇒ String
- #suspension_reason ⇒ String?
- #tracking_settings ⇒ ProjectTrackingSettingsModel
- #updated_at ⇒ String
Class Method Summary collapse
-
.from_json(attributes) ⇒ ProjectResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(id:, name:, slug:, status:, suspension_reason:, region:, limits:, tracking_settings:, created_at:, updated_at:) ⇒ ProjectResponse
constructor
A new instance of ProjectResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(id:, name:, slug:, status:, suspension_reason:, region:, limits:, tracking_settings:, created_at:, updated_at:) ⇒ ProjectResponse
Returns a new instance of ProjectResponse.
4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4056 def initialize(id: , name: , slug: , status: , suspension_reason: , region: , limits: , tracking_settings: , created_at: , updated_at: ) @id = id @name = name @slug = slug @status = status @suspension_reason = suspension_reason @region = region @limits = limits @tracking_settings = tracking_settings @created_at = created_at @updated_at = updated_at end |
Instance Attribute Details
#created_at ⇒ String
4051 4052 4053 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4051 def created_at @created_at end |
#id ⇒ String
4035 4036 4037 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4035 def id @id end |
#limits ⇒ ProjectLimitsModel
4047 4048 4049 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4047 def limits @limits end |
#name ⇒ String
4037 4038 4039 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4037 def name @name end |
#region ⇒ String
4045 4046 4047 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4045 def region @region end |
#slug ⇒ String
4039 4040 4041 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4039 def slug @slug end |
#status ⇒ String
4041 4042 4043 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4041 def status @status end |
#suspension_reason ⇒ String?
4043 4044 4045 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4043 def suspension_reason @suspension_reason end |
#tracking_settings ⇒ ProjectTrackingSettingsModel
4049 4050 4051 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4049 def tracking_settings @tracking_settings end |
#updated_at ⇒ String
4053 4054 4055 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4053 def updated_at @updated_at end |
Class Method Details
.from_json(attributes) ⇒ ProjectResponse
Create an instance from a parsed JSON hash.
4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4088 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( id: attributes.key?("id") ? attributes["id"] : attributes[:id], name: attributes.key?("name") ? attributes["name"] : attributes[:name], slug: attributes.key?("slug") ? attributes["slug"] : attributes[:slug], status: attributes.key?("status") ? attributes["status"] : attributes[:status], suspension_reason: attributes.key?("suspensionReason") ? attributes["suspensionReason"] : attributes[:suspension_reason], region: attributes.key?("region") ? attributes["region"] : attributes[:region], limits: attributes.key?("limits") ? attributes["limits"] : attributes[:limits], tracking_settings: attributes.key?("trackingSettings") ? attributes["trackingSettings"] : attributes[:tracking_settings], created_at: attributes.key?("createdAt") ? attributes["createdAt"] : attributes[:created_at], updated_at: attributes.key?("updatedAt") ? attributes["updatedAt"] : attributes[:updated_at], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4070 def to_h { id: @id, name: @name, slug: @slug, status: @status, suspension_reason: @suspension_reason, region: @region, limits: @limits, tracking_settings: @tracking_settings, created_at: @created_at, updated_at: @updated_at, }.compact end |