Class: Google::Apis::OsconfigV1beta::FixedOrPercent
- Inherits:
-
Object
- Object
- Google::Apis::OsconfigV1beta::FixedOrPercent
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/osconfig_v1beta/classes.rb,
generated/google/apis/osconfig_v1beta/representations.rb,
generated/google/apis/osconfig_v1beta/representations.rb
Overview
Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value.
Instance Attribute Summary collapse
-
#fixed ⇒ Fixnum
Specifies a fixed value.
-
#percent ⇒ Fixnum
Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
Instance Method Summary collapse
-
#initialize(**args) ⇒ FixedOrPercent
constructor
A new instance of FixedOrPercent.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ FixedOrPercent
Returns a new instance of FixedOrPercent.
519 520 521 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 519 def initialize(**args) update!(**args) end |
Instance Attribute Details
#fixed ⇒ Fixnum
Specifies a fixed value.
Corresponds to the JSON property fixed
511 512 513 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 511 def fixed @fixed end |
#percent ⇒ Fixnum
Specifies the relative value defined as a percentage, which will be multiplied
by a reference value.
Corresponds to the JSON property percent
517 518 519 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 517 def percent @percent end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
524 525 526 527 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 524 def update!(**args) @fixed = args[:fixed] if args.key?(:fixed) @percent = args[:percent] if args.key?(:percent) end |