lib/ibm_watson/assistant_v1.rb
def update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_value_type: nil, new_synonyms: nil, new_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", "update_value")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version
      }

      data = {
        "value" => new_value,
        "metadata" => new_metadata,
        "type" => new_value_type,
        "synonyms" => new_synonyms,
        "patterns" => new_patterns
      }

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

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        json: data,
        accept_json: true
      )
      response
    end
def update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_value_type: nil, new_synonyms: nil, new_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", "update_value")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version
      }

      data = {
        "value" => new_value,
        "metadata" => new_metadata,
        "type" => new_value_type,
        "synonyms" => new_synonyms,
        "patterns" => new_patterns
      }

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

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        json: data,
        accept_json: true
      )
      response
    end
@!method update_value(workspace_id:, entity:, value:, new_value: nil, new_metadata: nil, new_value_type: nil, new_synonyms: nil, new_patterns: nil)
 Update entity value.
 Update an existing entity value with new or modified data. You must provide
   component objects defining the content of the updated entity value.

   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.
 @param new_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 new_metadata [Hash] Any metadata related to the entity value.
 @param new_value_type [String] Specifies the type of entity value.
 @param new_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 new_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.