Class: Google::Apis::OsconfigV1::FixedOrPercent

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/osconfig_v1/classes.rb,
generated/google/apis/osconfig_v1/representations.rb,
generated/google/apis/osconfig_v1/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.



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

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

Instance Attribute Details

#fixedFixnum

Specifies a fixed value. Corresponds to the JSON property fixed

Returns:

  • (Fixnum)


225
226
227
# File 'generated/google/apis/osconfig_v1/classes.rb', line 225

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)


231
232
233
# File 'generated/google/apis/osconfig_v1/classes.rb', line 231

def percent
  @percent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



238
239
240
241
# File 'generated/google/apis/osconfig_v1/classes.rb', line 238

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