Class UpdateAlertPolicyRequest.Builder (3.19.0)

public static final class UpdateAlertPolicyRequest.Builder extends GeneratedMessageV3.Builder<UpdateAlertPolicyRequest.Builder> implements UpdateAlertPolicyRequestOrBuilder

The protocol for the UpdateAlertPolicy request.

Protobuf type google.monitoring.v3.UpdateAlertPolicyRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public UpdateAlertPolicyRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

build()

public UpdateAlertPolicyRequest build()
Returns
TypeDescription
UpdateAlertPolicyRequest

buildPartial()

public UpdateAlertPolicyRequest buildPartial()
Returns
TypeDescription
UpdateAlertPolicyRequest

clear()

public UpdateAlertPolicyRequest.Builder clear()
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

clearAlertPolicy()

public UpdateAlertPolicyRequest.Builder clearAlertPolicy()

Required. The updated alerting policy or the updated values for the fields listed in update_mask. If update_mask is not empty, any fields in this policy that are not in update_mask are ignored.

.google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

clearField(Descriptors.FieldDescriptor field)

public UpdateAlertPolicyRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public UpdateAlertPolicyRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

clearUpdateMask()

public UpdateAlertPolicyRequest.Builder clearUpdateMask()

Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value. Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc. If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:

  • The new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.
  • Conditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.

.google.protobuf.FieldMask update_mask = 2;

Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

clone()

public UpdateAlertPolicyRequest.Builder clone()
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

getAlertPolicy()

public AlertPolicy getAlertPolicy()

Required. The updated alerting policy or the updated values for the fields listed in update_mask. If update_mask is not empty, any fields in this policy that are not in update_mask are ignored.

.google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AlertPolicy

The alertPolicy.

getAlertPolicyBuilder()

public AlertPolicy.Builder getAlertPolicyBuilder()

Required. The updated alerting policy or the updated values for the fields listed in update_mask. If update_mask is not empty, any fields in this policy that are not in update_mask are ignored.

.google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AlertPolicy.Builder

getAlertPolicyOrBuilder()

public AlertPolicyOrBuilder getAlertPolicyOrBuilder()

Required. The updated alerting policy or the updated values for the fields listed in update_mask. If update_mask is not empty, any fields in this policy that are not in update_mask are ignored.

.google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AlertPolicyOrBuilder

getDefaultInstanceForType()

public UpdateAlertPolicyRequest getDefaultInstanceForType()
Returns
TypeDescription
UpdateAlertPolicyRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getUpdateMask()

public FieldMask getUpdateMask()

Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value. Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc. If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:

  • The new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.
  • Conditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.

.google.protobuf.FieldMask update_mask = 2;

Returns
TypeDescription
FieldMask

The updateMask.

getUpdateMaskBuilder()

public FieldMask.Builder getUpdateMaskBuilder()

Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value. Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc. If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:

  • The new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.
  • Conditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.

.google.protobuf.FieldMask update_mask = 2;

Returns
TypeDescription
Builder

getUpdateMaskOrBuilder()

public FieldMaskOrBuilder getUpdateMaskOrBuilder()

Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value. Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc. If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:

  • The new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.
  • Conditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.

.google.protobuf.FieldMask update_mask = 2;

Returns
TypeDescription
FieldMaskOrBuilder

hasAlertPolicy()

public boolean hasAlertPolicy()

Required. The updated alerting policy or the updated values for the fields listed in update_mask. If update_mask is not empty, any fields in this policy that are not in update_mask are ignored.

.google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the alertPolicy field is set.

hasUpdateMask()

public boolean hasUpdateMask()

Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value. Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc. If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:

  • The new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.
  • Conditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.

.google.protobuf.FieldMask update_mask = 2;

Returns
TypeDescription
boolean

Whether the updateMask field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAlertPolicy(AlertPolicy value)

public UpdateAlertPolicyRequest.Builder mergeAlertPolicy(AlertPolicy value)

Required. The updated alerting policy or the updated values for the fields listed in update_mask. If update_mask is not empty, any fields in this policy that are not in update_mask are ignored.

.google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueAlertPolicy
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

mergeFrom(UpdateAlertPolicyRequest other)

public UpdateAlertPolicyRequest.Builder mergeFrom(UpdateAlertPolicyRequest other)
Parameter
NameDescription
otherUpdateAlertPolicyRequest
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public UpdateAlertPolicyRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public UpdateAlertPolicyRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final UpdateAlertPolicyRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

mergeUpdateMask(FieldMask value)

public UpdateAlertPolicyRequest.Builder mergeUpdateMask(FieldMask value)

Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value. Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc. If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:

  • The new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.
  • Conditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.

.google.protobuf.FieldMask update_mask = 2;

Parameter
NameDescription
valueFieldMask
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

setAlertPolicy(AlertPolicy value)

public UpdateAlertPolicyRequest.Builder setAlertPolicy(AlertPolicy value)

Required. The updated alerting policy or the updated values for the fields listed in update_mask. If update_mask is not empty, any fields in this policy that are not in update_mask are ignored.

.google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueAlertPolicy
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

setAlertPolicy(AlertPolicy.Builder builderForValue)

public UpdateAlertPolicyRequest.Builder setAlertPolicy(AlertPolicy.Builder builderForValue)

Required. The updated alerting policy or the updated values for the fields listed in update_mask. If update_mask is not empty, any fields in this policy that are not in update_mask are ignored.

.google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueAlertPolicy.Builder
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public UpdateAlertPolicyRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public UpdateAlertPolicyRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final UpdateAlertPolicyRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

setUpdateMask(FieldMask value)

public UpdateAlertPolicyRequest.Builder setUpdateMask(FieldMask value)

Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value. Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc. If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:

  • The new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.
  • Conditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.

.google.protobuf.FieldMask update_mask = 2;

Parameter
NameDescription
valueFieldMask
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

setUpdateMask(FieldMask.Builder builderForValue)

public UpdateAlertPolicyRequest.Builder setUpdateMask(FieldMask.Builder builderForValue)

Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value. Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc. If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:

  • The new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.
  • Conditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.

.google.protobuf.FieldMask update_mask = 2;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder