Autogenerated update (2020-01-19)

Update:
- dataflow_v1b3
- tpu_v1
- tpu_v1alpha1
This commit is contained in:
Google APIs 2020-01-19 00:37:30 +00:00
parent 611cc4dc34
commit 5bca72ebbc
8 changed files with 224 additions and 7 deletions

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/dataflow
module DataflowV1b3
VERSION = 'V1b3'
REVISION = '20191204'
REVISION = '20191230'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -455,6 +455,37 @@ module Google
end
end
# Container Spec.
class ContainerSpec
include Google::Apis::Core::Hashable
# Name of the docker container image. E.g., gcr.io/project/some-image
# Corresponds to the JSON property `image`
# @return [String]
attr_accessor :image
# Metadata describing a template.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::DataflowV1b3::TemplateMetadata]
attr_accessor :metadata
# SDK Information.
# Corresponds to the JSON property `sdkInfo`
# @return [Google::Apis::DataflowV1b3::SdkInfo]
attr_accessor :sdk_info
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@image = args[:image] if args.key?(:image)
@metadata = args[:metadata] if args.key?(:metadata)
@sdk_info = args[:sdk_info] if args.key?(:sdk_info)
end
end
# CounterMetadata includes all static non-name non-value counter attributes.
class CounterMetadata
include Google::Apis::Core::Hashable
@ -2209,6 +2240,90 @@ module Google
end
end
# Launch FlexTemplate Parameter.
class LaunchFlexTemplateParameter
include Google::Apis::Core::Hashable
# Container Spec.
# Corresponds to the JSON property `containerSpec`
# @return [Google::Apis::DataflowV1b3::ContainerSpec]
attr_accessor :container_spec
# Gcs path to a file with json serialized ContainerSpec as content.
# Corresponds to the JSON property `containerSpecGcsPath`
# @return [String]
attr_accessor :container_spec_gcs_path
# Required. The job name to use for the created job.
# Corresponds to the JSON property `jobName`
# @return [String]
attr_accessor :job_name
# The parameters for FlexTemplate.
# Ex. `"num_workers":"5"`
# Corresponds to the JSON property `parameters`
# @return [Hash<String,String>]
attr_accessor :parameters
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@container_spec = args[:container_spec] if args.key?(:container_spec)
@container_spec_gcs_path = args[:container_spec_gcs_path] if args.key?(:container_spec_gcs_path)
@job_name = args[:job_name] if args.key?(:job_name)
@parameters = args[:parameters] if args.key?(:parameters)
end
end
# A request to launch a Cloud Dataflow job from a FlexTemplate.
class LaunchFlexTemplateRequest
include Google::Apis::Core::Hashable
# Launch FlexTemplate Parameter.
# Corresponds to the JSON property `launchParameter`
# @return [Google::Apis::DataflowV1b3::LaunchFlexTemplateParameter]
attr_accessor :launch_parameter
# If true, the request is validated but not actually executed.
# Defaults to false.
# Corresponds to the JSON property `validateOnly`
# @return [Boolean]
attr_accessor :validate_only
alias_method :validate_only?, :validate_only
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@launch_parameter = args[:launch_parameter] if args.key?(:launch_parameter)
@validate_only = args[:validate_only] if args.key?(:validate_only)
end
end
# Response to the request to launch a job from Flex Template.
class LaunchFlexTemplateResponse
include Google::Apis::Core::Hashable
# Defines a job to be run by the Cloud Dataflow service.
# Corresponds to the JSON property `job`
# @return [Google::Apis::DataflowV1b3::Job]
attr_accessor :job
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@job = args[:job] if args.key?(:job)
end
end
# Parameters to provide to the template being launched.
class LaunchTemplateParameters
include Google::Apis::Core::Hashable
@ -2389,8 +2504,11 @@ module Google
end
end
# Response to a request to list Cloud Dataflow jobs. This may be a partial
# response, depending on the page size in the ListJobsRequest.
# Response to a request to list Cloud Dataflow jobs in a project. This might
# be a partial response, depending on the page size in the ListJobsRequest.
# However, if the project does not have any jobs, an instance of
# ListJobsResponse is not returned and the requests's response
# body is empty ``.
class ListJobsResponse
include Google::Apis::Core::Hashable

