# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This class is auto generated by the swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # Do not edit the class manually. defmodule GoogleApi.Script.V1.Api.Processes do @moduledoc """ API calls for all endpoints tagged `Processes`. """ alias GoogleApi.Script.V1.Connection alias GoogleApi.Gax.{Request, Response} @doc """ List information about processes made by or on behalf of a user, such as process type and current status. ## Parameters - connection (GoogleApi.Script.V1.Connection): Connection to server - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - :oauth_token (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :pageSize (integer()): The maximum number of returned processes per page of results. Defaults to 50. - :pageToken (String.t): The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response. - :userProcessFilter.deploymentId (String.t): Optional field used to limit returned processes to those originating from projects with a specific deployment ID. - :userProcessFilter.endTime (DateTime.t): Optional field used to limit returned processes to those that completed on or before the given timestamp. - :userProcessFilter.functionName (String.t): Optional field used to limit returned processes to those originating from a script function with the given function name. - :userProcessFilter.projectName (String.t): Optional field used to limit returned processes to those originating from projects with project names containing a specific string. - :userProcessFilter.scriptId (String.t): Optional field used to limit returned processes to those originating from projects with a specific script ID. - :userProcessFilter.startTime (DateTime.t): Optional field used to limit returned processes to those that were started on or after the given timestamp. - :userProcessFilter.statuses ([String.t]): Optional field used to limit returned processes to those having one of the specified process statuses. - :userProcessFilter.types ([String.t]): Optional field used to limit returned processes to those having one of the specified process types. - :userProcessFilter.userAccessLevels ([String.t]): Optional field used to limit returned processes to those having one of the specified user access levels. ## Returns {:ok, %GoogleApi.Script.V1.Model.ListUserProcessesResponse{}} on success {:error, info} on failure """ @spec script_processes_list(Tesla.Env.client(), keyword()) :: {:ok, GoogleApi.Script.V1.Model.ListUserProcessesResponse.t()} | {:error, Tesla.Env.t()} def script_processes_list(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, :upload_protocol => :query, :uploadType => :query, :pageSize => :query, :pageToken => :query, :"userProcessFilter.deploymentId" => :query, :"userProcessFilter.endTime" => :query, :"userProcessFilter.functionName" => :query, :"userProcessFilter.projectName" => :query, :"userProcessFilter.scriptId" => :query, :"userProcessFilter.startTime" => :query, :"userProcessFilter.statuses" => :query, :"userProcessFilter.types" => :query, :"userProcessFilter.userAccessLevels" => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v1/processes") |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Script.V1.Model.ListUserProcessesResponse{}]) end @doc """ List information about a script's executed processes, such as process type and current status. ## Parameters - connection (GoogleApi.Script.V1.Connection): Connection to server - optional_params (KeywordList): [optional] Optional parameters - :$.xgafv (String.t): V1 error format. - :access_token (String.t): OAuth access token. - :alt (String.t): Data format for response. - :callback (String.t): JSONP - :fields (String.t): Selector specifying which fields to include in a partial response. - :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - :oauth_token (String.t): OAuth 2.0 token for the current user. - :prettyPrint (boolean()): Returns response with indentations and line breaks. - :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\"). - :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\"). - :pageSize (integer()): The maximum number of returned processes per page of results. Defaults to 50. - :pageToken (String.t): The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response. - :scriptId (String.t): The script ID of the project whose processes are listed. - :scriptProcessFilter.deploymentId (String.t): Optional field used to limit returned processes to those originating from projects with a specific deployment ID. - :scriptProcessFilter.endTime (DateTime.t): Optional field used to limit returned processes to those that completed on or before the given timestamp. - :scriptProcessFilter.functionName (String.t): Optional field used to limit returned processes to those originating from a script function with the given function name. - :scriptProcessFilter.startTime (DateTime.t): Optional field used to limit returned processes to those that were started on or after the given timestamp. - :scriptProcessFilter.statuses ([String.t]): Optional field used to limit returned processes to those having one of the specified process statuses. - :scriptProcessFilter.types ([String.t]): Optional field used to limit returned processes to those having one of the specified process types. - :scriptProcessFilter.userAccessLevels ([String.t]): Optional field used to limit returned processes to those having one of the specified user access levels. ## Returns {:ok, %GoogleApi.Script.V1.Model.ListScriptProcessesResponse{}} on success {:error, info} on failure """ @spec script_processes_list_script_processes(Tesla.Env.client(), keyword()) :: {:ok, GoogleApi.Script.V1.Model.ListScriptProcessesResponse.t()} | {:error, Tesla.Env.t()} def script_processes_list_script_processes(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, :upload_protocol => :query, :uploadType => :query, :pageSize => :query, :pageToken => :query, :scriptId => :query, :"scriptProcessFilter.deploymentId" => :query, :"scriptProcessFilter.endTime" => :query, :"scriptProcessFilter.functionName" => :query, :"scriptProcessFilter.startTime" => :query, :"scriptProcessFilter.statuses" => :query, :"scriptProcessFilter.types" => :query, :"scriptProcessFilter.userAccessLevels" => :query } request = Request.new() |> Request.method(:get) |> Request.url("/v1/processes:listScriptProcesses") |> Request.add_optional_params(optional_params_config, optional_params) connection |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Script.V1.Model.ListScriptProcessesResponse{}]) end end