Class: ApolloDeploySignalSdkRails::GetProjectMetricsSummaryQuery
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::GetProjectMetricsSummaryQuery
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: GetProjectMetricsSummaryQuery
Instance Attribute Summary collapse
-
#project_id ⇒ String
Required for session auth; ignored for API key auth.
-
#window ⇒ String
Metrics time window.
Class Method Summary collapse
-
.from_json(attributes) ⇒ GetProjectMetricsSummaryQuery
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(window: nil, project_id: nil) ⇒ GetProjectMetricsSummaryQuery
constructor
A new instance of GetProjectMetricsSummaryQuery.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(window: nil, project_id: nil) ⇒ GetProjectMetricsSummaryQuery
Returns a new instance of GetProjectMetricsSummaryQuery.
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_id ⇒ String
Returns 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 |
#window ⇒ String
Returns 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.
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_h ⇒ Hash
Returns 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 |