diff --git a/clients/connectors/lib/google_api/connectors/v2/api/projects.ex b/clients/connectors/lib/google_api/connectors/v2/api/projects.ex new file mode 100644 index 0000000000..7416a00f6b --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/api/projects.ex @@ -0,0 +1,1261 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Api.Projects do + @moduledoc """ + API calls for all endpoints tagged `Projects`. + """ + + alias GoogleApi.Connectors.V2.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Reports readiness status of the connector. Similar logic to GetStatus but modified for kubernetes health check to understand. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - + * `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.Connectors.V2.Model.CheckReadinessResponse{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_check_readiness( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.CheckReadinessResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_check_readiness( + 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}:checkReadiness", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.CheckReadinessResponse{}]) + end + + @doc """ + Reports the status of the connection. Note that when the connection is in a state that is not ACTIVE, the implementation of this RPC method must return a Status with the corresponding State instead of returning a gRPC status code that is not "OK", which indicates that ConnectionStatus itself, not the connection, failed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - + * `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.Connectors.V2.Model.CheckStatusResponse{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_check_status( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.CheckStatusResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_check_status( + 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}:checkStatus", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.CheckStatusResponse{}]) + end + + @doc """ + ExchangeAuthCode exchanges the OAuth authorization code (and other necessary data) for an access token (and associated credentials). + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - + * `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.Connectors.V2.Model.ExchangeAuthCodeRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.ExchangeAuthCodeResponse{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_exchange_auth_code( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.ExchangeAuthCodeResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_exchange_auth_code( + 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, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+name}:exchangeAuthCode", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Connectors.V2.Model.ExchangeAuthCodeResponse{}] + ) + end + + @doc """ + Executes a SQL statement specified in the body of the request. An example of this SQL statement in the case of Salesforce connector would be 'select * from Account a, Order o where a.Id = o.AccountId'. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `connection` (*type:* `String.t`) - Required. Resource name of the Connection. Format: projects/{project}/locations/{location}/connections/{connection} + * `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.Connectors.V2.Model.ExecuteSqlQueryRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.ExecuteSqlQueryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_execute_sql_query( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.ExecuteSqlQueryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_execute_sql_query( + connection, + connection, + 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/{+connection}:executeSqlQuery", %{ + "connection" => URI.encode(connection, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.ExecuteSqlQueryResponse{}]) + end + + @doc """ + RefreshAccessToken exchanges the OAuth refresh token (and other necessary data) for a new access token (and new associated credentials). + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - + * `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.Connectors.V2.Model.RefreshAccessTokenRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.RefreshAccessTokenResponse{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_refresh_access_token( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.RefreshAccessTokenResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_refresh_access_token( + 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, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+name}:refreshAccessToken", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Connectors.V2.Model.RefreshAccessTokenResponse{}] + ) + end + + @doc """ + Executes an action with the name specified in the request. The input parameters for executing the action are passed through the body of the ExecuteAction request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Resource name of the Action. Format: projects/{project}/locations/{location}/connections/{connection}/actions/{action} + * `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.Connectors.V2.Model.ExecuteActionRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.ExecuteActionResponse{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_actions_execute( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.ExecuteActionResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_actions_execute( + 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, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+name}:execute", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.ExecuteActionResponse{}]) + end + + @doc """ + Gets the schema of the given action. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Resource name of the Action. Format: projects/{project}/locations/{location}/connections/{connection}/actions/{action} + * `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.Connectors.V2.Model.Action{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_actions_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.Action.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_actions_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) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.Action{}]) + end + + @doc """ + Gets the schema of all the actions supported by the connector. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Parent resource name of the Action. Format: projects/{project}/locations/{location}/connections/{connection} + * `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()`) - Number of Actions to return. Defaults to 25. + * `:pageToken` (*type:* `String.t`) - Page token, return from a previous ListActions call, that can be used retrieve the next page of content. If unspecified, the request returns the first page of actions. + * `:view` (*type:* `String.t`) - Specifies which fields of the Action are returned in the response. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.ListActionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_actions_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.ListActionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_actions_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, + :view => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+parent}/actions", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.ListActionsResponse{}]) + end + + @doc """ + Gets metadata of given entity type + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{entityType} + * `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.Connectors.V2.Model.EntityType{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_entity_types_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.EntityType.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_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) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.EntityType{}]) + end + + @doc """ + Lists metadata related to all entity types present in the external system. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection} + * `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()`) - Number of entity types to return. Defaults to 25. + * `:pageToken` (*type:* `String.t`) - Page token, return from a previous ListEntityTypes call, that can be used retrieve the next page of content. If unspecified, the request returns the first page of entity types. + * `:view` (*type:* `String.t`) - Specifies which fields of the Entity Type are returned in the response. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.ListEntityTypesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_entity_types_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.ListEntityTypesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_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, + :view => :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) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.ListEntityTypesResponse{}]) + end + + @doc """ + Creates a new entity row of the specified entity type in the external system. The field values for creating the row are contained in the body of the request. The response message contains a `Entity` message object returned as a response by the external system. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type} + * `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.Connectors.V2.Model.Entity.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.Entity{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_entity_types_entities_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.Entity.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_entity_types_entities_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", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.Entity{}]) + end + + @doc """ + Deletes an existing entity row matching the entity type and entity id specified in the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id} + * `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.Connectors.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_entity_types_entities_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_entity_types_entities_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) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.Empty{}]) + end + + @doc """ + Deletes entities based on conditions specified in the request and not on entity id. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `entity_type` (*type:* `String.t`) - Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type} + * `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"). + * `:conditions` (*type:* `String.t`) - Required. Conditions to be used when deleting entities. From a proto standpoint, There are no restrictions on what can be passed using this field. The connector documentation should have information about what format of filters/conditions are supported. Note: If this conditions field is left empty, an exception is thrown. We don't want to consider 'empty conditions' to be a match-all case. Connector developers can determine and document what a match-all case constraint would be. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_entity_types_entities_delete_entities_with_conditions( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_entity_types_entities_delete_entities_with_conditions( + connection, + entity_type, + 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, + :conditions => :query + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+entityType}/entities:deleteEntitiesWithConditions", %{ + "entityType" => URI.encode(entity_type, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.Empty{}]) + end + + @doc """ + Gets a single entity row matching the entity type and entity id specified in the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id} + * `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.Connectors.V2.Model.Entity{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_entity_types_entities_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.Entity.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_entity_types_entities_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) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.Entity{}]) + end + + @doc """ + Lists entity rows of a particular entity type contained in the request. Note: 1. Currently, only max of one 'sort_by' column is supported. 2. If no 'sort_by' column is provided, the primary key of the table is used. If zero or more than one primary key is available, we default to the unpaginated list entities logic which only returns the first page. 3. The values of the 'sort_by' columns must uniquely identify an entity row, otherwise undefined behaviors may be observed during pagination. 4. Since transactions are not supported, any updates, inserts or deletes during pagination can lead to stale data being returned or other unexpected behaviors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type} + * `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"). + * `:conditions` (*type:* `String.t`) - Conditions to be used when listing entities. From a proto standpoint, There are no restrictions on what can be passed using this field. The connector documentation should have information about what format of filters/conditions are supported. + * `:pageSize` (*type:* `integer()`) - Number of entity rows to return. Defaults page size = 25. Max page size = 200. + * `:pageToken` (*type:* `String.t`) - Page token value if available from a previous request. + * `:sortBy` (*type:* `list(String.t)`) - List of 'sort_by' columns to use when returning the results. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.ListEntitiesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_entity_types_entities_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.ListEntitiesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_entity_types_entities_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, + :conditions => :query, + :pageSize => :query, + :pageToken => :query, + :sortBy => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+parent}/entities", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.ListEntitiesResponse{}]) + end + + @doc """ + Updates an existing entity row matching the entity type and entity id specified in the request. The fields in the entity row that need to be modified are contained in the body of the request. All unspecified fields are left unchanged. The response message contains a `Entity` message object returned as a response by the external system. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id} + * `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.Connectors.V2.Model.Entity.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.Entity{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_entity_types_entities_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.Entity.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_entity_types_entities_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, + :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) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Connectors.V2.Model.Entity{}]) + end + + @doc """ + Updates entities based on conditions specified in the request and not on entity id. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Connectors.V2.Connection.t`) - Connection to server + * `entity_type` (*type:* `String.t`) - Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type} + * `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"). + * `:conditions` (*type:* `String.t`) - Required. Conditions to be used when updating entities. From a proto standpoint, There are no restrictions on what can be passed using this field. The connector documentation should have information about what format of filters/conditions are supported. Note: If this conditions field is left empty, an exception is thrown. We don't want to consider 'empty conditions' to be a match-all case. Connector developers can determine and document what a match-all case constraint would be. + * `:body` (*type:* `GoogleApi.Connectors.V2.Model.Entity.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Connectors.V2.Model.UpdateEntitiesWithConditionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec connectors_projects_locations_connections_entity_types_entities_update_entities_with_conditions( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Connectors.V2.Model.UpdateEntitiesWithConditionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def connectors_projects_locations_connections_entity_types_entities_update_entities_with_conditions( + connection, + entity_type, + 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, + :conditions => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+entityType}/entities:updateEntitiesWithConditions", %{ + "entityType" => URI.encode(entity_type, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Connectors.V2.Model.UpdateEntitiesWithConditionsResponse{}] + ) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/connection.ex b/clients/connectors/lib/google_api/connectors/v2/connection.ex new file mode 100644 index 0000000000..0e01c095cd --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/connection.ex @@ -0,0 +1,32 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Connection do + @moduledoc """ + Handle Tesla connections for GoogleApi.Connectors.V2. + """ + + @type t :: Tesla.Env.client() + + use GoogleApi.Gax.Connection, + scopes: [ + # See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. + "https://www.googleapis.com/auth/cloud-platform" + ], + otp_app: :google_api_connectors, + base_url: "https://connectors.googleapis.com/" +end diff --git a/clients/connectors/lib/google_api/connectors/v2/metadata.ex b/clients/connectors/lib/google_api/connectors/v2/metadata.ex new file mode 100644 index 0000000000..dd708f9c5a --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/metadata.ex @@ -0,0 +1,26 @@ +# Copyright 2020 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2 do + @moduledoc """ + API client metadata for GoogleApi.Connectors.V2. + """ + + @discovery_revision "20240305" + + def discovery_revision(), do: @discovery_revision +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/access_credentials.ex b/clients/connectors/lib/google_api/connectors/v2/model/access_credentials.ex new file mode 100644 index 0000000000..88bb8b2776 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/access_credentials.ex @@ -0,0 +1,52 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.AccessCredentials do + @moduledoc """ + AccessCredentials includes the OAuth access token, and the other fields returned along with it. + + ## Attributes + + * `accessToken` (*type:* `String.t`, *default:* `nil`) - OAuth access token. + * `expiresIn` (*type:* `String.t`, *default:* `nil`) - Duration till the access token expires. + * `refreshToken` (*type:* `String.t`, *default:* `nil`) - OAuth refresh token. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :accessToken => String.t() | nil, + :expiresIn => String.t() | nil, + :refreshToken => String.t() | nil + } + + field(:accessToken) + field(:expiresIn) + field(:refreshToken) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.AccessCredentials do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.AccessCredentials.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.AccessCredentials do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/action.ex b/clients/connectors/lib/google_api/connectors/v2/model/action.ex new file mode 100644 index 0000000000..f853798cef --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/action.ex @@ -0,0 +1,64 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.Action do + @moduledoc """ + Action message contains metadata information about a single action present in the external system. + + ## Attributes + + * `description` (*type:* `String.t`, *default:* `nil`) - Brief Description of action + * `displayName` (*type:* `String.t`, *default:* `nil`) - Display Name of action to be shown on client side + * `inputJsonSchema` (*type:* `GoogleApi.Connectors.V2.Model.JsonSchema.t`, *default:* `nil`) - JsonSchema representation of this actions's input schema + * `inputParameters` (*type:* `list(GoogleApi.Connectors.V2.Model.InputParameter.t)`, *default:* `nil`) - List containing input parameter metadata. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the action. + * `resultJsonSchema` (*type:* `GoogleApi.Connectors.V2.Model.JsonSchema.t`, *default:* `nil`) - JsonSchema representation of this actions's result schema + * `resultMetadata` (*type:* `list(GoogleApi.Connectors.V2.Model.ResultMetadata.t)`, *default:* `nil`) - List containing the metadata of result fields. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :description => String.t() | nil, + :displayName => String.t() | nil, + :inputJsonSchema => GoogleApi.Connectors.V2.Model.JsonSchema.t() | nil, + :inputParameters => list(GoogleApi.Connectors.V2.Model.InputParameter.t()) | nil, + :name => String.t() | nil, + :resultJsonSchema => GoogleApi.Connectors.V2.Model.JsonSchema.t() | nil, + :resultMetadata => list(GoogleApi.Connectors.V2.Model.ResultMetadata.t()) | nil + } + + field(:description) + field(:displayName) + field(:inputJsonSchema, as: GoogleApi.Connectors.V2.Model.JsonSchema) + field(:inputParameters, as: GoogleApi.Connectors.V2.Model.InputParameter, type: :list) + field(:name) + field(:resultJsonSchema, as: GoogleApi.Connectors.V2.Model.JsonSchema) + field(:resultMetadata, as: GoogleApi.Connectors.V2.Model.ResultMetadata, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.Action do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.Action.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.Action do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/check_readiness_response.ex b/clients/connectors/lib/google_api/connectors/v2/model/check_readiness_response.ex new file mode 100644 index 0000000000..c7015eab81 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/check_readiness_response.ex @@ -0,0 +1,46 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.CheckReadinessResponse do + @moduledoc """ + Response containing status of the connector for readiness prober. + + ## Attributes + + * `status` (*type:* `String.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :status => String.t() | nil + } + + field(:status) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.CheckReadinessResponse do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.CheckReadinessResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.CheckReadinessResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/check_status_response.ex b/clients/connectors/lib/google_api/connectors/v2/model/check_status_response.ex new file mode 100644 index 0000000000..bfb3ab0aa3 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/check_status_response.ex @@ -0,0 +1,49 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.CheckStatusResponse do + @moduledoc """ + The status of the connector. + + ## Attributes + + * `description` (*type:* `String.t`, *default:* `nil`) - When the connector is not in ACTIVE state, the description must be populated to specify the reason why it's not in ACTIVE state. + * `state` (*type:* `String.t`, *default:* `nil`) - State of the connector. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :description => String.t() | nil, + :state => String.t() | nil + } + + field(:description) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.CheckStatusResponse do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.CheckStatusResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.CheckStatusResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/daily_cycle.ex b/clients/connectors/lib/google_api/connectors/v2/model/daily_cycle.ex new file mode 100644 index 0000000000..910619c3cd --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/daily_cycle.ex @@ -0,0 +1,49 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.DailyCycle do + @moduledoc """ + Time window specified for daily operations. + + ## Attributes + + * `duration` (*type:* `String.t`, *default:* `nil`) - Output only. Duration of the time window, set by service producer. + * `startTime` (*type:* `GoogleApi.Connectors.V2.Model.TimeOfDay.t`, *default:* `nil`) - Time within the day to start the operations. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :duration => String.t() | nil, + :startTime => GoogleApi.Connectors.V2.Model.TimeOfDay.t() | nil + } + + field(:duration) + field(:startTime, as: GoogleApi.Connectors.V2.Model.TimeOfDay) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.DailyCycle do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.DailyCycle.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.DailyCycle do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/date.ex b/clients/connectors/lib/google_api/connectors/v2/model/date.ex new file mode 100644 index 0000000000..f66394e477 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/date.ex @@ -0,0 +1,52 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.Date do + @moduledoc """ + Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp + + ## Attributes + + * `day` (*type:* `integer()`, *default:* `nil`) - Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. + * `month` (*type:* `integer()`, *default:* `nil`) - Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. + * `year` (*type:* `integer()`, *default:* `nil`) - Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :day => integer() | nil, + :month => integer() | nil, + :year => integer() | nil + } + + field(:day) + field(:month) + field(:year) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.Date do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.Date.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.Date do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/deny_maintenance_period.ex b/clients/connectors/lib/google_api/connectors/v2/model/deny_maintenance_period.ex new file mode 100644 index 0000000000..5923eb7b34 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/deny_maintenance_period.ex @@ -0,0 +1,52 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.DenyMaintenancePeriod do + @moduledoc """ + DenyMaintenancePeriod definition. Maintenance is forbidden within the deny period. The start_date must be less than the end_date. + + ## Attributes + + * `endDate` (*type:* `GoogleApi.Connectors.V2.Model.Date.t`, *default:* `nil`) - Deny period end date. This can be: * A full date, with non-zero year, month and day values. * A month and day value, with a zero year. Allows recurring deny periods each year. Date matching this period will have to be before the end. + * `startDate` (*type:* `GoogleApi.Connectors.V2.Model.Date.t`, *default:* `nil`) - Deny period start date. This can be: * A full date, with non-zero year, month and day values. * A month and day value, with a zero year. Allows recurring deny periods each year. Date matching this period will have to be the same or after the start. + * `time` (*type:* `GoogleApi.Connectors.V2.Model.TimeOfDay.t`, *default:* `nil`) - Time in UTC when the Blackout period starts on start_date and ends on end_date. This can be: * Full time. * All zeros for 00:00:00 UTC + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endDate => GoogleApi.Connectors.V2.Model.Date.t() | nil, + :startDate => GoogleApi.Connectors.V2.Model.Date.t() | nil, + :time => GoogleApi.Connectors.V2.Model.TimeOfDay.t() | nil + } + + field(:endDate, as: GoogleApi.Connectors.V2.Model.Date) + field(:startDate, as: GoogleApi.Connectors.V2.Model.Date) + field(:time, as: GoogleApi.Connectors.V2.Model.TimeOfDay) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.DenyMaintenancePeriod do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.DenyMaintenancePeriod.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.DenyMaintenancePeriod do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/empty.ex b/clients/connectors/lib/google_api/connectors/v2/model/empty.ex new file mode 100644 index 0000000000..97d82f64f0 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/empty.ex @@ -0,0 +1,41 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.Empty do + @moduledoc """ + A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.Empty do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.Empty.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.Empty do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/entity.ex b/clients/connectors/lib/google_api/connectors/v2/model/entity.ex new file mode 100644 index 0000000000..bc63f88a23 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/entity.ex @@ -0,0 +1,49 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.Entity do + @moduledoc """ + 'Entity row'/ 'Entity' refers to a single row of an entity type. + + ## Attributes + + * `fields` (*type:* `map()`, *default:* `nil`) - Fields of the entity. The key is name of the field and the value contains the applicable `google.protobuf.Value` entry for this field. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id} + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fields => map() | nil, + :name => String.t() | nil + } + + field(:fields, type: :map) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.Entity do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.Entity.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.Entity do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/entity_type.ex b/clients/connectors/lib/google_api/connectors/v2/model/entity_type.ex new file mode 100644 index 0000000000..5f60b91073 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/entity_type.ex @@ -0,0 +1,52 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.EntityType do + @moduledoc """ + EntityType message contains metadata information about a single entity type present in the external system. + + ## Attributes + + * `fields` (*type:* `list(GoogleApi.Connectors.V2.Model.Field.t)`, *default:* `nil`) - List containing metadata information about each field of the entity type. + * `jsonSchema` (*type:* `GoogleApi.Connectors.V2.Model.JsonSchema.t`, *default:* `nil`) - JsonSchema representation of this entity's schema + * `name` (*type:* `String.t`, *default:* `nil`) - The name of the entity type. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fields => list(GoogleApi.Connectors.V2.Model.Field.t()) | nil, + :jsonSchema => GoogleApi.Connectors.V2.Model.JsonSchema.t() | nil, + :name => String.t() | nil + } + + field(:fields, as: GoogleApi.Connectors.V2.Model.Field, type: :list) + field(:jsonSchema, as: GoogleApi.Connectors.V2.Model.JsonSchema) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.EntityType do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.EntityType.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.EntityType do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/exchange_auth_code_request.ex b/clients/connectors/lib/google_api/connectors/v2/model/exchange_auth_code_request.ex new file mode 100644 index 0000000000..9dfc32dcb1 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/exchange_auth_code_request.ex @@ -0,0 +1,41 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ExchangeAuthCodeRequest do + @moduledoc """ + ExchangeAuthCodeRequest currently includes no fields. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ExchangeAuthCodeRequest do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ExchangeAuthCodeRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ExchangeAuthCodeRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/exchange_auth_code_response.ex b/clients/connectors/lib/google_api/connectors/v2/model/exchange_auth_code_response.ex new file mode 100644 index 0000000000..129339dcb4 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/exchange_auth_code_response.ex @@ -0,0 +1,46 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ExchangeAuthCodeResponse do + @moduledoc """ + ExchangeAuthCodeResponse includes the returned access token and its associated credentials. + + ## Attributes + + * `accessCredentials` (*type:* `GoogleApi.Connectors.V2.Model.AccessCredentials.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :accessCredentials => GoogleApi.Connectors.V2.Model.AccessCredentials.t() | nil + } + + field(:accessCredentials, as: GoogleApi.Connectors.V2.Model.AccessCredentials) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ExchangeAuthCodeResponse do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ExchangeAuthCodeResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ExchangeAuthCodeResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/execute_action_request.ex b/clients/connectors/lib/google_api/connectors/v2/model/execute_action_request.ex new file mode 100644 index 0000000000..906b29713f --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/execute_action_request.ex @@ -0,0 +1,46 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ExecuteActionRequest do + @moduledoc """ + Request message for ActionService.ExecuteAction + + ## Attributes + + * `parameters` (*type:* `map()`, *default:* `nil`) - Parameters for executing the action. The parameters can be key/value pairs or nested structs. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :parameters => map() | nil + } + + field(:parameters, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ExecuteActionRequest do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ExecuteActionRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ExecuteActionRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/execute_action_response.ex b/clients/connectors/lib/google_api/connectors/v2/model/execute_action_response.ex new file mode 100644 index 0000000000..f3cc29056e --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/execute_action_response.ex @@ -0,0 +1,46 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ExecuteActionResponse do + @moduledoc """ + Response message for ActionService.ExecuteAction + + ## Attributes + + * `results` (*type:* `list(map())`, *default:* `nil`) - In the case of successful invocation of the specified action, the results Struct contains values based on the response of the action invoked. 1. If the action execution produces any entities as a result, they are returned as an array of Structs with the 'key' being the field name and the 'value' being the value of that field in each result row. { 'results': [{'key': 'value'}, ...] } + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :results => list(map()) | nil + } + + field(:results, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ExecuteActionResponse do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ExecuteActionResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ExecuteActionResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/execute_sql_query_request.ex b/clients/connectors/lib/google_api/connectors/v2/model/execute_sql_query_request.ex new file mode 100644 index 0000000000..8885a6e9ed --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/execute_sql_query_request.ex @@ -0,0 +1,46 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ExecuteSqlQueryRequest do + @moduledoc """ + An execute sql query request containing the query and the connection to execute it on. + + ## Attributes + + * `query` (*type:* `GoogleApi.Connectors.V2.Model.Query.t`, *default:* `nil`) - Required. SQL statement passed by clients like Integration Platform, the query is passed as-is to the driver used for interfacing with external systems. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :query => GoogleApi.Connectors.V2.Model.Query.t() | nil + } + + field(:query, as: GoogleApi.Connectors.V2.Model.Query) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ExecuteSqlQueryRequest do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ExecuteSqlQueryRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ExecuteSqlQueryRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/execute_sql_query_response.ex b/clients/connectors/lib/google_api/connectors/v2/model/execute_sql_query_response.ex new file mode 100644 index 0000000000..47bc8f31de --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/execute_sql_query_response.ex @@ -0,0 +1,46 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ExecuteSqlQueryResponse do + @moduledoc """ + A response returned by the connection after executing the sql query. + + ## Attributes + + * `results` (*type:* `list(map())`, *default:* `nil`) - In the case of successful execution of the query the response contains results returned by the external system. For example, the result rows of the query are contained in the 'results' Struct list - "results": [ { "field1": "val1", "field2": "val2",.. },.. ] Each Struct row can contain fields any type of like nested Structs or lists. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :results => list(map()) | nil + } + + field(:results, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ExecuteSqlQueryResponse do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ExecuteSqlQueryResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ExecuteSqlQueryResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/field.ex b/clients/connectors/lib/google_api/connectors/v2/model/field.ex new file mode 100644 index 0000000000..3f0707c6aa --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/field.ex @@ -0,0 +1,70 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.Field do + @moduledoc """ + Message contains EntityType's Field metadata. + + ## Attributes + + * `additionalDetails` (*type:* `map()`, *default:* `nil`) - The following map contains fields that are not explicitly mentioned above,this give connectors the flexibility to add new metadata fields. + * `dataType` (*type:* `String.t`, *default:* `nil`) - The data type of the Field. + * `defaultValue` (*type:* `any()`, *default:* `nil`) - The following field specifies the default value of the Field provided by the external system if a value is not provided. + * `description` (*type:* `String.t`, *default:* `nil`) - A brief description of the Field. + * `jsonSchema` (*type:* `GoogleApi.Connectors.V2.Model.JsonSchema.t`, *default:* `nil`) - JsonSchema of the field, applicable only if field is of type `STRUCT` + * `key` (*type:* `boolean()`, *default:* `nil`) - The following boolean field specifies if the current Field acts as a primary key or id if the parent is of type entity. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the Field. + * `nullable` (*type:* `boolean()`, *default:* `nil`) - Specifies whether a null value is allowed. + * `reference` (*type:* `GoogleApi.Connectors.V2.Model.Reference.t`, *default:* `nil`) - Reference captures the association between two different entity types. Value links to the reference of another entity type. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :additionalDetails => map() | nil, + :dataType => String.t() | nil, + :defaultValue => any() | nil, + :description => String.t() | nil, + :jsonSchema => GoogleApi.Connectors.V2.Model.JsonSchema.t() | nil, + :key => boolean() | nil, + :name => String.t() | nil, + :nullable => boolean() | nil, + :reference => GoogleApi.Connectors.V2.Model.Reference.t() | nil + } + + field(:additionalDetails, type: :map) + field(:dataType) + field(:defaultValue) + field(:description) + field(:jsonSchema, as: GoogleApi.Connectors.V2.Model.JsonSchema) + field(:key) + field(:name) + field(:nullable) + field(:reference, as: GoogleApi.Connectors.V2.Model.Reference) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.Field do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.Field.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.Field do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/input_parameter.ex b/clients/connectors/lib/google_api/connectors/v2/model/input_parameter.ex new file mode 100644 index 0000000000..2fff92c88e --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/input_parameter.ex @@ -0,0 +1,64 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.InputParameter do + @moduledoc """ + Input Parameter message contains metadata about the parameters required for executing an Action. + + ## Attributes + + * `additionalDetails` (*type:* `map()`, *default:* `nil`) - The following map contains fields that are not explicitly mentioned above,this give connectors the flexibility to add new metadata fields. + * `dataType` (*type:* `String.t`, *default:* `nil`) - The data type of the Parameter + * `defaultValue` (*type:* `any()`, *default:* `nil`) - The following field specifies the default value of the Parameter provided by the external system if a value is not provided. + * `description` (*type:* `String.t`, *default:* `nil`) - A brief description of the Parameter. + * `jsonSchema` (*type:* `GoogleApi.Connectors.V2.Model.JsonSchema.t`, *default:* `nil`) - JsonSchema of the parameter, applicable only if parameter is of type `STRUCT` + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the Parameter. + * `nullable` (*type:* `boolean()`, *default:* `nil`) - Specifies whether a null value is allowed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :additionalDetails => map() | nil, + :dataType => String.t() | nil, + :defaultValue => any() | nil, + :description => String.t() | nil, + :jsonSchema => GoogleApi.Connectors.V2.Model.JsonSchema.t() | nil, + :name => String.t() | nil, + :nullable => boolean() | nil + } + + field(:additionalDetails, type: :map) + field(:dataType) + field(:defaultValue) + field(:description) + field(:jsonSchema, as: GoogleApi.Connectors.V2.Model.JsonSchema) + field(:name) + field(:nullable) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.InputParameter do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.InputParameter.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.InputParameter do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/instance.ex b/clients/connectors/lib/google_api/connectors/v2/model/instance.ex new file mode 100644 index 0000000000..92efd358b1 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/instance.ex @@ -0,0 +1,103 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.Instance do + @moduledoc """ + Instance represents the interface for SLM services to actuate the state of control plane resources. Example Instance in JSON, where consumer-project-number=123456, producer-project-id=cloud-sql: ```json Instance: { "name": "projects/123456/locations/us-east1/instances/prod-instance", "create_time": { "seconds": 1526406431, }, "labels": { "env": "prod", "foo": "bar" }, "state": READY, "software_versions": { "software_update": "cloud-sql-09-28-2018", }, "maintenance_policy_names": { "UpdatePolicy": "projects/123456/locations/us-east1/maintenancePolicies/prod-update-policy", } "tenant_project_id": "cloud-sql-test-tenant", "producer_metadata": { "cloud-sql-tier": "basic", "cloud-sql-instance-size": "1G", }, "provisioned_resources": [ { "resource-type": "compute-instance", "resource-url": "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/instances/vm-1", } ], "maintenance_schedules": { "csa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, }, "ncsa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, } }, "consumer_defined_name": "my-sql-instance1", } ``` LINT.IfChange + + ## Attributes + + * `consumerDefinedName` (*type:* `String.t`, *default:* `nil`) - consumer_defined_name is the name of the instance set by the service consumers. Generally this is different from the `name` field which reperesents the system-assigned id of the instance which the service consumers do not recognize. This is a required field for tenants onboarding to Maintenance Window notifications (go/slm-rollout-maintenance-policies#prerequisites). + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when the resource was created. + * `instanceType` (*type:* `String.t`, *default:* `nil`) - Optional. The instance_type of this instance of format: projects/{project_number}/locations/{location_id}/instanceTypes/{instance_type_id}. Instance Type represents a high-level tier or SKU of the service that this instance belong to. When enabled(eg: Maintenance Rollout), Rollout uses 'instance_type' along with 'software_versions' to determine whether instance needs an update or not. + * `labels` (*type:* `map()`, *default:* `nil`) - Optional. Resource labels to represent user provided metadata. Each label is a key-value pair, where both the key and the value are arbitrary strings provided by the user. + * `maintenancePolicyNames` (*type:* `map()`, *default:* `nil`) - Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For details, please refer to go/mr-user-guide. Should not be set if maintenance_settings.maintenance_policies is set. + * `maintenanceSchedules` (*type:* `%{optional(String.t) => GoogleApi.Connectors.V2.Model.MaintenanceSchedule.t}`, *default:* `nil`) - The MaintenanceSchedule contains the scheduling information of published maintenance schedule with same key as software_versions. + * `maintenanceSettings` (*type:* `GoogleApi.Connectors.V2.Model.MaintenanceSettings.t`, *default:* `nil`) - Optional. The MaintenanceSettings associated with instance. + * `name` (*type:* `String.t`, *default:* `nil`) - Unique name of the resource. It uses the form: `projects/{project_number}/locations/{location_id}/instances/{instance_id}` Note: This name is passed, stored and logged across the rollout system. So use of consumer project_id or any other consumer PII in the name is strongly discouraged for wipeout (go/wipeout) compliance. See go/elysium/project_ids#storage-guidance for more details. + * `notificationParameters` (*type:* `%{optional(String.t) => GoogleApi.Connectors.V2.Model.NotificationParameter.t}`, *default:* `nil`) - Optional. notification_parameter are information that service producers may like to include that is not relevant to Rollout. This parameter will only be passed to Gamma and Cloud Logging for notification/logging purpose. + * `producerMetadata` (*type:* `map()`, *default:* `nil`) - Output only. Custom string attributes used primarily to expose producer-specific information in monitoring dashboards. See go/get-instance-metadata. + * `provisionedResources` (*type:* `list(GoogleApi.Connectors.V2.Model.ProvisionedResource.t)`, *default:* `nil`) - Output only. The list of data plane resources provisioned for this instance, e.g. compute VMs. See go/get-instance-metadata. + * `slmInstanceTemplate` (*type:* `String.t`, *default:* `nil`) - Link to the SLM instance template. Only populated when updating SLM instances via SSA's Actuation service adaptor. Service producers with custom control plane (e.g. Cloud SQL) doesn't need to populate this field. Instead they should use software_versions. + * `sloMetadata` (*type:* `GoogleApi.Connectors.V2.Model.SloMetadata.t`, *default:* `nil`) - Output only. SLO metadata for instance classification in the Standardized dataplane SLO platform. See go/cloud-ssa-standard-slo for feature description. + * `softwareVersions` (*type:* `map()`, *default:* `nil`) - Software versions that are used to deploy this instance. This can be mutated by rollout services. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. Current lifecycle state of the resource (e.g. if it's being created or ready to use). + * `tenantProjectId` (*type:* `String.t`, *default:* `nil`) - Output only. ID of the associated GCP tenant project. See go/get-instance-metadata. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when the resource was last modified. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :consumerDefinedName => String.t() | nil, + :createTime => DateTime.t() | nil, + :instanceType => String.t() | nil, + :labels => map() | nil, + :maintenancePolicyNames => map() | nil, + :maintenanceSchedules => + %{optional(String.t()) => GoogleApi.Connectors.V2.Model.MaintenanceSchedule.t()} | nil, + :maintenanceSettings => GoogleApi.Connectors.V2.Model.MaintenanceSettings.t() | nil, + :name => String.t() | nil, + :notificationParameters => + %{optional(String.t()) => GoogleApi.Connectors.V2.Model.NotificationParameter.t()} + | nil, + :producerMetadata => map() | nil, + :provisionedResources => + list(GoogleApi.Connectors.V2.Model.ProvisionedResource.t()) | nil, + :slmInstanceTemplate => String.t() | nil, + :sloMetadata => GoogleApi.Connectors.V2.Model.SloMetadata.t() | nil, + :softwareVersions => map() | nil, + :state => String.t() | nil, + :tenantProjectId => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:consumerDefinedName) + field(:createTime, as: DateTime) + field(:instanceType) + field(:labels, type: :map) + field(:maintenancePolicyNames, type: :map) + field(:maintenanceSchedules, as: GoogleApi.Connectors.V2.Model.MaintenanceSchedule, type: :map) + field(:maintenanceSettings, as: GoogleApi.Connectors.V2.Model.MaintenanceSettings) + field(:name) + + field(:notificationParameters, + as: GoogleApi.Connectors.V2.Model.NotificationParameter, + type: :map + ) + + field(:producerMetadata, type: :map) + field(:provisionedResources, as: GoogleApi.Connectors.V2.Model.ProvisionedResource, type: :list) + field(:slmInstanceTemplate) + field(:sloMetadata, as: GoogleApi.Connectors.V2.Model.SloMetadata) + field(:softwareVersions, type: :map) + field(:state) + field(:tenantProjectId) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.Instance do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.Instance.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.Instance do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/json_schema.ex b/clients/connectors/lib/google_api/connectors/v2/model/json_schema.ex new file mode 100644 index 0000000000..77effdb375 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/json_schema.ex @@ -0,0 +1,74 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.JsonSchema do + @moduledoc """ + JsonSchema representation of schema metadata + + ## Attributes + + * `additionalDetails` (*type:* `map()`, *default:* `nil`) - Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema + * `default` (*type:* `any()`, *default:* `nil`) - The default value of the field or object described by this schema. + * `description` (*type:* `String.t`, *default:* `nil`) - A description of this schema. + * `enum` (*type:* `list(any())`, *default:* `nil`) - Possible values for an enumeration. This works in conjunction with `type` to represent types with a fixed set of legal values + * `format` (*type:* `String.t`, *default:* `nil`) - Format of the value as per https://json-schema.org/understanding-json-schema/reference/string.html#format + * `items` (*type:* `GoogleApi.Connectors.V2.Model.JsonSchema.t`, *default:* `nil`) - Schema that applies to array values, applicable only if this is of type `array`. + * `jdbcType` (*type:* `String.t`, *default:* `nil`) - JDBC datatype of the field. + * `properties` (*type:* `%{optional(String.t) => GoogleApi.Connectors.V2.Model.JsonSchema.t}`, *default:* `nil`) - The child schemas, applicable only if this is of type `object`. The key is the name of the property and the value is the json schema that describes that property + * `required` (*type:* `list(String.t)`, *default:* `nil`) - Whether this property is required. + * `type` (*type:* `list(String.t)`, *default:* `nil`) - JSON Schema Validation: A Vocabulary for Structural Validation of JSON + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :additionalDetails => map() | nil, + :default => any() | nil, + :description => String.t() | nil, + :enum => list(any()) | nil, + :format => String.t() | nil, + :items => GoogleApi.Connectors.V2.Model.JsonSchema.t() | nil, + :jdbcType => String.t() | nil, + :properties => + %{optional(String.t()) => GoogleApi.Connectors.V2.Model.JsonSchema.t()} | nil, + :required => list(String.t()) | nil, + :type => list(String.t()) | nil + } + + field(:additionalDetails, type: :map) + field(:default) + field(:description) + field(:enum, type: :list) + field(:format) + field(:items, as: GoogleApi.Connectors.V2.Model.JsonSchema) + field(:jdbcType) + field(:properties, as: GoogleApi.Connectors.V2.Model.JsonSchema, type: :map) + field(:required, type: :list) + field(:type, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.JsonSchema do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.JsonSchema.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.JsonSchema do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/list_actions_response.ex b/clients/connectors/lib/google_api/connectors/v2/model/list_actions_response.ex new file mode 100644 index 0000000000..5cece291df --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/list_actions_response.ex @@ -0,0 +1,52 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ListActionsResponse do + @moduledoc """ + Response message for ActionService.ListActions + + ## Attributes + + * `actions` (*type:* `list(GoogleApi.Connectors.V2.Model.Action.t)`, *default:* `nil`) - List of action metadata. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Next page token if more actions available. + * `unsupportedActionNames` (*type:* `list(String.t)`, *default:* `nil`) - List of actions which contain unsupported Datatypes. Check datatype.proto for more information. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :actions => list(GoogleApi.Connectors.V2.Model.Action.t()) | nil, + :nextPageToken => String.t() | nil, + :unsupportedActionNames => list(String.t()) | nil + } + + field(:actions, as: GoogleApi.Connectors.V2.Model.Action, type: :list) + field(:nextPageToken) + field(:unsupportedActionNames, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ListActionsResponse do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ListActionsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ListActionsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/list_entities_response.ex b/clients/connectors/lib/google_api/connectors/v2/model/list_entities_response.ex new file mode 100644 index 0000000000..6b3da70223 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/list_entities_response.ex @@ -0,0 +1,49 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ListEntitiesResponse do + @moduledoc """ + Response message for EntityService.ListEntities + + ## Attributes + + * `entities` (*type:* `list(GoogleApi.Connectors.V2.Model.Entity.t)`, *default:* `nil`) - List containing entity rows. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Next page token if more records are available. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :entities => list(GoogleApi.Connectors.V2.Model.Entity.t()) | nil, + :nextPageToken => String.t() | nil + } + + field(:entities, as: GoogleApi.Connectors.V2.Model.Entity, type: :list) + field(:nextPageToken) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ListEntitiesResponse do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ListEntitiesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ListEntitiesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/list_entity_types_response.ex b/clients/connectors/lib/google_api/connectors/v2/model/list_entity_types_response.ex new file mode 100644 index 0000000000..981e75aacb --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/list_entity_types_response.ex @@ -0,0 +1,52 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ListEntityTypesResponse do + @moduledoc """ + Response message for EntityService.ListEntityTypes + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Next page token if more entity types available. + * `types` (*type:* `list(GoogleApi.Connectors.V2.Model.EntityType.t)`, *default:* `nil`) - List of metadata related to all entity types. + * `unsupportedTypeNames` (*type:* `list(String.t)`, *default:* `nil`) - List of entity type names which contain unsupported Datatypes. Check datatype.proto for more information. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :types => list(GoogleApi.Connectors.V2.Model.EntityType.t()) | nil, + :unsupportedTypeNames => list(String.t()) | nil + } + + field(:nextPageToken) + field(:types, as: GoogleApi.Connectors.V2.Model.EntityType, type: :list) + field(:unsupportedTypeNames, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ListEntityTypesResponse do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ListEntityTypesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ListEntityTypesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/maintenance_policy.ex b/clients/connectors/lib/google_api/connectors/v2/model/maintenance_policy.ex new file mode 100644 index 0000000000..802dd7c3f8 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/maintenance_policy.ex @@ -0,0 +1,64 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.MaintenancePolicy do + @moduledoc """ + LINT.IfChange Defines policies to service maintenance events. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the resource was created. + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512. + * `labels` (*type:* `map()`, *default:* `nil`) - Optional. Resource labels to represent user provided metadata. Each label is a key-value pair, where both the key and the value are arbitrary strings provided by the user. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. MaintenancePolicy name using the form: `projects/{project_id}/locations/{location_id}/maintenancePolicies/{maintenance_policy_id}` where {project_id} refers to a GCP consumer project ID, {location_id} refers to a GCP region/zone, {maintenance_policy_id} must be 1-63 characters long and match the regular expression `[a-z0-9]([-a-z0-9]*[a-z0-9])?`. + * `state` (*type:* `String.t`, *default:* `nil`) - Optional. The state of the policy. + * `updatePolicy` (*type:* `GoogleApi.Connectors.V2.Model.UpdatePolicy.t`, *default:* `nil`) - Maintenance policy applicable to instance update. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the resource was updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :labels => map() | nil, + :name => String.t() | nil, + :state => String.t() | nil, + :updatePolicy => GoogleApi.Connectors.V2.Model.UpdatePolicy.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:labels, type: :map) + field(:name) + field(:state) + field(:updatePolicy, as: GoogleApi.Connectors.V2.Model.UpdatePolicy) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.MaintenancePolicy do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.MaintenancePolicy.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.MaintenancePolicy do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/maintenance_schedule.ex b/clients/connectors/lib/google_api/connectors/v2/model/maintenance_schedule.ex new file mode 100644 index 0000000000..195a8f410e --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/maintenance_schedule.ex @@ -0,0 +1,58 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.MaintenanceSchedule do + @moduledoc """ + Maintenance schedule which is exposed to customer and potentially end user, indicating published upcoming future maintenance schedule + + ## Attributes + + * `canReschedule` (*type:* `boolean()`, *default:* `nil`) - This field is deprecated, and will be always set to true since reschedule can happen multiple times now. This field should not be removed until all service producers remove this for their customers. + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - The scheduled end time for the maintenance. + * `rolloutManagementPolicy` (*type:* `String.t`, *default:* `nil`) - The rollout management policy this maintenance schedule is associated with. When doing reschedule update request, the reschedule should be against this given policy. + * `scheduleDeadlineTime` (*type:* `DateTime.t`, *default:* `nil`) - schedule_deadline_time is the time deadline any schedule start time cannot go beyond, including reschedule. It's normally the initial schedule start time plus maintenance window length (1 day or 1 week). Maintenance cannot be scheduled to start beyond this deadline. + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - The scheduled start time for the maintenance. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :canReschedule => boolean() | nil, + :endTime => DateTime.t() | nil, + :rolloutManagementPolicy => String.t() | nil, + :scheduleDeadlineTime => DateTime.t() | nil, + :startTime => DateTime.t() | nil + } + + field(:canReschedule) + field(:endTime, as: DateTime) + field(:rolloutManagementPolicy) + field(:scheduleDeadlineTime, as: DateTime) + field(:startTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.MaintenanceSchedule do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.MaintenanceSchedule.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.MaintenanceSchedule do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/maintenance_settings.ex b/clients/connectors/lib/google_api/connectors/v2/model/maintenance_settings.ex new file mode 100644 index 0000000000..cb45eeed02 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/maintenance_settings.ex @@ -0,0 +1,53 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.MaintenanceSettings do + @moduledoc """ + Maintenance settings associated with instance. Allows service producers and end users to assign settings that controls maintenance on this instance. + + ## Attributes + + * `exclude` (*type:* `boolean()`, *default:* `nil`) - Optional. Exclude instance from maintenance. When true, rollout service will not attempt maintenance on the instance. Rollout service will include the instance in reported rollout progress as not attempted. + * `isRollback` (*type:* `boolean()`, *default:* `nil`) - Optional. If the update call is triggered from rollback, set the value as true. + * `maintenancePolicies` (*type:* `%{optional(String.t) => GoogleApi.Connectors.V2.Model.MaintenancePolicy.t}`, *default:* `nil`) - Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the embedded policy must define the same policy type. For details, please refer to go/mr-user-guide. Should not be set if maintenance_policy_names is set. If only the name is needed, then only populate MaintenancePolicy.name. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :exclude => boolean() | nil, + :isRollback => boolean() | nil, + :maintenancePolicies => + %{optional(String.t()) => GoogleApi.Connectors.V2.Model.MaintenancePolicy.t()} | nil + } + + field(:exclude) + field(:isRollback) + field(:maintenancePolicies, as: GoogleApi.Connectors.V2.Model.MaintenancePolicy, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.MaintenanceSettings do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.MaintenanceSettings.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.MaintenanceSettings do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/maintenance_window.ex b/clients/connectors/lib/google_api/connectors/v2/model/maintenance_window.ex new file mode 100644 index 0000000000..e5be3b2f25 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/maintenance_window.ex @@ -0,0 +1,49 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.MaintenanceWindow do + @moduledoc """ + MaintenanceWindow definition. + + ## Attributes + + * `dailyCycle` (*type:* `GoogleApi.Connectors.V2.Model.DailyCycle.t`, *default:* `nil`) - Daily cycle. + * `weeklyCycle` (*type:* `GoogleApi.Connectors.V2.Model.WeeklyCycle.t`, *default:* `nil`) - Weekly cycle. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dailyCycle => GoogleApi.Connectors.V2.Model.DailyCycle.t() | nil, + :weeklyCycle => GoogleApi.Connectors.V2.Model.WeeklyCycle.t() | nil + } + + field(:dailyCycle, as: GoogleApi.Connectors.V2.Model.DailyCycle) + field(:weeklyCycle, as: GoogleApi.Connectors.V2.Model.WeeklyCycle) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.MaintenanceWindow do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.MaintenanceWindow.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.MaintenanceWindow do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/node_slo_metadata.ex b/clients/connectors/lib/google_api/connectors/v2/model/node_slo_metadata.ex new file mode 100644 index 0000000000..2f5e0e5427 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/node_slo_metadata.ex @@ -0,0 +1,52 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.NodeSloMetadata do + @moduledoc """ + Node information for custom per-node SLO implementations. SSA does not support per-node SLO, but producers can populate per-node information in SloMetadata for custom precomputations. SSA Eligibility Exporter will emit per-node metric based on this information. + + ## Attributes + + * `location` (*type:* `String.t`, *default:* `nil`) - The location of the node, if different from instance location. + * `nodeId` (*type:* `String.t`, *default:* `nil`) - The id of the node. This should be equal to SaasInstanceNode.node_id. + * `perSliEligibility` (*type:* `GoogleApi.Connectors.V2.Model.PerSliSloEligibility.t`, *default:* `nil`) - If present, this will override eligibility for the node coming from instance or exclusions for specified SLIs. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :location => String.t() | nil, + :nodeId => String.t() | nil, + :perSliEligibility => GoogleApi.Connectors.V2.Model.PerSliSloEligibility.t() | nil + } + + field(:location) + field(:nodeId) + field(:perSliEligibility, as: GoogleApi.Connectors.V2.Model.PerSliSloEligibility) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.NodeSloMetadata do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.NodeSloMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.NodeSloMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/notification_parameter.ex b/clients/connectors/lib/google_api/connectors/v2/model/notification_parameter.ex new file mode 100644 index 0000000000..8e6a1f1f4e --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/notification_parameter.ex @@ -0,0 +1,46 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.NotificationParameter do + @moduledoc """ + Contains notification related data. + + ## Attributes + + * `values` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Array of string values. e.g. instance's replica information. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :values => list(String.t()) | nil + } + + field(:values, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.NotificationParameter do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.NotificationParameter.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.NotificationParameter do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/per_sli_slo_eligibility.ex b/clients/connectors/lib/google_api/connectors/v2/model/per_sli_slo_eligibility.ex new file mode 100644 index 0000000000..9ef9aa5680 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/per_sli_slo_eligibility.ex @@ -0,0 +1,47 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.PerSliSloEligibility do + @moduledoc """ + PerSliSloEligibility is a mapping from an SLI name to eligibility. + + ## Attributes + + * `eligibilities` (*type:* `%{optional(String.t) => GoogleApi.Connectors.V2.Model.SloEligibility.t}`, *default:* `nil`) - An entry in the eligibilities map specifies an eligibility for a particular SLI for the given instance. The SLI key in the name must be a valid SLI name specified in the Eligibility Exporter binary flags otherwise an error will be emitted by Eligibility Exporter and the oncaller will be alerted. If an SLI has been defined in the binary flags but the eligibilities map does not contain it, the corresponding SLI time series will not be emitted by the Eligibility Exporter. This ensures a smooth rollout and compatibility between the data produced by different versions of the Eligibility Exporters. If eligibilities map contains a key for an SLI which has not been declared in the binary flags, there will be an error message emitted in the Eligibility Exporter log and the metric for the SLI in question will not be emitted. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :eligibilities => + %{optional(String.t()) => GoogleApi.Connectors.V2.Model.SloEligibility.t()} | nil + } + + field(:eligibilities, as: GoogleApi.Connectors.V2.Model.SloEligibility, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.PerSliSloEligibility do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.PerSliSloEligibility.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.PerSliSloEligibility do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/provisioned_resource.ex b/clients/connectors/lib/google_api/connectors/v2/model/provisioned_resource.ex new file mode 100644 index 0000000000..13a673e18e --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/provisioned_resource.ex @@ -0,0 +1,49 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ProvisionedResource do + @moduledoc """ + Describes provisioned dataplane resources. + + ## Attributes + + * `resourceType` (*type:* `String.t`, *default:* `nil`) - Type of the resource. This can be either a GCP resource or a custom one (e.g. another cloud provider's VM). For GCP compute resources use singular form of the names listed in GCP compute API documentation (https://cloud.google.com/compute/docs/reference/rest/v1/), prefixed with 'compute-', for example: 'compute-instance', 'compute-disk', 'compute-autoscaler'. + * `resourceUrl` (*type:* `String.t`, *default:* `nil`) - URL identifying the resource, e.g. "https://www.googleapis.com/compute/v1/projects/...)". + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :resourceType => String.t() | nil, + :resourceUrl => String.t() | nil + } + + field(:resourceType) + field(:resourceUrl) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ProvisionedResource do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ProvisionedResource.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ProvisionedResource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/query.ex b/clients/connectors/lib/google_api/connectors/v2/model/query.ex new file mode 100644 index 0000000000..90f62de045 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/query.ex @@ -0,0 +1,55 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.Query do + @moduledoc """ + A wrapper around the SQL query statement. This is needed so that the JSON representation of ExecuteSqlQueryRequest has the following format: `{"query":"select *"}`. + + ## Attributes + + * `maxRows` (*type:* `String.t`, *default:* `nil`) - Sets the limit for the maximum number of rows returned after the query execution. + * `query` (*type:* `String.t`, *default:* `nil`) - Required. Sql query to execute. + * `queryParameters` (*type:* `list(GoogleApi.Connectors.V2.Model.QueryParameter.t)`, *default:* `nil`) - In the struct, the value corresponds to the value of query parameter and date type corresponds to the date type of the query parameter. + * `timeout` (*type:* `String.t`, *default:* `nil`) - Sets the number of seconds the driver will wait for a query to execute. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :maxRows => String.t() | nil, + :query => String.t() | nil, + :queryParameters => list(GoogleApi.Connectors.V2.Model.QueryParameter.t()) | nil, + :timeout => String.t() | nil + } + + field(:maxRows) + field(:query) + field(:queryParameters, as: GoogleApi.Connectors.V2.Model.QueryParameter, type: :list) + field(:timeout) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.Query do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.Query.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.Query do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/query_parameter.ex b/clients/connectors/lib/google_api/connectors/v2/model/query_parameter.ex new file mode 100644 index 0000000000..67f36abf81 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/query_parameter.ex @@ -0,0 +1,49 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.QueryParameter do + @moduledoc """ + Query parameter definition + + ## Attributes + + * `dataType` (*type:* `String.t`, *default:* `nil`) - + * `value` (*type:* `any()`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataType => String.t() | nil, + :value => any() | nil + } + + field(:dataType) + field(:value) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.QueryParameter do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.QueryParameter.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.QueryParameter do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/reference.ex b/clients/connectors/lib/google_api/connectors/v2/model/reference.ex new file mode 100644 index 0000000000..8a050c8c72 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/reference.ex @@ -0,0 +1,49 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.Reference do + @moduledoc """ + + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the reference field. + * `type` (*type:* `String.t`, *default:* `nil`) - Name of reference entity type. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :type => String.t() | nil + } + + field(:name) + field(:type) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.Reference do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.Reference.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.Reference do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/refresh_access_token_request.ex b/clients/connectors/lib/google_api/connectors/v2/model/refresh_access_token_request.ex new file mode 100644 index 0000000000..9f1c817515 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/refresh_access_token_request.ex @@ -0,0 +1,41 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.RefreshAccessTokenRequest do + @moduledoc """ + RefreshAccessTokenRequest currently includes no fields. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.RefreshAccessTokenRequest do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.RefreshAccessTokenRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.RefreshAccessTokenRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/refresh_access_token_response.ex b/clients/connectors/lib/google_api/connectors/v2/model/refresh_access_token_response.ex new file mode 100644 index 0000000000..da2b9e732f --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/refresh_access_token_response.ex @@ -0,0 +1,46 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.RefreshAccessTokenResponse do + @moduledoc """ + RefreshAccessTokenResponse includes the returned access token and its associated credentials. + + ## Attributes + + * `accessCredentials` (*type:* `GoogleApi.Connectors.V2.Model.AccessCredentials.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :accessCredentials => GoogleApi.Connectors.V2.Model.AccessCredentials.t() | nil + } + + field(:accessCredentials, as: GoogleApi.Connectors.V2.Model.AccessCredentials) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.RefreshAccessTokenResponse do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.RefreshAccessTokenResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.RefreshAccessTokenResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/result_metadata.ex b/clients/connectors/lib/google_api/connectors/v2/model/result_metadata.ex new file mode 100644 index 0000000000..f21bb7ebc7 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/result_metadata.ex @@ -0,0 +1,55 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.ResultMetadata do + @moduledoc """ + Result Metadata message contains metadata about the result returned after executing an Action. + + ## Attributes + + * `dataType` (*type:* `String.t`, *default:* `nil`) - The data type of the metadata field + * `description` (*type:* `String.t`, *default:* `nil`) - A brief description of the metadata field. + * `jsonSchema` (*type:* `GoogleApi.Connectors.V2.Model.JsonSchema.t`, *default:* `nil`) - JsonSchema of the result, applicable only if parameter is of type `STRUCT` + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the metadata field. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataType => String.t() | nil, + :description => String.t() | nil, + :jsonSchema => GoogleApi.Connectors.V2.Model.JsonSchema.t() | nil, + :name => String.t() | nil + } + + field(:dataType) + field(:description) + field(:jsonSchema, as: GoogleApi.Connectors.V2.Model.JsonSchema) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.ResultMetadata do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.ResultMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.ResultMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/schedule.ex b/clients/connectors/lib/google_api/connectors/v2/model/schedule.ex new file mode 100644 index 0000000000..6222449c19 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/schedule.ex @@ -0,0 +1,52 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.Schedule do + @moduledoc """ + Configure the schedule. + + ## Attributes + + * `day` (*type:* `String.t`, *default:* `nil`) - Allows to define schedule that runs specified day of the week. + * `duration` (*type:* `String.t`, *default:* `nil`) - Output only. Duration of the time window, set by service producer. + * `startTime` (*type:* `GoogleApi.Connectors.V2.Model.TimeOfDay.t`, *default:* `nil`) - Time within the window to start the operations. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :day => String.t() | nil, + :duration => String.t() | nil, + :startTime => GoogleApi.Connectors.V2.Model.TimeOfDay.t() | nil + } + + field(:day) + field(:duration) + field(:startTime, as: GoogleApi.Connectors.V2.Model.TimeOfDay) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.Schedule do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.Schedule.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.Schedule do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/slo_eligibility.ex b/clients/connectors/lib/google_api/connectors/v2/model/slo_eligibility.ex new file mode 100644 index 0000000000..0f1856afd9 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/slo_eligibility.ex @@ -0,0 +1,49 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.SloEligibility do + @moduledoc """ + SloEligibility is a tuple containing eligibility value: true if an instance is eligible for SLO calculation or false if it should be excluded from all SLO-related calculations along with a user-defined reason. + + ## Attributes + + * `eligible` (*type:* `boolean()`, *default:* `nil`) - Whether an instance is eligible or ineligible. + * `reason` (*type:* `String.t`, *default:* `nil`) - User-defined reason for the current value of instance eligibility. Usually, this can be directly mapped to the internal state. An empty reason is allowed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :eligible => boolean() | nil, + :reason => String.t() | nil + } + + field(:eligible) + field(:reason) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.SloEligibility do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.SloEligibility.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.SloEligibility do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/slo_metadata.ex b/clients/connectors/lib/google_api/connectors/v2/model/slo_metadata.ex new file mode 100644 index 0000000000..111b6da80c --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/slo_metadata.ex @@ -0,0 +1,52 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.SloMetadata do + @moduledoc """ + SloMetadata contains resources required for proper SLO classification of the instance. + + ## Attributes + + * `nodes` (*type:* `list(GoogleApi.Connectors.V2.Model.NodeSloMetadata.t)`, *default:* `nil`) - Optional. List of nodes. Some producers need to use per-node metadata to calculate SLO. This field allows such producers to publish per-node SLO meta data, which will be consumed by SSA Eligibility Exporter and published in the form of per node metric to Monarch. + * `perSliEligibility` (*type:* `GoogleApi.Connectors.V2.Model.PerSliSloEligibility.t`, *default:* `nil`) - Optional. Multiple per-instance SLI eligibilities which apply for individual SLIs. + * `tier` (*type:* `String.t`, *default:* `nil`) - Name of the SLO tier the Instance belongs to. This name will be expected to match the tiers specified in the service SLO configuration. Field is mandatory and must not be empty. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nodes => list(GoogleApi.Connectors.V2.Model.NodeSloMetadata.t()) | nil, + :perSliEligibility => GoogleApi.Connectors.V2.Model.PerSliSloEligibility.t() | nil, + :tier => String.t() | nil + } + + field(:nodes, as: GoogleApi.Connectors.V2.Model.NodeSloMetadata, type: :list) + field(:perSliEligibility, as: GoogleApi.Connectors.V2.Model.PerSliSloEligibility) + field(:tier) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.SloMetadata do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.SloMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.SloMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/time_of_day.ex b/clients/connectors/lib/google_api/connectors/v2/model/time_of_day.ex new file mode 100644 index 0000000000..a4568165b0 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/time_of_day.ex @@ -0,0 +1,55 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.TimeOfDay do + @moduledoc """ + Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. + + ## Attributes + + * `hours` (*type:* `integer()`, *default:* `nil`) - Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. + * `minutes` (*type:* `integer()`, *default:* `nil`) - Minutes of hour of day. Must be from 0 to 59. + * `nanos` (*type:* `integer()`, *default:* `nil`) - Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + * `seconds` (*type:* `integer()`, *default:* `nil`) - Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :hours => integer() | nil, + :minutes => integer() | nil, + :nanos => integer() | nil, + :seconds => integer() | nil + } + + field(:hours) + field(:minutes) + field(:nanos) + field(:seconds) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.TimeOfDay do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.TimeOfDay.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.TimeOfDay do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/update_entities_with_conditions_response.ex b/clients/connectors/lib/google_api/connectors/v2/model/update_entities_with_conditions_response.ex new file mode 100644 index 0000000000..c79477af8c --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/update_entities_with_conditions_response.ex @@ -0,0 +1,46 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.UpdateEntitiesWithConditionsResponse do + @moduledoc """ + Response message for EntityService.UpdateEntitiesWithConditions + + ## Attributes + + * `response` (*type:* `map()`, *default:* `nil`) - Response returned by the external system. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :response => map() | nil + } + + field(:response, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.UpdateEntitiesWithConditionsResponse do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.UpdateEntitiesWithConditionsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.UpdateEntitiesWithConditionsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/update_policy.ex b/clients/connectors/lib/google_api/connectors/v2/model/update_policy.ex new file mode 100644 index 0000000000..f73324035c --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/update_policy.ex @@ -0,0 +1,58 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.UpdatePolicy do + @moduledoc """ + Maintenance policy applicable to instance updates. + + ## Attributes + + * `channel` (*type:* `String.t`, *default:* `nil`) - Optional. Relative scheduling channel applied to resource. + * `denyMaintenancePeriods` (*type:* `list(GoogleApi.Connectors.V2.Model.DenyMaintenancePeriod.t)`, *default:* `nil`) - Deny Maintenance Period that is applied to resource to indicate when maintenance is forbidden. The protocol supports zero-to-many such periods, but the current SLM Rollout implementation only supports zero-to-one. + * `window` (*type:* `GoogleApi.Connectors.V2.Model.MaintenanceWindow.t`, *default:* `nil`) - Optional. Maintenance window that is applied to resources covered by this policy. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :channel => String.t() | nil, + :denyMaintenancePeriods => + list(GoogleApi.Connectors.V2.Model.DenyMaintenancePeriod.t()) | nil, + :window => GoogleApi.Connectors.V2.Model.MaintenanceWindow.t() | nil + } + + field(:channel) + + field(:denyMaintenancePeriods, + as: GoogleApi.Connectors.V2.Model.DenyMaintenancePeriod, + type: :list + ) + + field(:window, as: GoogleApi.Connectors.V2.Model.MaintenanceWindow) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.UpdatePolicy do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.UpdatePolicy.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.UpdatePolicy do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/connectors/lib/google_api/connectors/v2/model/weekly_cycle.ex b/clients/connectors/lib/google_api/connectors/v2/model/weekly_cycle.ex new file mode 100644 index 0000000000..8a3aa09cd2 --- /dev/null +++ b/clients/connectors/lib/google_api/connectors/v2/model/weekly_cycle.ex @@ -0,0 +1,46 @@ +# 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 file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Connectors.V2.Model.WeeklyCycle do + @moduledoc """ + Time window specified for weekly operations. + + ## Attributes + + * `schedule` (*type:* `list(GoogleApi.Connectors.V2.Model.Schedule.t)`, *default:* `nil`) - User can specify multiple windows in a week. Minimum of 1 window. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :schedule => list(GoogleApi.Connectors.V2.Model.Schedule.t()) | nil + } + + field(:schedule, as: GoogleApi.Connectors.V2.Model.Schedule, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Connectors.V2.Model.WeeklyCycle do + def decode(value, options) do + GoogleApi.Connectors.V2.Model.WeeklyCycle.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Connectors.V2.Model.WeeklyCycle do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end