Class: Twilio::REST::Memory::V1::DataMappingList::CreateDataMappingInput

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) ⇒ CreateDataMappingInput

Returns a new instance of CreateDataMappingInput.



29
30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 29

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

Instance Attribute Details

#descriptionObject

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
  • : (mapping_from)
    DataMappingList.DataMappingFromDataSet


28
29
30
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 28

def description
  @description
end

#display_nameObject

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
  • : (mapping_from)
    DataMappingList.DataMappingFromDataSet


28
29
30
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 28

def display_name
  @display_name
end

#is_enabledObject

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
  • : (mapping_from)
    DataMappingList.DataMappingFromDataSet


28
29
30
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 28

def is_enabled
  @is_enabled
end

#mapping_fromObject

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
  • : (mapping_from)
    DataMappingList.DataMappingFromDataSet


28
29
30
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 28

def mapping_from
  @mapping_from
end

#mapping_toObject

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
  • : (mapping_from)
    DataMappingList.DataMappingFromDataSet


28
29
30
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 28

def mapping_to
  @mapping_to
end

Instance Method Details

#to_json(options = {}) ⇒ Object



36
37
38
39
40
41
42
43
44
# File 'lib/twilio-ruby/rest/memory/v1/data_mapping.rb', line 36

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