Class: Google::Apis::DataflowV1b3::Job

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dataflow_v1b3/classes.rb,
lib/google/apis/dataflow_v1b3/representations.rb,
lib/google/apis/dataflow_v1b3/representations.rb

Overview

Defines a job to be run by the Cloud Dataflow service. nextID: 26

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Job

Returns a new instance of Job.



2131
2132
2133
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2131

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#client_request_idString

The client's unique identifier of the job, re-used across retried attempts. If this field is set, the service will ensure its uniqueness. The request to create a job will fail if the service has knowledge of a previously submitted job with the same client's ID and job name. The caller may use this field to ensure idempotence of job creation across retried attempts to create a job. By default, the field is empty and, in that case, the service ignores it. Corresponds to the JSON property clientRequestId

Returns:

  • (String)


1968
1969
1970
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 1968

def client_request_id
  @client_request_id
end

#create_timeString

The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service. Corresponds to the JSON property createTime

Returns:

  • (String)


1974
1975
1976
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 1974

def create_time
  @create_time
end

#created_from_snapshot_idString

If this is specified, the job's initial state is populated from the given snapshot. Corresponds to the JSON property createdFromSnapshotId

Returns:

  • (String)


1980
1981
1982
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 1980

def created_from_snapshot_id
  @created_from_snapshot_id
end

#current_stateString

The current state of the job. Jobs are created in the JOB_STATE_STOPPED state unless otherwise specified. A job in the JOB_STATE_RUNNING state may asynchronously enter a terminal state. After a job has reached a terminal state, no further state updates may be made. This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. Corresponds to the JSON property currentState

Returns:

  • (String)


1989
1990
1991
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 1989

def current_state
  @current_state
end

#current_state_timeString

The timestamp associated with the current state. Corresponds to the JSON property currentStateTime

Returns:

  • (String)


1994
1995
1996
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 1994

def current_state_time
  @current_state_time
end

#environmentGoogle::Apis::DataflowV1b3::Environment

Describes the environment in which a Dataflow Job runs. Corresponds to the JSON property environment



1999
2000
2001
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 1999

def environment
  @environment
end

#execution_infoGoogle::Apis::DataflowV1b3::JobExecutionInfo

Additional information about how a Cloud Dataflow job will be executed that isn't contained in the submitted job. Corresponds to the JSON property executionInfo



2005
2006
2007
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2005

def execution_info
  @execution_info
end

#idString

The unique ID of this job. This field is set by the Cloud Dataflow service when the Job is created, and is immutable for the life of the job. Corresponds to the JSON property id

Returns:

  • (String)


2011
2012
2013
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2011

def id
  @id
end

#job_metadataGoogle::Apis::DataflowV1b3::JobMetadata

Metadata available primarily for filtering jobs. Will be included in the ListJob response and Job SUMMARY view. Corresponds to the JSON property jobMetadata



2017
2018
2019
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2017

def 
  @job_metadata
end

#labelsHash<String,String>

User-defined labels for this job. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \pLl\pLo0,62 * Values must conform to regexp: [\pLl\pLo\pN_-]0,63 * Both keys and values are additionally constrained to be <= 128 bytes in size. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


2026
2027
2028
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2026

def labels
  @labels
end

#locationString

The regional endpoint that contains this job. Corresponds to the JSON property location

Returns:

  • (String)


2032
2033
2034
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2032

def location
  @location
end

#nameString

The user-specified Cloud Dataflow job name. Only one Job with a given name may exist in a project at any given time. If a caller attempts to create a Job with the same name as an already-existing Job, the attempt returns the existing Job. The name must match the regular expression [a-z]([-a-z0-9]0,38 [a-z0-9])? Corresponds to the JSON property name

Returns:

  • (String)


2041
2042
2043
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2041

def name
  @name
end

#pipeline_descriptionGoogle::Apis::DataflowV1b3::PipelineDescription

A descriptive representation of submitted pipeline as well as the executed form. This data is provided by the Dataflow service for ease of visualizing the pipeline and interpreting Dataflow provided metrics. Corresponds to the JSON property pipelineDescription



2048
2049
2050
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2048

def pipeline_description
  @pipeline_description
end

#project_idString

The ID of the Cloud Platform project that the job belongs to. Corresponds to the JSON property projectId

Returns:

  • (String)


2053
2054
2055
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2053

def project_id
  @project_id
end

#replace_job_idString

If this job is an update of an existing job, this field is the job ID of the job it replaced. When sending a CreateJobRequest, you can update a job by specifying it here. The job named here is stopped, and its intermediate state is transferred to this job. Corresponds to the JSON property replaceJobId

Returns:

  • (String)


2061
2062
2063
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2061

def replace_job_id
  @replace_job_id
end

