Class: ApolloDeploySignalSdkRails::DomainListPageResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/apollo_deploy_signal_sdk_rails/types.rb

Overview

Schema type: DomainListPageResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, page:) ⇒ DomainListPageResponse

Returns a new instance of DomainListPageResponse.

Parameters:



4373
4374
4375
4376
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4373

def initialize(data: , page: )
  @data = data
  @page = page
end

Instance Attribute Details

#dataArray<DomainListItemResponse>

Returns:



4368
4369
4370
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4368

def data
  @data
end

#pagePageInfo

Returns:



4370
4371
4372
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4370

def page
  @page
end

Class Method Details

.from_json(attributes) ⇒ DomainListPageResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



4389
4390
4391
4392
4393
4394
4395
4396
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4389

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_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



4379
4380
4381
4382
4383
4384
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4379

def to_h
  {
    data: @data,
    page: @page,
  }.compact
end