View File

@ -94,6 +94,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ContainerSpec
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CounterMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -328,6 +334,24 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class LaunchFlexTemplateParameter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LaunchFlexTemplateRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LaunchFlexTemplateResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LaunchTemplateParameters
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -987,6 +1011,17 @@ module Google
end
end
class ContainerSpec
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :image, as: 'image'
property :metadata, as: 'metadata', class: Google::Apis::DataflowV1b3::TemplateMetadata, decorator: Google::Apis::DataflowV1b3::TemplateMetadata::Representation
property :sdk_info, as: 'sdkInfo', class: Google::Apis::DataflowV1b3::SdkInfo, decorator: Google::Apis::DataflowV1b3::SdkInfo::Representation
end
end
class CounterMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1440,6 +1475,34 @@ module Google
end
end
class LaunchFlexTemplateParameter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :container_spec, as: 'containerSpec', class: Google::Apis::DataflowV1b3::ContainerSpec, decorator: Google::Apis::DataflowV1b3::ContainerSpec::Representation
property :container_spec_gcs_path, as: 'containerSpecGcsPath'
property :job_name, as: 'jobName'
hash :parameters, as: 'parameters'
end
end
class LaunchFlexTemplateRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :launch_parameter, as: 'launchParameter', class: Google::Apis::DataflowV1b3::LaunchFlexTemplateParameter, decorator: Google::Apis::DataflowV1b3::LaunchFlexTemplateParameter::Representation
property :validate_only, as: 'validateOnly'
end
end
class LaunchFlexTemplateResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :job, as: 'job', class: Google::Apis::DataflowV1b3::Job, decorator: Google::Apis::DataflowV1b3::Job::Representation
end
end
class LaunchTemplateParameters
# @private
class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -620,6 +620,44 @@ module Google
execute_or_queue_command(command, &block)
end
# Launch a job with a FlexTemplate.
# @param [String] project_id
# Required. The ID of the Cloud Platform project that the job belongs to.
# @param [String] location
# Required. The [regional endpoint]
# (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
# which to direct the request. E.g., us-central1, us-west1.
# @param [Google::Apis::DataflowV1b3::LaunchFlexTemplateRequest] launch_flex_template_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# 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.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DataflowV1b3::LaunchFlexTemplateResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DataflowV1b3::LaunchFlexTemplateResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def launch_flex_template(project_id, location, launch_flex_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/flexTemplates:launch', options)
command.request_representation = Google::Apis::DataflowV1b3::LaunchFlexTemplateRequest::Representation
command.request_object = launch_flex_template_request_object
command.response_representation = Google::Apis::DataflowV1b3::LaunchFlexTemplateResponse::Representation
command.response_class = Google::Apis::DataflowV1b3::LaunchFlexTemplateResponse
command.params['projectId'] = project_id unless project_id.nil?
command.params['location'] = location unless location.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a Cloud Dataflow job.
# To create a job, we recommend using `projects.locations.jobs.create` with a
# [regional endpoint]

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/tpu/
module TpuV1
VERSION = 'V1'
REVISION = '20190821'
REVISION = '20200116'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -299,7 +299,6 @@ module Google
# conflicts with any subnetworks in the user's provided network, or the
# provided network is peered with another network that is using that CIDR
# block.
# Required.
# Corresponds to the JSON property `cidrBlock`
# @return [String]
attr_accessor :cidr_block

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/tpu/
module TpuV1alpha1
VERSION = 'V1alpha1'
REVISION = '20190821'
REVISION = '20200116'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -299,7 +299,6 @@ module Google
# conflicts with any subnetworks in the user's provided network, or the
# provided network is peered with another network that is using that CIDR
# block.
# Required.
# Corresponds to the JSON property `cidrBlock`
# @return [String]
attr_accessor :cidr_block