#replaced_by_job_idString

If another job is an update of this job (and thus, this job is in JOB_STATE_UPDATED), this field contains the ID of that job. Corresponds to the JSON property replacedByJobId

Returns:

  • (String)


2067
2068
2069
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2067

def replaced_by_job_id
  @replaced_by_job_id
end

#requested_stateString

The job's requested state. UpdateJob may be used to switch between the JOB_STATE_STOPPED and JOB_STATE_RUNNING states, by setting requested_state. UpdateJob may also be used to directly set a job's requested state to JOB_STATE_CANCELLED or JOB_STATE_DONE, irrevocably terminating the job if it has not already reached a terminal state. Corresponds to the JSON property requestedState

Returns:

  • (String)


2076
2077
2078
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2076

def requested_state
  @requested_state
end

#satisfies_pzsBoolean Also known as: satisfies_pzs?

Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. Corresponds to the JSON property satisfiesPzs

Returns:

  • (Boolean)


2082
2083
2084
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2082

def satisfies_pzs
  @satisfies_pzs
end

#stage_statesArray<Google::Apis::DataflowV1b3::ExecutionStageState>

This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. Corresponds to the JSON property stageStates



2089
2090
2091
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2089

def stage_states
  @stage_states
end

#start_timeString

The timestamp when the job was started (transitioned to JOB_STATE_PENDING). Flexible resource scheduling jobs are started with some delay after job creation, so start_time is unset before start and is updated when the job is started by the Cloud Dataflow service. For other jobs, start_time always equals to create_time and is immutable and set by the Cloud Dataflow service. Corresponds to the JSON property startTime

Returns:

  • (String)


2098
2099
2100
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2098

def start_time
  @start_time
end

#stepsArray<Google::Apis::DataflowV1b3::Step>

Exactly one of step or steps_location should be specified. The top-level steps that constitute the entire job. Only retrieved with JOB_VIEW_ALL. Corresponds to the JSON property steps



2104
2105
2106
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2104

def steps
  @steps
end

#steps_locationString

The Cloud Storage location where the steps are stored. Corresponds to the JSON property stepsLocation

Returns:

  • (String)


2109
2110
2111
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2109

def steps_location
  @steps_location
end

#temp_filesArray<String>

A set of files the system should be aware of that are used for temporary storage. These temporary files will be removed on job completion. No duplicates are allowed. No file patterns are supported. The supported files are: Google Cloud Storage: storage.googleapis.com/bucket/object bucket. storage.googleapis.com/object Corresponds to the JSON property tempFiles

Returns:

  • (Array<String>)


2118
2119
2120
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2118

def temp_files
  @temp_files
end

#transform_name_mappingHash<String,String>

The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. Corresponds to the JSON property transformNameMapping

Returns:

  • (Hash<String,String>)


2124
2125
2126
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2124

def transform_name_mapping
  @transform_name_mapping
end

#typeString

The type of Cloud Dataflow job. Corresponds to the JSON property type

Returns:

  • (String)


2129
2130
2131
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2129

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2136

def update!(**args)
  @client_request_id = args[:client_request_id] if args.key?(:client_request_id)
  @create_time = args[:create_time] if args.key?(:create_time)
  @created_from_snapshot_id = args[:created_from_snapshot_id] if args.key?(:created_from_snapshot_id)
  @current_state = args[:current_state] if args.key?(:current_state)
  @current_state_time = args[:current_state_time] if args.key?(:current_state_time)
  @environment = args[:environment] if args.key?(:environment)
  @execution_info = args[:execution_info] if args.key?(:execution_info)
  @id = args[:id] if args.key?(:id)
  @job_metadata = args[:job_metadata] if args.key?(:job_metadata)
  @labels = args[:labels] if args.key?(:labels)
  @location = args[:location] if args.key?(:location)
  @name = args[:name] if args.key?(:name)
  @pipeline_description = args[:pipeline_description] if args.key?(:pipeline_description)
  @project_id = args[:project_id] if args.key?(:project_id)
  @replace_job_id = args[:replace_job_id] if args.key?(:replace_job_id)
  @replaced_by_job_id = args[:replaced_by_job_id] if args.key?(:replaced_by_job_id)
  @requested_state = args[:requested_state] if args.key?(:requested_state)
  @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
  @stage_states = args[:stage_states] if args.key?(:stage_states)
  @start_time = args[:start_time] if args.key?(:start_time)
  @steps = args[:steps] if args.key?(:steps)
  @steps_location = args[:steps_location] if args.key?(:steps_location)
  @temp_files = args[:temp_files] if args.key?(:temp_files)
  @transform_name_mapping = args[:transform_name_mapping] if args.key?(:transform_name_mapping)
  @type = args[:type] if args.key?(:type)
end