# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This class is auto generated by the elixir code generator program. # Do not edit the class manually. defmodule GoogleApi.Dialogflow.V2.Api.Projects do @moduledoc """ API calls for all endpoints tagged `Projects`. """ alias GoogleApi.Dialogflow.V2.Connection alias GoogleApi.Gax.{Request, Response} @doc """ Creates/updates the specified agent. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The project of this agent. Format: `projects/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:updateMask` (*type:* `String.t`) - Optional. The mask to control which fields get updated. * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Agent.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Agent{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Agent.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent(connection, parent, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :updateMask => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/agent", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Agent{}] ) end @doc """ Deletes the specified agent. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The project that the agent to delete is associated with. Format: `projects/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_delete_agent(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_delete_agent(connection, parent, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:delete) |> Request.url("/v2/{+parent}/agent", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}]) end @doc """ Retrieves the specified agent. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The project that the agent to fetch is associated with. Format: `projects/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Agent{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_get_agent(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Agent.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_get_agent(connection, parent, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/agent", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Agent{}] ) end @doc """ Exports the specified agent to a ZIP file. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The project that the agent to export is associated with. Format: `projects/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ExportAgentRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_export(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_export(connection, parent, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/agent:export", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The project that the agent to import is associated with. Format: `projects/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ImportAgentRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_import(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_import(connection, parent, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/agent:import", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The project that the agent to restore is associated with. Format: `projects/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2RestoreAgentRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_restore(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_restore(connection, parent, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/agent:restore", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id "-". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The project to list agents from. Format: `projects/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous list request. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SearchAgentsResponse{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_search(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SearchAgentsResponse.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_search(connection, parent, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :pageSize => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/agent:search", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SearchAgentsResponse{}] ) end @doc """ Trains the specified agent. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The project that the agent to train is associated with. Format: `projects/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2TrainAgentRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_train(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_train(connection, parent, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/agent:train", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Deletes entity types in the specified agent. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The name of the agent to delete all entities types for. Format: `projects//agent`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_entity_types_batch_delete( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_entity_types_batch_delete( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entityTypes:batchDelete", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Updates/Creates multiple entity types in the specified agent. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The name of the agent to update or create entity types in. Format: `projects//agent`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_entity_types_batch_update( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_entity_types_batch_update( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entityTypes:batchUpdate", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Creates an entity type in the specified agent. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The agent to create a entity type for. Format: `projects//agent`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:languageCode` (*type:* `String.t`) - Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_entity_types_create( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_entity_types_create( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :languageCode => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entityTypes", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType{}] ) end @doc """ Deletes the specified entity type. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_entity_types_delete( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_entity_types_delete( connection, name, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:delete) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}]) end @doc """ Retrieves the specified entity type. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - Required. The name of the entity type. Format: `projects//agent/entityTypes/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:languageCode` (*type:* `String.t`) - Optional. The language to retrieve entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_entity_types_get( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_entity_types_get( connection, name, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :languageCode => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType{}] ) end @doc """ Returns the list of all entity types in the specified agent. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The agent to list all entity types from. Format: `projects//agent`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:languageCode` (*type:* `String.t`) - Optional. The language to list entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous list request. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListEntityTypesResponse{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_entity_types_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListEntityTypesResponse.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_entity_types_list( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :languageCode => :query, :pageSize => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/entityTypes", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListEntityTypesResponse{}] ) end @doc """ Updates the specified entity type. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:languageCode` (*type:* `String.t`) - Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. * `:updateMask` (*type:* `String.t`) - Optional. The mask to control which fields get updated. * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_entity_types_patch( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_entity_types_patch( connection, name, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :languageCode => :query, :updateMask => :query, :body => :body } request = Request.new() |> Request.method(:patch) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2EntityType{}] ) end @doc """ Creates multiple new entities in the specified entity type. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2BatchCreateEntitiesRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_entity_types_entities_batch_create( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_entity_types_entities_batch_create( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entities:batchCreate", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Deletes entities in the specified entity type. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2BatchDeleteEntitiesRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_entity_types_entities_batch_delete( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_entity_types_entities_batch_delete( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entities:batchDelete", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2BatchUpdateEntitiesRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_entity_types_entities_batch_update( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_entity_types_entities_batch_update( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entities:batchUpdate", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Deletes intents in the specified agent. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The name of the agent to delete all entities types for. Format: `projects//agent`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2BatchDeleteIntentsRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_intents_batch_delete( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_intents_batch_delete( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/intents:batchDelete", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Updates/Creates multiple intents in the specified agent. Operation ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The name of the agent to update or create intents in. Format: `projects//agent`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2BatchUpdateIntentsRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_intents_batch_update( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_intents_batch_update( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/intents:batchUpdate", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Creates an intent in the specified agent. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The agent to create a intent for. Format: `projects//agent`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:intentView` (*type:* `String.t`) - Optional. The resource view to apply to the returned intent. * `:languageCode` (*type:* `String.t`) - Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_intents_create( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_intents_create( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :intentView => :query, :languageCode => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/intents", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent{}] ) end @doc """ Deletes the specified intent and its direct or indirect followup intents. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_intents_delete( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_intents_delete( connection, name, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:delete) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}]) end @doc """ Retrieves the specified intent. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - Required. The name of the intent. Format: `projects//agent/intents/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:intentView` (*type:* `String.t`) - Optional. The resource view to apply to the returned intent. * `:languageCode` (*type:* `String.t`) - Optional. The language to retrieve training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_intents_get( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_intents_get(connection, name, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :intentView => :query, :languageCode => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent{}] ) end @doc """ Returns the list of all intents in the specified agent. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The agent to list all intents from. Format: `projects//agent`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:intentView` (*type:* `String.t`) - Optional. The resource view to apply to the returned intent. * `:languageCode` (*type:* `String.t`) - Optional. The language to list training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous list request. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListIntentsResponse{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_intents_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListIntentsResponse.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_intents_list( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :intentView => :query, :languageCode => :query, :pageSize => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/intents", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListIntentsResponse{}] ) end @doc """ Updates the specified intent. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:intentView` (*type:* `String.t`) - Optional. The resource view to apply to the returned intent. * `:languageCode` (*type:* `String.t`) - Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. * `:updateMask` (*type:* `String.t`) - Optional. The mask to control which fields get updated. * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_intents_patch( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_intents_patch(connection, name, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :intentView => :query, :languageCode => :query, :updateMask => :query, :body => :body } request = Request.new() |> Request.method(:patch) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Intent{}] ) end @doc """ Deletes all active contexts in the specified session. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_delete_contexts( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_delete_contexts( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:delete) |> Request.url("/v2/{+parent}/contexts", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}]) end @doc """ Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `session` (*type:* `String.t`) - Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`. It's up to the API caller to choose an appropriate session ID. It can be a random number or some type of user identifier (preferably hashed). The length of the session ID must not exceed 36 bytes. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2DetectIntentRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2DetectIntentResponse{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_detect_intent( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2DetectIntentResponse.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_detect_intent( connection, session, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+session}:detectIntent", %{ "session" => URI.encode(session, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2DetectIntentResponse{}] ) end @doc """ Creates a context. If the specified context already exists, overrides the context. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The session to create a context for. Format: `projects//agent/sessions/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_contexts_create( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_contexts_create( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/contexts", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context{}] ) end @doc """ Deletes the specified context. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_contexts_delete( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_contexts_delete( connection, name, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:delete) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}]) end @doc """ Retrieves the specified context. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - Required. The name of the context. Format: `projects//agent/sessions//contexts/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_contexts_get( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_contexts_get( connection, name, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context{}] ) end @doc """ Returns the list of all contexts in the specified session. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The session to list all contexts from. Format: `projects//agent/sessions/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous list request. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListContextsResponse{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_contexts_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListContextsResponse.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_contexts_list( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :pageSize => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/contexts", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListContextsResponse{}] ) end @doc """ Updates the specified context. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:updateMask` (*type:* `String.t`) - Optional. The mask to control which fields get updated. * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_contexts_patch( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_contexts_patch( connection, name, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :updateMask => :query, :body => :body } request = Request.new() |> Request.method(:patch) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Context{}] ) end @doc """ Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The session to create a session entity type for. Format: `projects//agent/sessions/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_entity_types_create( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_entity_types_create( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entityTypes", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType{}] ) end @doc """ Deletes the specified session entity type. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_entity_types_delete( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_entity_types_delete( connection, name, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:delete) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}]) end @doc """ Retrieves the specified session entity type. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_entity_types_get( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_entity_types_get( connection, name, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType{}] ) end @doc """ Returns the list of all session entity types in the specified session. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `parent` (*type:* `String.t`) - Required. The session to list all session entity types from. Format: `projects//agent/sessions/`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous list request. * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListSessionEntityTypesResponse{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_entity_types_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListSessionEntityTypesResponse.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_entity_types_list( connection, parent, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :pageSize => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/entityTypes", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [ struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListSessionEntityTypesResponse{} ] ) end @doc """ Updates the specified session entity type. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:updateMask` (*type:* `String.t`) - Optional. The mask to control which fields get updated. * `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_agent_sessions_entity_types_patch( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_agent_sessions_entity_types_patch( connection, name, optional_params \\ [], opts \\ [] ) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, :updateMask => :query, :body => :body } request = Request.new() |> Request.method(:patch) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SessionEntityType{}] ) end @doc """ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. ## Parameters * `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server * `name` (*type:* `String.t`) - The name of the operation resource. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:$.xgafv` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. * `:alt` (*type:* `String.t`) - Data format for response. * `:callback` (*type:* `String.t`) - JSONP * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `opts` (*type:* `keyword()`) - Call options ## Returns * `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ @spec dialogflow_projects_operations_get(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation.t()} | {:error, Tesla.Env.t()} def dialogflow_projects_operations_get(connection, name, optional_params \\ [], opts \\ []) do optional_params_config = %{ :"$.xgafv" => :query, :access_token => :query, :alt => :query, :callback => :query, :fields => :query, :key => :query, :oauth_token => :query, :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, :upload_protocol => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end end