Class: Google::Apis::RunV1alpha1::InstanceStatus

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

Overview

Instance represents the status of an instance of a Job.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstanceStatus

Returns a new instance of InstanceStatus.



1406
1407
1408
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1406

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

Instance Attribute Details

#completion_timeString

Optional. Represents time when the instance was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +optional Corresponds to the JSON property completionTime

Returns:

  • (String)


1370
1371
1372
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1370

def completion_time
  @completion_time
end

#failedFixnum

Optional. The number of times this instance exited with code > 0; +optional Corresponds to the JSON property failed

Returns:

  • (Fixnum)


1375
1376
1377
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1375

def failed
  @failed
end

#indexFixnum

Required. Index of the instance, unique per Job, and beginning at 0. Corresponds to the JSON property index

Returns:

  • (Fixnum)


1380
1381
1382
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1380

def index
  @index
end

#last_exit_codeFixnum

Optional. Last exit code seen for this instance. +optional Corresponds to the JSON property lastExitCode

Returns:

  • (Fixnum)


1385
1386
1387
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1385

def last_exit_code
  @last_exit_code
end

#restartedFixnum

Optional. The number of times this instance was restarted. Instances are restarted according the restartPolicy configured in the Job template. + optional Corresponds to the JSON property restarted

Returns:

  • (Fixnum)


1392
1393
1394
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1392

def restarted
  @restarted
end

#start_timeString

Optional. Represents time when the instance was created by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +optional Corresponds to the JSON property startTime

Returns:

  • (String)


1399
1400
1401
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1399

def start_time
  @start_time
end

#succeededFixnum

Optional. The number of times this instance exited with code == 0. +optional Corresponds to the JSON property succeeded

Returns:

  • (Fixnum)


1404
1405
1406
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1404

def succeeded
  @succeeded
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1411
1412
1413
1414
1415
1416
1417
1418
1419
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1411

def update!(**args)
  @completion_time = args[:completion_time] if args.key?(:completion_time)
  @failed = args[:failed] if args.key?(:failed)
  @index = args[:index] if args.key?(:index)
  @last_exit_code = args[:last_exit_code] if args.key?(:last_exit_code)
  @restarted = args[:restarted] if args.key?(:restarted)
  @start_time = args[:start_time] if args.key?(:start_time)
  @succeeded = args[:succeeded] if args.key?(:succeeded)
end