Class: Google::Compute::Data::InstGrouManaCurrActi

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/google/compute/property/instancegroupmanager_current_actions.rb

Overview

A class to manage data for current_actions for instance_group_manager.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#abandoningObject (readonly)

Returns the value of attribute abandoning.



37
38
39
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 37

def abandoning
  @abandoning
end

#creatingObject (readonly)

Returns the value of attribute creating.



38
39
40
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 38

def creating
  @creating
end

#creating_without_retriesObject (readonly)

Returns the value of attribute creating_without_retries.



39
40
41
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 39

def creating_without_retries
  @creating_without_retries
end

#deletingObject (readonly)

Returns the value of attribute deleting.



40
41
42
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 40

def deleting
  @deleting
end

#noneObject (readonly)

Returns the value of attribute none.



41
42
43
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 41

def none
  @none
end

#recreatingObject (readonly)

Returns the value of attribute recreating.



42
43
44
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 42

def recreating
  @recreating
end

#refreshingObject (readonly)

Returns the value of attribute refreshing.



43
44
45
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 43

def refreshing
  @refreshing
end

#restartingObject (readonly)

Returns the value of attribute restarting.



44
45
46
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 44

def restarting
  @restarting
end

Instance Method Details

#<=>(other) ⇒ Object



81
82
83
84
85
86
87
88
89
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 81

def <=>(other)
  return false unless other.is_a? InstGrouManaCurrActi
  compare_fields(other).each do |compare|
    next if compare[:self].nil? || compare[:other].nil?
    result = compare[:self] <=> compare[:other]
    return result unless result.zero?
  end
  0
end

#==(other) ⇒ Object



72
73
74
75
76
77
78
79
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 72

def ==(other)
  return false unless other.is_a? InstGrouManaCurrActi
  compare_fields(other).each do |compare|
    next if compare[:self].nil? || compare[:other].nil?
    return false if compare[:self] != compare[:other]
  end
  true
end

#to_json(_arg = nil) ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 46

def to_json(_arg = nil)
  {
    'abandoning' => abandoning,
    'creating' => creating,
    'creatingWithoutRetries' => creating_without_retries,
    'deleting' => deleting,
    'none' => none,
    'recreating' => recreating,
    'refreshing' => refreshing,
    'restarting' => restarting
  }.reject { |_k, v| v.nil? }.to_json
end

#to_sObject



59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/google/compute/property/instancegroupmanager_current_actions.rb', line 59

def to_s
  {
    abandoning: abandoning,
    creating: creating,
    creating_without_retries: creating_without_retries,
    deleting: deleting,
    none: none,
    recreating: recreating,
    refreshing: refreshing,
    restarting: restarting
  }.reject { |_k, v| v.nil? }.map { |k, v| "#{k}: #{v}" }.join(', ')
end