Class: ApolloDeploySignalSdkRails::TopicPageResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::TopicPageResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: TopicPageResponse
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ TopicPageResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(data:, page:) ⇒ TopicPageResponse
constructor
A new instance of TopicPageResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(data:, page:) ⇒ TopicPageResponse
Returns a new instance of TopicPageResponse.
2247 2248 2249 2250 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2247 def initialize(data: , page: ) @data = data @page = page end |
Instance Attribute Details
#data ⇒ Array<TopicResponse>
2242 2243 2244 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2242 def data @data end |
#page ⇒ PageInfo
2244 2245 2246 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2244 def page @page end |
Class Method Details
.from_json(attributes) ⇒ TopicPageResponse
Create an instance from a parsed JSON hash.
2263 2264 2265 2266 2267 2268 2269 2270 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2263 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.
2253 2254 2255 2256 2257 2258 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2253 def to_h { data: @data, page: @page, }.compact end |