Class UpdateAlertPolicyRequest.Builder (3.45.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public UpdateAlertPolicyRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
UpdateAlertPolicyRequest.Builder
Overrides

build()

public UpdateAlertPolicyRequest build()
Returns
Type Description
UpdateAlertPolicyRequest

buildPartial()

public UpdateAlertPolicyRequest buildPartial()
Returns
Type Description
UpdateAlertPolicyRequest

clear()

public UpdateAlertPolicyRequest.Builder clear()
Returns
Type Description
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
Type Description
UpdateAlertPolicyRequest.Builder

clearField(Descriptors.FieldDescriptor field)

public UpdateAlertPolicyRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
UpdateAlertPolicyRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public UpdateAlertPolicyRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
UpdateAlertPolicyRequest.Builder

clone()

public UpdateAlertPolicyRequest.Builder clone()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
AlertPolicyOrBuilder

getDefaultInstanceForType()

public UpdateAlertPolicyRequest getDefaultInstanceForType()
Returns
Type Description
UpdateAlertPolicyRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the updateMask field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
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
Name Description
value AlertPolicy
Returns
Type Description
UpdateAlertPolicyRequest.Builder

mergeFrom(UpdateAlertPolicyRequest other)

public UpdateAlertPolicyRequest.Builder mergeFrom(UpdateAlertPolicyRequest other)
Parameter
Name Description
other UpdateAlertPolicyRequest
Returns
Type Description
UpdateAlertPolicyRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public UpdateAlertPolicyRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UpdateAlertPolicyRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public UpdateAlertPolicyRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
UpdateAlertPolicyRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final UpdateAlertPolicyRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value FieldMask
Returns
Type Description
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
Name Description
value AlertPolicy
Returns
Type Description
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
Name Description
builderForValue AlertPolicy.Builder
Returns
Type Description
UpdateAlertPolicyRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public UpdateAlertPolicyRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
UpdateAlertPolicyRequest.Builder
Overrides

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

public UpdateAlertPolicyRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
UpdateAlertPolicyRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final UpdateAlertPolicyRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value FieldMask
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
UpdateAlertPolicyRequest.Builder