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.



740
741
742
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 740

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)


699
700
701
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 699

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)


704
705
706
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 704

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)


709
710
711
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 709

def index
  @index
end

#last_attempt_resultGoogle::Apis::RunV1alpha1::InstanceAttemptResult

Result of an instance attempt. Corresponds to the JSON property lastAttemptResult



714
715
716
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 714

def last_attempt_result
  @last_attempt_result
end

#last_exit_codeFixnum

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

Returns:

  • (Fixnum)


719
720
721
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 719

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)


726
727
728
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 726

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)


733
734
735
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 733

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)


738
739
740
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 738

def succeeded
  @succeeded
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



745
746
747
748
749
750
751
752
753
754
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 745

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_attempt_result = args[:last_attempt_result] if args.key?(:last_attempt_result)
  @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