Class: ApolloDeploySignalSdkRails::ActivityResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::ActivityResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: ActivityResponse
Instance Attribute Summary collapse
- #id ⇒ String
- #metadata ⇒ ActivityMetadataResponse?
- #object ⇒ String
- #occurred_at ⇒ String
- #reference_id ⇒ String?
- #reference_name ⇒ String?
- #type ⇒ String
Class Method Summary collapse
-
.from_json(attributes) ⇒ ActivityResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(object: nil, id:, type:, reference_id: nil, reference_name: nil, metadata: nil, occurred_at:) ⇒ ActivityResponse
constructor
A new instance of ActivityResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(object: nil, id:, type:, reference_id: nil, reference_name: nil, metadata: nil, occurred_at:) ⇒ ActivityResponse
Returns a new instance of ActivityResponse.
2994 2995 2996 2997 2998 2999 3000 3001 3002 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2994 def initialize(object: nil, id: , type: , reference_id: nil, reference_name: nil, metadata: nil, occurred_at: ) @object = object @id = id @type = type @reference_id = reference_id @reference_name = reference_name @metadata = @occurred_at = occurred_at end |
Instance Attribute Details
#id ⇒ String
2981 2982 2983 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2981 def id @id end |
#metadata ⇒ ActivityMetadataResponse?
2989 2990 2991 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2989 def @metadata end |
#object ⇒ String
2979 2980 2981 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2979 def object @object end |
#occurred_at ⇒ String
2991 2992 2993 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2991 def occurred_at @occurred_at end |
#reference_id ⇒ String?
2985 2986 2987 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2985 def reference_id @reference_id end |
#reference_name ⇒ String?
2987 2988 2989 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2987 def reference_name @reference_name end |
#type ⇒ String
2983 2984 2985 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2983 def type @type end |
Class Method Details
.from_json(attributes) ⇒ ActivityResponse
Create an instance from a parsed JSON hash.
3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3020 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( object: attributes.key?("object") ? attributes["object"] : attributes[:object], id: attributes.key?("id") ? attributes["id"] : attributes[:id], type: attributes.key?("type") ? attributes["type"] : attributes[:type], reference_id: attributes.key?("referenceId") ? attributes["referenceId"] : attributes[:reference_id], reference_name: attributes.key?("referenceName") ? attributes["referenceName"] : attributes[:reference_name], metadata: attributes.key?("metadata") ? attributes["metadata"] : attributes[:metadata], occurred_at: attributes.key?("occurredAt") ? attributes["occurredAt"] : attributes[:occurred_at], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3005 def to_h { object: @object, id: @id, type: @type, reference_id: @reference_id, reference_name: @reference_name, metadata: @metadata, occurred_at: @occurred_at, }.compact end |