Class NotificationChannel.Builder (3.20.0)

public static final class NotificationChannel.Builder extends GeneratedMessageV3.Builder<NotificationChannel.Builder> implements NotificationChannelOrBuilder

A NotificationChannel is a medium through which an alert is delivered when a policy violation is detected. Examples of channels include email, SMS, and third-party messaging applications. Fields containing sensitive information like authentication tokens or contact info are only partially populated on retrieval.

Protobuf type google.monitoring.v3.NotificationChannel

Static Methods

getDescriptor()

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

Methods

addAllMutationRecords(Iterable<? extends MutationRecord> values)

public NotificationChannel.Builder addAllMutationRecords(Iterable<? extends MutationRecord> values)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameter
NameDescription
valuesIterable<? extends com.google.monitoring.v3.MutationRecord>
Returns
TypeDescription
NotificationChannel.Builder

addMutationRecords(MutationRecord value)

public NotificationChannel.Builder addMutationRecords(MutationRecord value)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameter
NameDescription
valueMutationRecord
Returns
TypeDescription
NotificationChannel.Builder

addMutationRecords(MutationRecord.Builder builderForValue)

public NotificationChannel.Builder addMutationRecords(MutationRecord.Builder builderForValue)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameter
NameDescription
builderForValueMutationRecord.Builder
Returns
TypeDescription
NotificationChannel.Builder

addMutationRecords(int index, MutationRecord value)

public NotificationChannel.Builder addMutationRecords(int index, MutationRecord value)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameters
NameDescription
indexint
valueMutationRecord
Returns
TypeDescription
NotificationChannel.Builder

addMutationRecords(int index, MutationRecord.Builder builderForValue)

public NotificationChannel.Builder addMutationRecords(int index, MutationRecord.Builder builderForValue)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameters
NameDescription
indexint
builderForValueMutationRecord.Builder
Returns
TypeDescription
NotificationChannel.Builder

addMutationRecordsBuilder()

public MutationRecord.Builder addMutationRecordsBuilder()

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Returns
TypeDescription
MutationRecord.Builder

addMutationRecordsBuilder(int index)

public MutationRecord.Builder addMutationRecordsBuilder(int index)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
MutationRecord.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public NotificationChannel build()
Returns
TypeDescription
NotificationChannel

buildPartial()

public NotificationChannel buildPartial()
Returns
TypeDescription
NotificationChannel

clear()

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

clearCreationRecord()

public NotificationChannel.Builder clearCreationRecord()

Record of the creation of this channel.

.google.monitoring.v3.MutationRecord creation_record = 12;

Returns
TypeDescription
NotificationChannel.Builder

clearDescription()

public NotificationChannel.Builder clearDescription()

An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.

string description = 4;

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

clearDisplayName()

public NotificationChannel.Builder clearDisplayName()

An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.

string display_name = 3;

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

clearEnabled()

public NotificationChannel.Builder clearEnabled()

Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.

.google.protobuf.BoolValue enabled = 11;

Returns
TypeDescription
NotificationChannel.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public NotificationChannel.Builder clearLabels()
Returns
TypeDescription
NotificationChannel.Builder

clearMutationRecords()

public NotificationChannel.Builder clearMutationRecords()

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Returns
TypeDescription
NotificationChannel.Builder

clearName()

public NotificationChannel.Builder clearName()

The full REST resource name for this channel. The format is:

 projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

The [CHANNEL_ID] is automatically assigned by the server on creation.

string name = 6;

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearType()

public NotificationChannel.Builder clearType()

The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field.

string type = 1;

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

clearUserLabels()

public NotificationChannel.Builder clearUserLabels()
Returns
TypeDescription
NotificationChannel.Builder

clearVerificationStatus()

public NotificationChannel.Builder clearVerificationStatus()

Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.

If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.

If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being required for channels of this type.

This field cannot be modified using a standard UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.

.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.

map<string, string> labels = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsUserLabels(String key)

public boolean containsUserLabels(String key)

User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.

The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.

map<string, string> user_labels = 8;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCreationRecord()

public MutationRecord getCreationRecord()

Record of the creation of this channel.

.google.monitoring.v3.MutationRecord creation_record = 12;

Returns
TypeDescription
MutationRecord

The creationRecord.

getCreationRecordBuilder()

public MutationRecord.Builder getCreationRecordBuilder()

Record of the creation of this channel.

.google.monitoring.v3.MutationRecord creation_record = 12;

Returns
TypeDescription
MutationRecord.Builder

getCreationRecordOrBuilder()

public MutationRecordOrBuilder getCreationRecordOrBuilder()

Record of the creation of this channel.

.google.monitoring.v3.MutationRecord creation_record = 12;

Returns
TypeDescription
MutationRecordOrBuilder

getDefaultInstanceForType()

public NotificationChannel getDefaultInstanceForType()
Returns
TypeDescription
NotificationChannel

getDescription()

public String getDescription()

An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.

string description = 4;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.

string description = 4;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.

string display_name = 3;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.

