Class: ApolloDeploySignalSdk::ProjectPageResponse

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

Overview

Schema type: ProjectPageResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, page:) ⇒ ProjectPageResponse

Returns a new instance of ProjectPageResponse.

Parameters:



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

#dataArray<ProjectResponse>

Returns:



4109
4110
4111
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4109

def data
  @data
end

#pagePageInfo

Returns:



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.

Parameters:

  • attributes (Hash)

Returns:



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_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    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