Class UpdateAlertPolicyRequest (3.20.0)

public final class UpdateAlertPolicyRequest extends GeneratedMessageV3 implements UpdateAlertPolicyRequestOrBuilder

The protocol for the UpdateAlertPolicy request.

Protobuf type google.monitoring.v3.UpdateAlertPolicyRequest

Static Fields

ALERT_POLICY_FIELD_NUMBER

public static final int ALERT_POLICY_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_MASK_FIELD_NUMBER

public static final int UPDATE_MASK_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static UpdateAlertPolicyRequest getDefaultInstance()
Returns
TypeDescription
UpdateAlertPolicyRequest

getDescriptor()

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

newBuilder()

public static UpdateAlertPolicyRequest.Builder newBuilder()
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

newBuilder(UpdateAlertPolicyRequest prototype)

public static UpdateAlertPolicyRequest.Builder newBuilder(UpdateAlertPolicyRequest prototype)
Parameter
NameDescription
prototypeUpdateAlertPolicyRequest
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

parseDelimitedFrom(InputStream input)

public static UpdateAlertPolicyRequest parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static UpdateAlertPolicyRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static UpdateAlertPolicyRequest parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static UpdateAlertPolicyRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static UpdateAlertPolicyRequest parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static UpdateAlertPolicyRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static UpdateAlertPolicyRequest parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static UpdateAlertPolicyRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static UpdateAlertPolicyRequest parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static UpdateAlertPolicyRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static UpdateAlertPolicyRequest parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static UpdateAlertPolicyRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateAlertPolicyRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<UpdateAlertPolicyRequest> parser()
Returns
TypeDescription
Parser<UpdateAlertPolicyRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.

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

getParserForType()

public Parser<UpdateAlertPolicyRequest> getParserForType()
Returns
TypeDescription
Parser<UpdateAlertPolicyRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
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.

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public UpdateAlertPolicyRequest.Builder newBuilderForType()
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected UpdateAlertPolicyRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public UpdateAlertPolicyRequest.Builder toBuilder()
Returns
TypeDescription
UpdateAlertPolicyRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException