Class: Twilio::REST::Memory::V1::DataMappingList::DataMappingCore

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/memory/v1/data_mapping.rb,
lib/twilio-ruby/rest/memory/v1/data_mapping.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ DataMappingCore

Returns a new instance of DataMappingCore.



53
54
55
56
57
58
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 53

def initialize(payload)
        @display_name = payload["display_name"]
        @description = payload["description"]
        @is_enabled = payload["is_enabled"]
        @mapping_to = payload["mapping_to"]
end

Instance Attribute Details

#description ⇒ Object

Parameters:

  • : (display_name) —

    [String] Name of the data mapping.

  • : (description) —

    [String] A human readable description of this resource, up to 512 characters.

  • : (is_enabled) —

    [Boolean] Flag indicating whether the data mapping is active. When true, data will be ingested and mapped according to the configuration. When false, the data mapping will be inactive and no data will be ingested into the Memory Store.

  • : (mapping_to) —

    [DataMappingList.DataMappingToTraits]



52
53
54
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 52

def description
  @description
end

#display_name ⇒ Object

Parameters:

  • : (display_name) —

    [String] Name of the data mapping.

  • : (description) —

    [String] A human readable description of this resource, up to 512 characters.

  • : (is_enabled) —

    [Boolean] Flag indicating whether the data mapping is active. When true, data will be ingested and mapped according to the configuration. When false, the data mapping will be inactive and no data will be ingested into the Memory Store.

  • : (mapping_to) —

    [DataMappingList.DataMappingToTraits]



52
53
54
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 52

def display_name
  @display_name
end

#is_enabled ⇒ Object

Parameters:

  • : (display_name) —

    [String] Name of the data mapping.

  • : (description) —

    [String] A human readable description of this resource, up to 512 characters.

  • : (is_enabled) —

    [Boolean] Flag indicating whether the data mapping is active. When true, data will be ingested and mapped according to the configuration. When false, the data mapping will be inactive and no data will be ingested into the Memory Store.

  • : (mapping_to) —

    [DataMappingList.DataMappingToTraits]



52
53
54
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 52

def is_enabled
  @is_enabled
end

#mapping_to ⇒ Object

Parameters:

  • : (display_name) —

    [String] Name of the data mapping.

  • : (description) —

    [String] A human readable description of this resource, up to 512 characters.

  • : (is_enabled) —

    [Boolean] Flag indicating whether the data mapping is active. When true, data will be ingested and mapped according to the configuration. When false, the data mapping will be inactive and no data will be ingested into the Memory Store.

  • : (mapping_to) —

    [DataMappingList.DataMappingToTraits]



52
53
54
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 52

def mapping_to
  @mapping_to
end

Instance Method Details

#to_json(options = {}) ⇒ Object



59
60
61
62
63
64
65
66
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 59

def to_json(options = {})
{
        "displayName": @display_name,
        "description": @description,
        "isEnabled": @is_enabled,
        "mappingTo": @mapping_to,
}.to_json(options)
end