Current section

Files

Jump to
google_api_dataflow lib google_api dataflow v1b3 api projects.ex
Raw

lib/google_api/dataflow/v1b3/api/projects.ex

# 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.Dataflow.V1b3.Api.Projects do
@moduledoc """
API calls for all endpoints tagged `Projects`.
"""
alias GoogleApi.Dataflow.V1b3.Connection
import GoogleApi.Dataflow.V1b3.RequestBuilder
@doc """
List the jobs of a project across all regions.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project which owns the jobs.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :filter (String): The kind of filter to use.
- :location (String): The location that contains this job.
- :page_token (String): Set this to the 'next_page_token' field of a previous response to request additional results in a long list.
- :page_size (Integer): If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.
- :view (String): Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.ListJobsResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_aggregated(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.ListJobsResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_aggregated(connection, project_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"filter" => :query,
:"location" => :query,
:"pageToken" => :query,
:"pageSize" => :query,
:"view" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/jobs:aggregated", %{
"projectId" => URI.encode_www_form(project_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.ListJobsResponse{})
end
@doc """
Creates a Cloud Dataflow job.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The ID of the Cloud Platform project that the job belongs to.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :location (String): The location that contains this job.
- :replace_job_id (String): Deprecated. This field is now in the Job message.
- :view (String): The level of information requested in response.
- :body (Job):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.Job{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_create(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.Job.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_create(connection, project_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"location" => :query,
:"replaceJobId" => :query,
:"view" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/jobs", %{
"projectId" => URI.encode_www_form(project_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.Job{})
end
@doc """
Get encoded debug configuration for component. Not cacheable.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project id.
- job_id (String): The job id.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (GetDebugConfigRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.GetDebugConfigResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_debug_get_config(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.GetDebugConfigResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_debug_get_config(connection, project_id, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.GetDebugConfigResponse{})
end
@doc """
Send encoded debug capture data for component.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project id.
- job_id (String): The job id.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (SendDebugCaptureRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.SendDebugCaptureResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_debug_send_capture(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.SendDebugCaptureResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_debug_send_capture(connection, project_id, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.SendDebugCaptureResponse{})
end
@doc """
Gets the state of the specified Cloud Dataflow job.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The ID of the Cloud Platform project that the job belongs to.
- job_id (String): The job ID.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :location (String): The location that contains this job.
- :view (String): The level of information requested in response.
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.Job{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_get(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.Job.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_get(connection, project_id, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"location" => :query,
:"view" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/jobs/{jobId}", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.Job{})
end
@doc """
Request the job status.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): A project id.
- job_id (String): The job to get messages for.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :location (String): The location which contains the job specified by job_id.
- :start_time (String): Return only metric data that has changed since this time. Default is to return all information about all metrics for the job.
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.JobMetrics{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_get_metrics(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.JobMetrics.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_get_metrics(connection, project_id, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"location" => :query,
:"startTime" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/jobs/{jobId}/metrics", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.JobMetrics{})
end
@doc """
List the jobs of a project in a given region.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project which owns the jobs.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :filter (String): The kind of filter to use.
- :location (String): The location that contains this job.
- :page_token (String): Set this to the 'next_page_token' field of a previous response to request additional results in a long list.
- :page_size (Integer): If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.
- :view (String): Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.ListJobsResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_list(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.ListJobsResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_list(connection, project_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"filter" => :query,
:"location" => :query,
:"pageToken" => :query,
:"pageSize" => :query,
:"view" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/jobs", %{
"projectId" => URI.encode_www_form(project_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.ListJobsResponse{})
end
@doc """
Request the job status.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): A project id.
- job_id (String): The job to get messages about.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :start_time (String): If specified, return only messages with timestamps >= start_time. The default is the job creation time (i.e. beginning of messages).
- :page_token (String): If supplied, this should be the value of next_page_token returned by an earlier call. This will cause the next page of results to be returned.
- :page_size (Integer): If specified, determines the maximum number of messages to return. If unspecified, the service may choose an appropriate default, or may return an arbitrarily large number of results.
- :minimum_importance (String): Filter to only get messages with importance >= level
- :location (String): The location which contains the job specified by job_id.
- :end_time (String): Return only messages with timestamps < end_time. The default is now (i.e. return up to the latest messages available).
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.ListJobMessagesResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_messages_list(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.ListJobMessagesResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_messages_list(connection, project_id, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"startTime" => :query,
:"pageToken" => :query,
:"pageSize" => :query,
:"minimumImportance" => :query,
:"location" => :query,
:"endTime" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/jobs/{jobId}/messages", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.ListJobMessagesResponse{})
end
@doc """
Updates the state of an existing Cloud Dataflow job.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The ID of the Cloud Platform project that the job belongs to.
- job_id (String): The job ID.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :location (String): The location that contains this job.
- :body (Job):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.Job{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_update(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.Job.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_update(connection, project_id, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"location" => :query,
:"body" => :body
}
%{}
|> method(:put)
|> url("/v1b3/projects/{projectId}/jobs/{jobId}", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.Job{})
end
@doc """
Leases a dataflow WorkItem to run.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): Identifies the project this worker belongs to.
- job_id (String): Identifies the workflow job this worker belongs to.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (LeaseWorkItemRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.LeaseWorkItemResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_work_items_lease(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.LeaseWorkItemResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_work_items_lease(connection, project_id, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.LeaseWorkItemResponse{})
end
@doc """
Reports the status of dataflow WorkItems leased by a worker.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project which owns the WorkItem's job.
- job_id (String): The job which the WorkItem is part of.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (ReportWorkItemStatusRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.ReportWorkItemStatusResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_jobs_work_items_report_status(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.ReportWorkItemStatusResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_jobs_work_items_report_status(connection, project_id, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.ReportWorkItemStatusResponse{})
end
@doc """
Creates a Cloud Dataflow job.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The ID of the Cloud Platform project that the job belongs to.
- location (String): The location that contains this job.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :view (String): The level of information requested in response.
- :replace_job_id (String): Deprecated. This field is now in the Job message.
- :body (Job):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.Job{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_jobs_create(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.Job.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_jobs_create(connection, project_id, location, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"view" => :query,
:"replaceJobId" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/locations/{location}/jobs", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.Job{})
end
@doc """
Get encoded debug configuration for component. Not cacheable.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project id.
- location (String): The location which contains the job specified by job_id.
- job_id (String): The job id.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (GetDebugConfigRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.GetDebugConfigResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_jobs_debug_get_config(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.GetDebugConfigResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_jobs_debug_get_config(connection, project_id, location, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.GetDebugConfigResponse{})
end
@doc """
Send encoded debug capture data for component.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project id.
- location (String): The location which contains the job specified by job_id.
- job_id (String): The job id.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (SendDebugCaptureRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.SendDebugCaptureResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_jobs_debug_send_capture(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.SendDebugCaptureResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_jobs_debug_send_capture(connection, project_id, location, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.SendDebugCaptureResponse{})
end
@doc """
Gets the state of the specified Cloud Dataflow job.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The ID of the Cloud Platform project that the job belongs to.
- location (String): The location that contains this job.
- job_id (String): The job ID.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :view (String): The level of information requested in response.
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.Job{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_jobs_get(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.Job.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_jobs_get(connection, project_id, location, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"view" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.Job{})
end
@doc """
Request the job status.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): A project id.
- location (String): The location which contains the job specified by job_id.
- job_id (String): The job to get messages for.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :start_time (String): Return only metric data that has changed since this time. Default is to return all information about all metrics for the job.
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.JobMetrics{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_jobs_get_metrics(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.JobMetrics.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_jobs_get_metrics(connection, project_id, location, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"startTime" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.JobMetrics{})
end
@doc """
List the jobs of a project in a given region.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project which owns the jobs.
- location (String): The location that contains this job.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :page_token (String): Set this to the 'next_page_token' field of a previous response to request additional results in a long list.
- :page_size (Integer): If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.
- :view (String): Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.
- :filter (String): The kind of filter to use.
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.ListJobsResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_jobs_list(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.ListJobsResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_jobs_list(connection, project_id, location, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"pageToken" => :query,
:"pageSize" => :query,
:"view" => :query,
:"filter" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/locations/{location}/jobs", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.ListJobsResponse{})
end
@doc """
Request the job status.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): A project id.
- location (String): The location which contains the job specified by job_id.
- job_id (String): The job to get messages about.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :end_time (String): Return only messages with timestamps < end_time. The default is now (i.e. return up to the latest messages available).
- :start_time (String): If specified, return only messages with timestamps >= start_time. The default is the job creation time (i.e. beginning of messages).
- :page_token (String): If supplied, this should be the value of next_page_token returned by an earlier call. This will cause the next page of results to be returned.
- :page_size (Integer): If specified, determines the maximum number of messages to return. If unspecified, the service may choose an appropriate default, or may return an arbitrarily large number of results.
- :minimum_importance (String): Filter to only get messages with importance >= level
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.ListJobMessagesResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_jobs_messages_list(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.ListJobMessagesResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_jobs_messages_list(connection, project_id, location, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"endTime" => :query,
:"startTime" => :query,
:"pageToken" => :query,
:"pageSize" => :query,
:"minimumImportance" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.ListJobMessagesResponse{})
end
@doc """
Updates the state of an existing Cloud Dataflow job.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The ID of the Cloud Platform project that the job belongs to.
- location (String): The location that contains this job.
- job_id (String): The job ID.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (Job):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.Job{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_jobs_update(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.Job.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_jobs_update(connection, project_id, location, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:put)
|> url("/v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.Job{})
end
@doc """
Leases a dataflow WorkItem to run.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): Identifies the project this worker belongs to.
- location (String): The location which contains the WorkItem's job.
- job_id (String): Identifies the workflow job this worker belongs to.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (LeaseWorkItemRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.LeaseWorkItemResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_jobs_work_items_lease(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.LeaseWorkItemResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_jobs_work_items_lease(connection, project_id, location, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.LeaseWorkItemResponse{})
end
@doc """
Reports the status of dataflow WorkItems leased by a worker.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project which owns the WorkItem's job.
- location (String): The location which contains the WorkItem's job.
- job_id (String): The job which the WorkItem is part of.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (ReportWorkItemStatusRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.ReportWorkItemStatusResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_jobs_work_items_report_status(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.ReportWorkItemStatusResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_jobs_work_items_report_status(connection, project_id, location, job_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location),
"jobId" => URI.encode_www_form(job_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.ReportWorkItemStatusResponse{})
end
@doc """
Creates a Cloud Dataflow job from a template.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): Required. The ID of the Cloud Platform project that the job belongs to.
- location (String): The location to which to direct the request.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (CreateJobFromTemplateRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.Job{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_templates_create(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.Job.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_templates_create(connection, project_id, location, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/locations/{location}/templates", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.Job{})
end
@doc """
Get the template associated with a template.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): Required. The ID of the Cloud Platform project that the job belongs to.
- location (String): The location to which to direct the request.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :view (String): The view to retrieve. Defaults to METADATA_ONLY.
- :gcs_path (String): Required. A Cloud Storage path to the template from which to create the job. Must be a valid Cloud Storage URL, beginning with `gs://`.
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.GetTemplateResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_templates_get(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.GetTemplateResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_templates_get(connection, project_id, location, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"view" => :query,
:"gcsPath" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/locations/{location}/templates:get", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.GetTemplateResponse{})
end
@doc """
Launch a template.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): Required. The ID of the Cloud Platform project that the job belongs to.
- location (String): The location to which to direct the request.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :validate_only (Boolean): If true, the request is validated but not actually executed. Defaults to false.
- :gcs_path (String): Required. A Cloud Storage path to the template from which to create the job. Must be valid Cloud Storage URL, beginning with 'gs://'.
- :body (LaunchTemplateParameters):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.LaunchTemplateResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_templates_launch(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.LaunchTemplateResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_templates_launch(connection, project_id, location, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"validateOnly" => :query,
:"gcsPath" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/locations/{location}/templates:launch", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.LaunchTemplateResponse{})
end
@doc """
Send a worker_message to the service.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project to send the WorkerMessages to.
- location (String): The location which contains the job
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (SendWorkerMessagesRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.SendWorkerMessagesResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_locations_worker_messages(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.SendWorkerMessagesResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_locations_worker_messages(connection, project_id, location, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/locations/{location}/WorkerMessages", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.SendWorkerMessagesResponse{})
end
@doc """
Creates a Cloud Dataflow job from a template.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): Required. The ID of the Cloud Platform project that the job belongs to.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (CreateJobFromTemplateRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.Job{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_templates_create(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.Job.t} | {:error, Tesla.Env.t}
def dataflow_projects_templates_create(connection, project_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/templates", %{
"projectId" => URI.encode_www_form(project_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.Job{})
end
@doc """
Get the template associated with a template.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): Required. The ID of the Cloud Platform project that the job belongs to.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :view (String): The view to retrieve. Defaults to METADATA_ONLY.
- :gcs_path (String): Required. A Cloud Storage path to the template from which to create the job. Must be a valid Cloud Storage URL, beginning with `gs://`.
- :location (String): The location to which to direct the request.
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.GetTemplateResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_templates_get(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.GetTemplateResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_templates_get(connection, project_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"view" => :query,
:"gcsPath" => :query,
:"location" => :query
}
%{}
|> method(:get)
|> url("/v1b3/projects/{projectId}/templates:get", %{
"projectId" => URI.encode_www_form(project_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.GetTemplateResponse{})
end
@doc """
Launch a template.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): Required. The ID of the Cloud Platform project that the job belongs to.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :validate_only (Boolean): If true, the request is validated but not actually executed. Defaults to false.
- :gcs_path (String): Required. A Cloud Storage path to the template from which to create the job. Must be valid Cloud Storage URL, beginning with 'gs://'.
- :location (String): The location to which to direct the request.
- :body (LaunchTemplateParameters):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.LaunchTemplateResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_templates_launch(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.LaunchTemplateResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_templates_launch(connection, project_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"validateOnly" => :query,
:"gcsPath" => :query,
:"location" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/templates:launch", %{
"projectId" => URI.encode_www_form(project_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.LaunchTemplateResponse{})
end
@doc """
Send a worker_message to the service.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String): The project to send the WorkerMessages to.
- opts (KeywordList): [optional] Optional parameters
- :key (String): 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.
- :access_token (String): OAuth access token.
- :quota_user (String): 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.
- :pp (Boolean): Pretty-print response.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :bearer_token (String): OAuth bearer token.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String): JSONP
- :__/xgafv (String): V1 error format.
- :alt (String): Data format for response.
- :body (SendWorkerMessagesRequest):
## Returns
{:ok, %GoogleApi.Dataflow.V1b3.Model.SendWorkerMessagesResponse{}} on success
{:error, info} on failure
"""
@spec dataflow_projects_worker_messages(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Dataflow.V1b3.Model.SendWorkerMessagesResponse.t} | {:error, Tesla.Env.t}
def dataflow_projects_worker_messages(connection, project_id, opts \\ []) do
optional_params = %{
:"key" => :query,
:"access_token" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"oauth_token" => :query,
:"bearer_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"fields" => :query,
:"uploadType" => :query,
:"callback" => :query,
:"$.xgafv" => :query,
:"alt" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1b3/projects/{projectId}/WorkerMessages", %{
"projectId" => URI.encode_www_form(project_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Dataflow.V1b3.Model.SendWorkerMessagesResponse{})
end
end