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

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

Overview

Defines a job to be run by the Dataflow service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Job

Returns a new instance of Job.



235
236
237
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 235

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

Instance Attribute Details

#client_request_idString

Client's unique identifier of the job, re-used by SDK across retried attempts. If this field is set, the service will ensure its uniqueness. That is, 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, for example, 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)


209
210
211
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 209

def client_request_id
  @client_request_id
end

#create_timeString

Timestamp when job was initially created. Immutable, set by the Dataflow service. Corresponds to the JSON property createTime

Returns:

  • (String)


184
185
186
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 184

def create_time
  @create_time
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. Once a job has reached a terminal state, no further state updates may be made. This field may be mutated by the Dataflow service; callers cannot mutate it. Corresponds to the JSON property currentState

Returns:

  • (String)


158
159
160
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 158

def current_state
  @current_state
end

#current_state_timeString

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

Returns:

  • (String)


163
164
165
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 163

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



144
145
146
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 144

def environment
  @environment
end

#execution_infoGoogle::Apis::DataflowV1b3::JobExecutionInfo

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



178
179
180
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 178

def execution_info
  @execution_info
end

#idString

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

Returns:

  • (String)


121
122
123
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 121

def id
  @id
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>)


233
234
235
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 233

def labels
  @labels
end

#nameString

The user-specified 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 will return the existing Job. The name must match the regular expression a-z? Corresponds to the JSON property name

Returns:

  • (String)


134
135
136
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 134

def name
  @name
end

#project_idString

The project which owns the job. Corresponds to the JSON property projectId

Returns:

  • (String)


126
127
128
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 126

def project_id
  @project_id
end

#replace_job_idString

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

Returns:

  • (String)


192
193
194
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 192

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 will contain the ID of that job. Corresponds to the JSON property replacedByJobId

Returns:

  • (String)


215
216
217
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 215

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)


172
173
174
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 172

def requested_state
  @requested_state
end

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

The top-level steps that constitute the entire job. Corresponds to the JSON property steps



149
150
151
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 149

def steps
  @steps
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>)


224
225
226
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 224

def temp_files
  @temp_files
end

#transform_name_mappingHash<String,String>

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>)


198
199
200
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 198

def transform_name_mapping
  @transform_name_mapping
end

#typeString

The type of dataflow job. Corresponds to the JSON property type

Returns:

  • (String)


139
140
141
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 139

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 240

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