Class: ApolloDeploySignalSdk::SegmentRef
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdk::SegmentRef
- Defined in:
- lib/apollo_deploy_signal_sdk/types.rb
Overview
Schema type: SegmentRef
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ SegmentRef
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(id:) ⇒ SegmentRef
constructor
A new instance of SegmentRef.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(id:) ⇒ SegmentRef
Returns a new instance of SegmentRef.
2690 2691 2692 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2690 def initialize(id: ) @id = id end |
Instance Attribute Details
#id ⇒ String
2687 2688 2689 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2687 def id @id end |
Class Method Details
.from_json(attributes) ⇒ SegmentRef
Create an instance from a parsed JSON hash.
2704 2705 2706 2707 2708 2709 2710 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2704 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( id: attributes.key?("id") ? attributes["id"] : attributes[:id], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
2695 2696 2697 2698 2699 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 2695 def to_h { id: @id, }.compact end |