# Copyright 2017 Google Inc. # # 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 swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # 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 """ Deletes entity types in the specified agent. Operation <response: google.protobuf.Empty, metadata: google.protobuf.Struct> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The name of the agent to delete all entities types for. Format: `projects/<Project ID>/agent`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest): ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entityTypes:batchDelete", %{ "parent" => URI.encode_www_form(parent) }) |> 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 <response: BatchUpdateEntityTypesResponse, metadata: google.protobuf.Struct> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The name of the agent to update or create entity types in. Format: `projects/<Project ID>/agent`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest): ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entityTypes:batchUpdate", %{ "parent" => URI.encode_www_form(parent) }) |> 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 multiple new entities in the specified entity type. Operation <response: google.protobuf.Empty> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The name of the entity type to create entities in. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2BatchCreateEntitiesRequest): ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entities:batchCreate", %{ "parent" => URI.encode_www_form(parent) }) |> 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 <response: google.protobuf.Empty, metadata: google.protobuf.Struct> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The name of the entity type to delete entries for. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2BatchDeleteEntitiesRequest): ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entities:batchDelete", %{ "parent" => URI.encode_www_form(parent) }) |> 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 <response: google.protobuf.Empty, metadata: google.protobuf.Struct> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The name of the entity type to update or create entities in. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2BatchUpdateEntitiesRequest): ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entities:batchUpdate", %{ "parent" => URI.encode_www_form(parent) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Exports the specified agent to a ZIP file. Operation <response: ExportAgentResponse, metadata: google.protobuf.Struct> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The project that the agent to export is associated with. Format: `projects/<Project ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2ExportAgentRequest): ## Returns {:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}} on success {:error, info} on failure """ @spec dialogflow_projects_agent_export(Tesla.Env.client(), String.t(), 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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/agent:export", %{ "parent" => URI.encode_www_form(parent) }) |> 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 <response: google.protobuf.Empty, metadata: google.protobuf.Struct> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The project that the agent to import is associated with. Format: `projects/<Project ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2ImportAgentRequest): ## Returns {:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}} on success {:error, info} on failure """ @spec dialogflow_projects_agent_import(Tesla.Env.client(), String.t(), 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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/agent:import", %{ "parent" => URI.encode_www_form(parent) }) |> 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 <response: google.protobuf.Empty> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The name of the agent to delete all entities types for. Format: `projects/<Project ID>/agent`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2BatchDeleteIntentsRequest): ## 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()) :: {: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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/intents:batchDelete", %{ "parent" => URI.encode_www_form(parent) }) |> 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 <response: BatchUpdateIntentsResponse> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The name of the agent to update or create intents in. Format: `projects/<Project ID>/agent`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2BatchUpdateIntentsRequest): ## 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()) :: {: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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/intents:batchUpdate", %{ "parent" => URI.encode_www_form(parent) }) |> 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 (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The agent to create a intent for. Format: `projects/<Project ID>/agent`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :intentView (String.t): Optional. The resource view to apply to the returned intent. - :languageCode (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. [More than a dozen languages](https://dialogflow.com/docs/reference/language) are supported. Note: languages must be enabled in the agent, before they can be used. - :body (GoogleCloudDialogflowV2Intent): ## 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()) :: {: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, :upload_protocol => :query, :uploadType => :query, :intentView => :query, :languageCode => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/intents", %{ "parent" => URI.encode_www_form(parent) }) |> 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 (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The agent to list all intents from. Format: `projects/<Project ID>/agent`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :intentView (String.t): Optional. The resource view to apply to the returned intent. - :languageCode (String.t): Optional. The language to list training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [More than a dozen languages](https://dialogflow.com/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - :pageSize (integer()): Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - :pageToken (String.t): Optional. The next_page_token value returned from a previous list request. ## 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()) :: {: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, :upload_protocol => :query, :uploadType => :query, :intentView => :query, :languageCode => :query, :pageSize => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/intents", %{ "parent" => URI.encode_www_form(parent) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListIntentsResponse{}] ) 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 <response: google.protobuf.Empty, metadata: google.protobuf.Struct> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The project that the agent to restore is associated with. Format: `projects/<Project ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2RestoreAgentRequest): ## Returns {:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}} on success {:error, info} on failure """ @spec dialogflow_projects_agent_restore(Tesla.Env.client(), String.t(), 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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/agent:restore", %{ "parent" => URI.encode_www_form(parent) }) |> 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 (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The project to list agents from. Format: `projects/<Project ID or '-'>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :pageSize (integer()): Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - :pageToken (String.t): Optional. The next_page_token value returned from a previous list request. ## Returns {:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SearchAgentsResponse{}} on success {:error, info} on failure """ @spec dialogflow_projects_agent_search(Tesla.Env.client(), String.t(), 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, :upload_protocol => :query, :uploadType => :query, :pageSize => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/agent:search", %{ "parent" => URI.encode_www_form(parent) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2SearchAgentsResponse{}] ) end @doc """ Creates a context. If the specified context already exists, overrides the context. ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The session to create a context for. Format: `projects/<Project ID>/agent/sessions/<Session ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2Context): ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/contexts", %{ "parent" => URI.encode_www_form(parent) }) |> 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 (GoogleApi.Dialogflow.V2.Connection): Connection to server - name (String.t): Required. The name of the context to delete. Format: `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query } request = Request.new() |> Request.method(:delete) |> Request.url("/v2/{+name}", %{ "name" => URI.encode_www_form(name) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleProtobufEmpty{}]) end @doc """ Returns the list of all contexts in the specified session. ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The session to list all contexts from. Format: `projects/<Project ID>/agent/sessions/<Session ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :pageSize (integer()): Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - :pageToken (String.t): Optional. The next_page_token value returned from a previous list request. ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :pageSize => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/contexts", %{ "parent" => URI.encode_www_form(parent) }) |> 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 (GoogleApi.Dialogflow.V2.Connection): Connection to server - name (String.t): Required. The unique identifier of the context. Format: `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`. 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 (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :updateMask (String.t): Optional. The mask to control which fields get updated. - :body (GoogleCloudDialogflowV2Context): Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [More than a dozen languages](https://dialogflow.com/docs/reference/language) are supported. Note: languages must be enabled in the agent, before they can be used. - :updateMask (String.t): Optional. The mask to control which fields get updated. - :body (GoogleCloudDialogflowV2Intent): ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :updateMask => :query, :body => :body, :updateMask => :query, :body => :body } request = Request.new() |> Request.method(:patch) |> Request.url("/v2/{+name}", %{ "name" => URI.encode_www_form(name) }) |> 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 all active contexts in the specified session. ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The name of the session to delete all contexts from. Format: `projects/<Project ID>/agent/sessions/<Session ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query } request = Request.new() |> Request.method(:delete) |> Request.url("/v2/{+parent}/contexts", %{ "parent" => URI.encode_www_form(parent) }) |> 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 (GoogleApi.Dialogflow.V2.Connection): Connection to server - session (String.t): Required. The name of the session this query is sent to. Format: `projects/<Project ID>/agent/sessions/<Session ID>`. 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 (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2DetectIntentRequest): ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+session}:detectIntent", %{ "session" => URI.encode_www_form(session) }) |> 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 session entity type. If the specified session entity type already exists, overrides the session entity type. ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The session to create a session entity type for. Format: `projects/<Project ID>/agent/sessions/<Session ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2SessionEntityType): Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [More than a dozen languages](https://dialogflow.com/docs/reference/language) are supported. Note: languages must be enabled in the agent, before they can be used. - :body (GoogleCloudDialogflowV2EntityType): ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :body => :body, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/entityTypes", %{ "parent" => URI.encode_www_form(parent) }) |> 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 (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The session to list all session entity types from. Format: `projects/<Project ID>/agent/sessions/<Session ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :pageSize (integer()): Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - :pageToken (String.t): Optional. The next_page_token value returned from a previous list request. - :pageToken (String.t): Optional. The next_page_token value returned from a previous list request. ## 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() ) :: {: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, :upload_protocol => :query, :uploadType => :query, :pageSize => :query, :pageToken => :query, :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/entityTypes", %{ "parent" => URI.encode_www_form(parent) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [ struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ListSessionEntityTypesResponse{} ] ) end @doc """ Trains the specified agent. Operation <response: google.protobuf.Empty, metadata: google.protobuf.Struct> ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The project that the agent to train is associated with. Format: `projects/<Project ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :body (GoogleCloudDialogflowV2TrainAgentRequest): ## Returns {:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}} on success {:error, info} on failure """ @spec dialogflow_projects_agent_train(Tesla.Env.client(), String.t(), 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, :upload_protocol => :query, :uploadType => :query, :body => :body } request = Request.new() |> Request.method(:post) |> Request.url("/v2/{+parent}/agent:train", %{ "parent" => URI.encode_www_form(parent) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end @doc """ Retrieves the specified agent. ## Parameters - connection (GoogleApi.Dialogflow.V2.Connection): Connection to server - parent (String.t): Required. The project that the agent to fetch is associated with. Format: `projects/<Project ID>`. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). ## Returns {:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Agent{}} on success {:error, info} on failure """ @spec dialogflow_projects_get_agent(Tesla.Env.client(), String.t(), 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, :upload_protocol => :query, :uploadType => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+parent}/agent", %{ "parent" => URI.encode_www_form(parent) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Agent{}] ) 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 (GoogleApi.Dialogflow.V2.Connection): Connection to server - name (String.t): The name of the operation resource. - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (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 (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (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. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :intentView (String.t): Optional. The resource view to apply to the returned intent. - :languageCode (String.t): Optional. The language to retrieve training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [More than a dozen languages](https://dialogflow.com/docs/reference/language) are supported. Note: languages must be enabled in the agent, before they can be used. ## Returns {:ok, %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}} on success {:error, info} on failure """ @spec dialogflow_projects_operations_get(Tesla.Env.client(), String.t(), 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, :upload_protocol => :query, :uploadType => :query, :intentView => :query, :languageCode => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v2/{+name}", %{ "name" => URI.encode_www_form(name) }) |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode( opts ++ [struct: %GoogleApi.Dialogflow.V2.Model.GoogleLongrunningOperation{}] ) end end