lib/ibm_watson/assistant_v1.rb
def create_value(workspace_id:, entity:, value:, metadata: nil, value_type: nil, synonyms: nil, patterns: nil)
      raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?

      raise ArgumentError.new("entity must be provided") if entity.nil?

      raise ArgumentError.new("value must be provided") if value.nil?

      headers = {
      }
      sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_value")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version
      }

      data = {
        "value" => value,
        "metadata" => metadata,
        "type" => value_type,
        "synonyms" => synonyms,
        "patterns" => patterns
      }

      method_url = "/v1/workspaces/%s/entities/%s/values" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)]

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        json: data,
        accept_json: true
      )
      response
    end
def create_value(workspace_id:, entity:, value:, metadata: nil, value_type: nil, synonyms: nil, patterns: nil)
      raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?

      raise ArgumentError.new("entity must be provided") if entity.nil?

      raise ArgumentError.new("value must be provided") if value.nil?

      headers = {
      }
      sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "create_value")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version
      }

      data = {
        "value" => value,
        "metadata" => metadata,
        "type" => value_type,
        "synonyms" => synonyms,
        "patterns" => patterns
      }

      method_url = "/v1/workspaces/%s/entities/%s/values" % [ERB::Util.url_encode(workspace_id), ERB::Util.url_encode(entity)]

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        json: data,
        accept_json: true
      )
      response
    end
Values


 @!method create_value(workspace_id:, entity:, value:, metadata: nil, value_type: nil, synonyms: nil, patterns: nil)
 Create entity value.
 Create a new value for an entity.

   This operation is limited to 1000 requests per 30 minutes. For more information,
   see **Rate limiting**.
 @param workspace_id [String] Unique identifier of the workspace.
 @param entity [String] The name of the entity.
 @param value [String] The text of the entity value. This string must conform to the following
   restrictions:
   - It cannot contain carriage return, newline, or tab characters.
   - It cannot consist of only whitespace characters.
   - It must be no longer than 64 characters.
 @param metadata [Hash] Any metadata related to the entity value.
 @param value_type [String] Specifies the type of entity value.
 @param synonyms [Array[String]] An array of synonyms for the entity value. A value can specify either synonyms or
   patterns (depending on the value type), but not both. A synonym must conform to
   the following resrictions:
   - It cannot contain carriage return, newline, or tab characters.
   - It cannot consist of only whitespace characters.
   - It must be no longer than 64 characters.
 @param patterns [Array[String]] An array of patterns for the entity value. A value can specify either synonyms or
   patterns (depending on the value type), but not both. A pattern is a regular
   expression no longer than 512 characters. For more information about how to
   specify a pattern, see the
   [documentation](https://cloud.ibm.com/docs/services/assistant/entities.html#entities-create-dictionary-based).
 @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.