Class: ApolloDeploySignalSdkRails::ActivityMetadataResponse

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

Overview

Schema type: ActivityMetadataResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic_id: nil) ⇒ ActivityMetadataResponse

Returns a new instance of ActivityMetadataResponse.

Parameters:

  • topic_id (String, nil) (defaults to: nil)


2953
2954
2955
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2953

def initialize(topic_id: nil)
  @topic_id = topic_id
end

Instance Attribute Details

#topic_idString?

Returns:

  • (String, nil)


2950
2951
2952
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2950

def topic_id
  @topic_id
end

Class Method Details

.from_json(attributes) ⇒ ActivityMetadataResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



2967
2968
2969
2970
2971
2972
2973
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2967

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

  new(
    topic_id: attributes.key?("topicId") ? attributes["topicId"] : attributes[:topic_id],
  )
end

Instance Method Details

#to_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



2958
2959
2960
2961
2962
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 2958

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