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
alias GoogleApi.Gax.{Request, Response}
@doc """
List the jobs of a project across all regions.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String.t): The project which owns the jobs.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :filter (String.t): The kind of filter to use.
- :location (String.t): The location that contains this job.
- :pageToken (String.t): Set this to the 'next_page_token' field of a previous response to request additional results in a long list.
- :pageSize (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.t): 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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:filter => :query,
:location => :query,
:pageToken => :query,
:pageSize => :query,
:view => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1b3/projects/{projectId}/jobs:aggregated", %{
"projectId" => URI.encode_www_form(project_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Dataflow.V1b3.Model.ListJobsResponse{})
end
@doc """
Creates a Cloud Dataflow job.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String.t): The ID of the Cloud Platform project that the job belongs to.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :replaceJobId (String.t): Deprecated. This field is now in the Job message.
- :view (String.t): The level of information requested in response.
- :location (String.t): 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_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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:replaceJobId => :query,
:view => :query,
:location => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/jobs", %{
"projectId" => URI.encode_www_form(project_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The project id.
- job_id (String.t): The job id.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The project id.
- job_id (String.t): The job id.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The ID of the Cloud Platform project that the job belongs to.
- job_id (String.t): The job ID.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :view (String.t): The level of information requested in response.
- :location (String.t): The location that contains this job.
## 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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:view => :query,
:location => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1b3/projects/{projectId}/jobs/{jobId}", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Dataflow.V1b3.Model.Job{})
end
@doc """
Request the job status.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String.t): A project id.
- job_id (String.t): The job to get messages for.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :startTime (DateTime.t): Return only metric data that has changed since this time. Default is to return all information about all metrics for the job.
- :location (String.t): The location which contains the job specified by job_id.
## 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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:startTime => :query,
:location => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1b3/projects/{projectId}/jobs/{jobId}/metrics", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The project which owns the jobs.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :filter (String.t): The kind of filter to use.
- :location (String.t): The location that contains this job.
- :pageToken (String.t): Set this to the 'next_page_token' field of a previous response to request additional results in a long list.
- :pageSize (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.t): 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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:filter => :query,
:location => :query,
:pageToken => :query,
:pageSize => :query,
:view => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1b3/projects/{projectId}/jobs", %{
"projectId" => URI.encode_www_form(project_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Dataflow.V1b3.Model.ListJobsResponse{})
end
@doc """
Request the job status.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String.t): A project id.
- job_id (String.t): The job to get messages about.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :location (String.t): The location which contains the job specified by job_id.
- :endTime (DateTime.t): Return only messages with timestamps < end_time. The default is now (i.e. return up to the latest messages available).
- :startTime (DateTime.t): If specified, return only messages with timestamps >= start_time. The default is the job creation time (i.e. beginning of messages).
- :pageToken (String.t): 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.
- :pageSize (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.
- :minimumImportance (String.t): Filter to only get messages with importance >= level
## 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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:location => :query,
:endTime => :query,
:startTime => :query,
:pageToken => :query,
:pageSize => :query,
:minimumImportance => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1b3/projects/{projectId}/jobs/{jobId}/messages", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The ID of the Cloud Platform project that the job belongs to.
- job_id (String.t): The job ID.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :location (String.t): 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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:location => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:put)
|> Request.url("/v1b3/projects/{projectId}/jobs/{jobId}", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): Identifies the project this worker belongs to.
- job_id (String.t): Identifies the workflow job this worker belongs to.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The project which owns the WorkItem's job.
- job_id (String.t): The job which the WorkItem is part of.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", %{
"projectId" => URI.encode_www_form(project_id),
"jobId" => URI.encode_www_form(job_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Dataflow.V1b3.Model.ReportWorkItemStatusResponse{})
end
@doc """
Creates a Cloud Dataflow job.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String.t): The ID of the Cloud Platform project that the job belongs to.
- location (String.t): The location that contains this job.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :replaceJobId (String.t): Deprecated. This field is now in the Job message.
- :view (String.t): 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_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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:replaceJobId => :query,
:view => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/locations/{location}/jobs", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The project id.
- location (String.t): The location which contains the job specified by job_id.
- job_id (String.t): The job id.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.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)
}
)
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The project id.
- location (String.t): The location which contains the job specified by job_id.
- job_id (String.t): The job id.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.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)
}
)
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The ID of the Cloud Platform project that the job belongs to.
- location (String.t): The location that contains this job.
- job_id (String.t): The job ID.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :view (String.t): 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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:view => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.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)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Dataflow.V1b3.Model.Job{})
end
@doc """
Request the job status.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String.t): A project id.
- location (String.t): The location which contains the job specified by job_id.
- job_id (String.t): The job to get messages for.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :startTime (DateTime.t): 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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:startTime => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.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)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The project which owns the jobs.
- location (String.t): The location that contains this job.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :filter (String.t): The kind of filter to use.
- :pageToken (String.t): Set this to the 'next_page_token' field of a previous response to request additional results in a long list.
- :pageSize (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.t): 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_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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:filter => :query,
:pageToken => :query,
:pageSize => :query,
:view => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1b3/projects/{projectId}/locations/{location}/jobs", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Dataflow.V1b3.Model.ListJobsResponse{})
end
@doc """
Request the job status.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String.t): A project id.
- location (String.t): The location which contains the job specified by job_id.
- job_id (String.t): The job to get messages about.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :pageToken (String.t): 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.
- :startTime (DateTime.t): If specified, return only messages with timestamps >= start_time. The default is the job creation time (i.e. beginning of messages).
- :pageSize (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.
- :minimumImportance (String.t): Filter to only get messages with importance >= level
- :endTime (DateTime.t): 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_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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:pageToken => :query,
:startTime => :query,
:pageSize => :query,
:minimumImportance => :query,
:endTime => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.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)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The ID of the Cloud Platform project that the job belongs to.
- location (String.t): The location that contains this job.
- job_id (String.t): The job ID.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:put)
|> Request.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)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): Identifies the project this worker belongs to.
- location (String.t): The location which contains the WorkItem's job.
- job_id (String.t): Identifies the workflow job this worker belongs to.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.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)
}
)
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The project which owns the WorkItem's job.
- location (String.t): The location which contains the WorkItem's job.
- job_id (String.t): The job which the WorkItem is part of.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.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)
}
)
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): Required. The ID of the Cloud Platform project that the job belongs to.
- location (String.t): The location to which to direct the request.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/locations/{location}/templates", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): Required. The ID of the Cloud Platform project that the job belongs to.
- location (String.t): The location to which to direct the request.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :gcsPath (String.t): Required. A Cloud Storage path to the template from which to create the job. Must be a valid Cloud Storage URL, beginning with `gs://`.
- :view (String.t): The view to retrieve. Defaults to METADATA_ONLY.
## 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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:gcsPath => :query,
:view => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1b3/projects/{projectId}/locations/{location}/templates:get", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Dataflow.V1b3.Model.GetTemplateResponse{})
end
@doc """
Launch a template.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String.t): Required. The ID of the Cloud Platform project that the job belongs to.
- location (String.t): The location to which to direct the request.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :gcsPath (String.t): Required. A Cloud Storage path to the template from which to create the job. Must be valid Cloud Storage URL, beginning with 'gs://'.
- :validateOnly (boolean()): If true, the request is validated but not actually executed. Defaults to false.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:gcsPath => :query,
:validateOnly => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/locations/{location}/templates:launch", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The project to send the WorkerMessages to.
- location (String.t): The location which contains the job
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/locations/{location}/WorkerMessages", %{
"projectId" => URI.encode_www_form(project_id),
"location" => URI.encode_www_form(location)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): Required. The ID of the Cloud Platform project that the job belongs to.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/templates", %{
"projectId" => URI.encode_www_form(project_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): Required. The ID of the Cloud Platform project that the job belongs to.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :gcsPath (String.t): 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.t): The location to which to direct the request.
- :view (String.t): The view to retrieve. Defaults to METADATA_ONLY.
## 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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:gcsPath => :query,
:location => :query,
:view => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1b3/projects/{projectId}/templates:get", %{
"projectId" => URI.encode_www_form(project_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Dataflow.V1b3.Model.GetTemplateResponse{})
end
@doc """
Launch a template.
## Parameters
- connection (GoogleApi.Dataflow.V1b3.Connection): Connection to server
- project_id (String.t): Required. The ID of the Cloud Platform project that the job belongs to.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :gcsPath (String.t): 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.t): The location to which to direct the request.
- :validateOnly (boolean()): If true, the request is validated but not actually executed. Defaults to false.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:gcsPath => :query,
:location => :query,
:validateOnly => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/templates:launch", %{
"projectId" => URI.encode_www_form(project_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %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.t): The project to send the WorkerMessages to.
- opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :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.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :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.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :callback (String.t): JSONP
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :$.xgafv (String.t): V1 error format.
- :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 = %{
:alt => :query,
:access_token => :query,
:key => :query,
:upload_protocol => :query,
:quotaUser => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:callback => :query,
:oauth_token => :query,
:"$.xgafv" => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1b3/projects/{projectId}/WorkerMessages", %{
"projectId" => URI.encode_www_form(project_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Dataflow.V1b3.Model.SendWorkerMessagesResponse{})
end
end