Class: ApolloDeploySignalSdkRails::GetTopicPerformanceQuery

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

Overview

Schema type: GetTopicPerformanceQuery

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(window: nil, project_id: nil) ⇒ GetTopicPerformanceQuery

Returns a new instance of GetTopicPerformanceQuery.

Parameters:

  • window (String) (defaults to: nil)

    , project_id [String]



4750
4751
4752
4753
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4750

def initialize(window: nil, project_id: nil)
  @window = window
  @project_id = project_id
end

Instance Attribute Details

#project_idString

Returns Required for session auth; ignored for API key auth.

Returns:

  • (String)

    Required for session auth; ignored for API key auth.



4747
4748
4749
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4747

def project_id
  @project_id
end

#windowString

Returns Time window.

Returns:

  • (String)

    Time window.



4745
4746
4747
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4745

def window
  @window
end

Class Method Details

.from_json(attributes) ⇒ GetTopicPerformanceQuery

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



4766
4767
4768
4769
4770
4771
4772
4773
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4766

def self.from_json(attributes)
  return nil unless attributes.is_a?(Hash)

  new(
    window: attributes.key?("window") ? attributes["window"] : attributes[:window],
    project_id: attributes.key?("projectId") ? attributes["projectId"] : attributes[:project_id],
  )
end

Instance Method Details

#to_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



4756
4757
4758
4759
4760
4761
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4756

def to_h
  {
    window: @window,
    project_id: @project_id,
  }.compact
end