Class: ApolloDeploySignalSdk::GetProjectMetricsTimelineQuery
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdk::GetProjectMetricsTimelineQuery
- Defined in:
- lib/apollo_deploy_signal_sdk/types.rb
Overview
Schema type: GetProjectMetricsTimelineQuery
Instance Attribute Summary collapse
-
#format ⇒ String
compactordetailed. -
#granularity ⇒ String
hourorday. -
#project_id ⇒ String
Required for session auth; ignored for API key auth.
-
#window ⇒ String
Metrics time window.
Class Method Summary collapse
-
.from_json(attributes) ⇒ GetProjectMetricsTimelineQuery
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(window: nil, granularity: nil, format: nil, project_id: nil) ⇒ GetProjectMetricsTimelineQuery
constructor
A new instance of GetProjectMetricsTimelineQuery.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(window: nil, granularity: nil, format: nil, project_id: nil) ⇒ GetProjectMetricsTimelineQuery
Returns a new instance of GetProjectMetricsTimelineQuery.
4822 4823 4824 4825 4826 4827 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4822 def initialize(window: nil, granularity: nil, format: nil, project_id: nil) @window = window @granularity = granularity @format = format @project_id = project_id end |
Instance Attribute Details
#format ⇒ String
Returns compact or detailed.
4817 4818 4819 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4817 def format @format end |
#granularity ⇒ String
Returns hour or day.
4815 4816 4817 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4815 def granularity @granularity end |
#project_id ⇒ String
Returns Required for session auth; ignored for API key auth.
4819 4820 4821 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4819 def project_id @project_id end |
#window ⇒ String
Returns Metrics time window.
4813 4814 4815 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4813 def window @window end |
Class Method Details
.from_json(attributes) ⇒ GetProjectMetricsTimelineQuery
Create an instance from a parsed JSON hash.
4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4842 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( window: attributes.key?("window") ? attributes["window"] : attributes[:window], granularity: attributes.key?("granularity") ? attributes["granularity"] : attributes[:granularity], format: attributes.key?("format") ? attributes["format"] : attributes[:format], project_id: attributes.key?("projectId") ? attributes["projectId"] : attributes[:project_id], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
4830 4831 4832 4833 4834 4835 4836 4837 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 4830 def to_h { window: @window, granularity: @granularity, format: @format, project_id: @project_id, }.compact end |