Class: Twilio::REST::Intelligence::V3::ConfigurationList::Operator

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/intelligence/v3/configuration.rb,
lib/twilio-ruby/rest/intelligence/v3/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ Operator

Returns a new instance of Operator.



107
108
109
110
111
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 107

def initialize(payload)
        @id = payload["id"]
        @version = payload["version"]
        @parameters = payload["parameters"]
end

Instance Attribute Details

#idObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator to be executed by the Rule. Assigned by Twilio (TTID).

  • : (version)
    String

    The specific version of the Language Operator to execute. When provided, the Rule will use this exact version of the Operator. When omitted, the latest active version of the Operator is used at execution time.

  • : (parameters)
    Hash

    Key-value mapping for parameters defined as part of the Operator schema. The key and value passed by the Rule must match the name and data type of the parameter defined in the Operator, respectively. These parameters will customize the behavior of the Operator when executed by the Rule via runtime substitution into the prompt. Note: For parameters of type ‘knowledge_base_and_source_ids`, the value must be passed in the following format: `knowledge_base_id:knowledge_source_id`.



106
107
108
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 106

def id
  @id
end

#parametersObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator to be executed by the Rule. Assigned by Twilio (TTID).

  • : (version)
    String

    The specific version of the Language Operator to execute. When provided, the Rule will use this exact version of the Operator. When omitted, the latest active version of the Operator is used at execution time.

  • : (parameters)
    Hash

    Key-value mapping for parameters defined as part of the Operator schema. The key and value passed by the Rule must match the name and data type of the parameter defined in the Operator, respectively. These parameters will customize the behavior of the Operator when executed by the Rule via runtime substitution into the prompt. Note: For parameters of type ‘knowledge_base_and_source_ids`, the value must be passed in the following format: `knowledge_base_id:knowledge_source_id`.



106
107
108
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 106

def parameters
  @parameters
end

#versionObject

Parameters:

  • : (id)
    String

    The unique identifier for the Language Operator to be executed by the Rule. Assigned by Twilio (TTID).

  • : (version)
    String

    The specific version of the Language Operator to execute. When provided, the Rule will use this exact version of the Operator. When omitted, the latest active version of the Operator is used at execution time.

  • : (parameters)
    Hash

    Key-value mapping for parameters defined as part of the Operator schema. The key and value passed by the Rule must match the name and data type of the parameter defined in the Operator, respectively. These parameters will customize the behavior of the Operator when executed by the Rule via runtime substitution into the prompt. Note: For parameters of type ‘knowledge_base_and_source_ids`, the value must be passed in the following format: `knowledge_base_id:knowledge_source_id`.



106
107
108
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 106

def version
  @version
end

Instance Method Details

#to_json(options = {}) ⇒ Object



112
113
114
115
116
117
118
# File 'lib/twilio-ruby/rest/intelligence/v3/configuration.rb', line 112

def to_json(options = {})
{
        "id": @id,
        "version": @version,
        "parameters": @parameters,
}.to_json(options)
end