string display_name = 3;

Returns
TypeDescription
ByteString

The bytes for displayName.

getEnabled()

public BoolValue getEnabled()

Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.

.google.protobuf.BoolValue enabled = 11;

Returns
TypeDescription
BoolValue

The enabled.

getEnabledBuilder()

public BoolValue.Builder getEnabledBuilder()

Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.

.google.protobuf.BoolValue enabled = 11;

Returns
TypeDescription
Builder

getEnabledOrBuilder()

public BoolValueOrBuilder getEnabledOrBuilder()

Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.

.google.protobuf.BoolValue enabled = 11;

Returns
TypeDescription
BoolValueOrBuilder

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.

map<string, string> labels = 5;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.

map<string, string> labels = 5;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.

map<string, string> labels = 5;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.

map<string, string> labels = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getMutableUserLabels()

public Map<String,String> getMutableUserLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getMutationRecords(int index)

public MutationRecord getMutationRecords(int index)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
MutationRecord

getMutationRecordsBuilder(int index)

public MutationRecord.Builder getMutationRecordsBuilder(int index)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
MutationRecord.Builder

getMutationRecordsBuilderList()

public List<MutationRecord.Builder> getMutationRecordsBuilderList()

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Returns
TypeDescription
List<Builder>

getMutationRecordsCount()

public int getMutationRecordsCount()

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Returns
TypeDescription
int

getMutationRecordsList()

public List<MutationRecord> getMutationRecordsList()

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Returns
TypeDescription
List<MutationRecord>

getMutationRecordsOrBuilder(int index)

public MutationRecordOrBuilder getMutationRecordsOrBuilder(int index)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
MutationRecordOrBuilder

getMutationRecordsOrBuilderList()

public List<? extends MutationRecordOrBuilder> getMutationRecordsOrBuilderList()

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Returns
TypeDescription
List<? extends com.google.monitoring.v3.MutationRecordOrBuilder>

getName()

public String getName()

The full REST resource name for this channel. The format is:

 projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

The [CHANNEL_ID] is automatically assigned by the server on creation.

string name = 6;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The full REST resource name for this channel. The format is:

 projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

The [CHANNEL_ID] is automatically assigned by the server on creation.

string name = 6;

Returns
TypeDescription
ByteString

The bytes for name.

getType()

public String getType()

The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field.

string type = 1;

Returns
TypeDescription
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field.

string type = 1;

Returns
TypeDescription
ByteString

The bytes for type.

getUserLabels()

public Map<String,String> getUserLabels()

Use #getUserLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getUserLabelsCount()

public int getUserLabelsCount()

User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.

The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.

map<string, string> user_labels = 8;

Returns
TypeDescription
int

getUserLabelsMap()

public Map<String,String> getUserLabelsMap()

User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.

The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.

map<string, string> user_labels = 8;

Returns
TypeDescription
Map<String,String>

getUserLabelsOrDefault(String key, String defaultValue)

public String getUserLabelsOrDefault(String key, String defaultValue)

User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.

The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.

map<string, string> user_labels = 8;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getUserLabelsOrThrow(String key)

public String getUserLabelsOrThrow(String key)

User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.

The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.

map<string, string> user_labels = 8;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getVerificationStatus()

public NotificationChannel.VerificationStatus getVerificationStatus()

Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.

If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.

If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being required for channels of this type.

This field cannot be modified using a standard UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.

.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;

Returns
TypeDescription
NotificationChannel.VerificationStatus

The verificationStatus.

getVerificationStatusValue()

public int getVerificationStatusValue()

Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.

If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.

If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being required for channels of this type.

This field cannot be modified using a standard UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.

.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;

Returns
TypeDescription
int

The enum numeric value on the wire for verificationStatus.

hasCreationRecord()

public boolean hasCreationRecord()

Record of the creation of this channel.

.google.monitoring.v3.MutationRecord creation_record = 12;

Returns
TypeDescription
boolean

Whether the creationRecord field is set.

hasEnabled()

public boolean hasEnabled()

Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.

.google.protobuf.BoolValue enabled = 11;

Returns
TypeDescription
boolean

Whether the enabled field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreationRecord(MutationRecord value)

public NotificationChannel.Builder mergeCreationRecord(MutationRecord value)

Record of the creation of this channel.

.google.monitoring.v3.MutationRecord creation_record = 12;

Parameter
NameDescription
valueMutationRecord
Returns
TypeDescription
NotificationChannel.Builder

mergeEnabled(BoolValue value)

public NotificationChannel.Builder mergeEnabled(BoolValue value)

Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.

.google.protobuf.BoolValue enabled = 11;

Parameter
NameDescription
valueBoolValue
Returns
TypeDescription
NotificationChannel.Builder

mergeFrom(NotificationChannel other)

public NotificationChannel.Builder mergeFrom(NotificationChannel other)
Parameter
NameDescription
otherNotificationChannel
Returns
TypeDescription
NotificationChannel.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

public NotificationChannel.Builder putAllLabels(Map<String,String> values)

Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.

