Class: ApolloDeploySignalSdkRails::GetMetricsAdvisorQuery

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

Overview

Schema type: GetMetricsAdvisorQuery

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_id: nil) ⇒ GetMetricsAdvisorQuery

Returns a new instance of GetMetricsAdvisorQuery.

Parameters:

  • project_id (String) (defaults to: nil)


4860
4861
4862
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4860

def initialize(project_id: nil)
  @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.



4857
4858
4859
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4857

def project_id
  @project_id
end

Class Method Details

.from_json(attributes) ⇒ GetMetricsAdvisorQuery

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



4874
4875
4876
4877
4878
4879
4880
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4874

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

  new(
    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



4865
4866
4867
4868
4869
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4865

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