Class: Google::Apis::ConnectorsV2::SloEligibility

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

Overview

SloEligibility is a tuple containing eligibility value: true if an instance is eligible for SLO calculation or false if it should be excluded from all SLO- related calculations along with a user-defined reason.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SloEligibility

Returns a new instance of SloEligibility.



1506
1507
1508
# File 'lib/google/apis/connectors_v2/classes.rb', line 1506

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

Instance Attribute Details

#eligibleBoolean Also known as: eligible?

Whether an instance is eligible or ineligible. Corresponds to the JSON property eligible

Returns:

  • (Boolean)


1497
1498
1499
# File 'lib/google/apis/connectors_v2/classes.rb', line 1497

def eligible
  @eligible
end

#reasonString

User-defined reason for the current value of instance eligibility. Usually, this can be directly mapped to the internal state. An empty reason is allowed. Corresponds to the JSON property reason

Returns:

  • (String)


1504
1505
1506
# File 'lib/google/apis/connectors_v2/classes.rb', line 1504

def reason
  @reason
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1511
1512
1513
1514
# File 'lib/google/apis/connectors_v2/classes.rb', line 1511

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