Class: ApolloDeploySignalSdk::ProjectPageResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdk::ProjectPageResponse
- Defined in:
- lib/apollo_deploy_signal_sdk/types.rb
Overview
Schema type: ProjectPageResponse
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ ProjectPageResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(data:, page:) ⇒ ProjectPageResponse
constructor
A new instance of ProjectPageResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(data:, page:) ⇒ ProjectPageResponse
Returns a new instance of ProjectPageResponse.
4114 4115 4116 4117 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4114 def initialize(data: , page: ) @data = data @page = page end |
Instance Attribute Details
#data ⇒ Array<ProjectResponse>
4109 4110 4111 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4109 def data @data end |
#page ⇒ PageInfo
4111 4112 4113 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4111 def page @page end |
Class Method Details
.from_json(attributes) ⇒ ProjectPageResponse
Create an instance from a parsed JSON hash.
4130 4131 4132 4133 4134 4135 4136 4137 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4130 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( data: attributes.key?("data") ? attributes["data"] : attributes[:data], page: attributes.key?("page") ? attributes["page"] : attributes[:page], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
4120 4121 4122 4123 4124 4125 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4120 def to_h { data: @data, page: @page, }.compact end |