Class: Google::Apis::OsconfigV1alpha::FixedOrPercent

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

Overview

Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FixedOrPercent

Returns a new instance of FixedOrPercent.



203
204
205
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 203

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

Instance Attribute Details

#fixedFixnum

Specifies a fixed value. Corresponds to the JSON property fixed

Returns:

  • (Fixnum)


195
196
197
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 195

def fixed
  @fixed
end

#percentFixnum

Specifies the relative value defined as a percentage, which will be multiplied by a reference value. Corresponds to the JSON property percent

Returns:

  • (Fixnum)


201
202
203
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 201

def percent
  @percent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



208
209
210
211
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 208

def update!(**args)
  @fixed = args[:fixed] if args.key?(:fixed)
  @percent = args[:percent] if args.key?(:percent)
end