Class: Google::Apis::MonitoringV3::PolicySnapshot

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

Overview

The state of the policy at the time the alert was generated.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PolicySnapshot

Returns a new instance of PolicySnapshot.



4125
4126
4127
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4125

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

Instance Attribute Details

#display_nameString

The display name of the alert policy. Corresponds to the JSON property displayName

Returns:

  • (String)


4107
4108
4109
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4107

def display_name
  @display_name
end

#nameString

The name of the alert policy resource. In the form of "projects/ PROJECT_ID_OR_NUMBER/alertPolicies/ALERT_POLICY_ID". Corresponds to the JSON property name

Returns:

  • (String)


4113
4114
4115
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4113

def name
  @name
end

#severityString

The severity of the alert policy. Corresponds to the JSON property severity

Returns:

  • (String)


4118
4119
4120
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4118

def severity
  @severity
end

#user_labelsHash<String,String>

The user labels for the alert policy. Corresponds to the JSON property userLabels

Returns:

  • (Hash<String,String>)


4123
4124
4125
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4123

def user_labels
  @user_labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4130
4131
4132
4133
4134
4135
# File 'lib/google/apis/monitoring_v3/classes.rb', line 4130

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @name = args[:name] if args.key?(:name)
  @severity = args[:severity] if args.key?(:severity)
  @user_labels = args[:user_labels] if args.key?(:user_labels)
end