map<string, string> labels = 5;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
NotificationChannel.Builder

putAllUserLabels(Map<String,String> values)

public NotificationChannel.Builder putAllUserLabels(Map<String,String> values)

User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.

The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.

map<string, string> user_labels = 8;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
NotificationChannel.Builder

putLabels(String key, String value)

public NotificationChannel.Builder putLabels(String key, String value)

Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.

map<string, string> labels = 5;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
NotificationChannel.Builder

putUserLabels(String key, String value)

public NotificationChannel.Builder putUserLabels(String key, String value)

User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.

The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.

map<string, string> user_labels = 8;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
NotificationChannel.Builder

removeLabels(String key)

public NotificationChannel.Builder removeLabels(String key)

Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.

map<string, string> labels = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
NotificationChannel.Builder

removeMutationRecords(int index)

public NotificationChannel.Builder removeMutationRecords(int index)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
NotificationChannel.Builder

removeUserLabels(String key)

public NotificationChannel.Builder removeUserLabels(String key)

User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.

The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.

map<string, string> user_labels = 8;

Parameter
NameDescription
keyString
Returns
TypeDescription
NotificationChannel.Builder

setCreationRecord(MutationRecord value)

public NotificationChannel.Builder setCreationRecord(MutationRecord value)

Record of the creation of this channel.

.google.monitoring.v3.MutationRecord creation_record = 12;

Parameter
NameDescription
valueMutationRecord
Returns
TypeDescription
NotificationChannel.Builder

setCreationRecord(MutationRecord.Builder builderForValue)

public NotificationChannel.Builder setCreationRecord(MutationRecord.Builder builderForValue)

Record of the creation of this channel.

.google.monitoring.v3.MutationRecord creation_record = 12;

Parameter
NameDescription
builderForValueMutationRecord.Builder
Returns
TypeDescription
NotificationChannel.Builder

setDescription(String value)

public NotificationChannel.Builder setDescription(String value)

An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.

string description = 4;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public NotificationChannel.Builder setDescriptionBytes(ByteString value)

An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.

string description = 4;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

setDisplayName(String value)

public NotificationChannel.Builder setDisplayName(String value)

An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.

string display_name = 3;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public NotificationChannel.Builder setDisplayNameBytes(ByteString value)

An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.

string display_name = 3;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

setEnabled(BoolValue value)

public NotificationChannel.Builder setEnabled(BoolValue value)

Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.

.google.protobuf.BoolValue enabled = 11;

Parameter
NameDescription
valueBoolValue
Returns
TypeDescription
NotificationChannel.Builder

setEnabled(BoolValue.Builder builderForValue)

public NotificationChannel.Builder setEnabled(BoolValue.Builder builderForValue)

Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.

.google.protobuf.BoolValue enabled = 11;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
NotificationChannel.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setMutationRecords(int index, MutationRecord value)

public NotificationChannel.Builder setMutationRecords(int index, MutationRecord value)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameters
NameDescription
indexint
valueMutationRecord
Returns
TypeDescription
NotificationChannel.Builder

setMutationRecords(int index, MutationRecord.Builder builderForValue)

public NotificationChannel.Builder setMutationRecords(int index, MutationRecord.Builder builderForValue)

Records of the modification of this channel.

repeated .google.monitoring.v3.MutationRecord mutation_records = 13;

Parameters
NameDescription
indexint
builderForValueMutationRecord.Builder
Returns
TypeDescription
NotificationChannel.Builder

setName(String value)

public NotificationChannel.Builder setName(String value)

The full REST resource name for this channel. The format is:

 projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

The [CHANNEL_ID] is automatically assigned by the server on creation.

string name = 6;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

setNameBytes(ByteString value)

public NotificationChannel.Builder setNameBytes(ByteString value)

The full REST resource name for this channel. The format is:

 projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

The [CHANNEL_ID] is automatically assigned by the server on creation.

string name = 6;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

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

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

setType(String value)

public NotificationChannel.Builder setType(String value)

The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field.

string type = 1;

Parameter
NameDescription
valueString

The type to set.

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

setTypeBytes(ByteString value)

public NotificationChannel.Builder setTypeBytes(ByteString value)

The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field.

string type = 1;

Parameter
NameDescription
valueByteString

The bytes for type to set.

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setVerificationStatus(NotificationChannel.VerificationStatus value)

public NotificationChannel.Builder setVerificationStatus(NotificationChannel.VerificationStatus value)

Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.

If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.

If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being required for channels of this type.

This field cannot be modified using a standard UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.

.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;

Parameter
NameDescription
valueNotificationChannel.VerificationStatus

The verificationStatus to set.

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.

setVerificationStatusValue(int value)

public NotificationChannel.Builder setVerificationStatusValue(int value)

Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.

If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.

If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being required for channels of this type.

This field cannot be modified using a standard UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.

.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;

Parameter
NameDescription
valueint

The enum numeric value on the wire for verificationStatus to set.

Returns
TypeDescription
NotificationChannel.Builder

This builder for chaining.