Class: ApolloDeploySignalSdkRails::GetProjectMetricsSummaryQuery

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

Overview

Schema type: GetProjectMetricsSummaryQuery

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of GetProjectMetricsSummaryQuery.

Parameters:

  • window (String) (defaults to: nil)

    , project_id [String]



4784
4785
4786
4787
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4784

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.



4781
4782
4783
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4781

def project_id
  @project_id
end

#windowString

Returns Metrics time window.

Returns:

  • (String)

    Metrics time window.



4779
4780
4781
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4779

def window
  @window
end

Class Method Details

.from_json(attributes) ⇒ GetProjectMetricsSummaryQuery

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



4800
4801
4802
4803
4804
4805
4806
4807
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4800

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



4790
4791
4792
4793
4794
4795
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4790

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