Class SendTestMessageRequest.Builder (2.18.0)

public static final class SendTestMessageRequest.Builder extends GeneratedMessageV3.Builder<SendTestMessageRequest.Builder> implements SendTestMessageRequestOrBuilder

Request message for the SendTestMessage method.

Protobuf type google.cloud.essentialcontacts.v1.SendTestMessageRequest

Static Methods

getDescriptor()

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

Methods

addAllContacts(Iterable<String> values)

public SendTestMessageRequest.Builder addAllContacts(Iterable<String> values)

Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id}

repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valuesIterable<String>

The contacts to add.

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

addContacts(String value)

public SendTestMessageRequest.Builder addContacts(String value)

Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id}

repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The contacts to add.

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

addContactsBytes(ByteString value)

public SendTestMessageRequest.Builder addContactsBytes(ByteString value)

Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id}

repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes of the contacts to add.

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SendTestMessageRequest build()
Returns
TypeDescription
SendTestMessageRequest

buildPartial()

public SendTestMessageRequest buildPartial()
Returns
TypeDescription
SendTestMessageRequest

clear()

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

clearContacts()

public SendTestMessageRequest.Builder clearContacts()

Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id}

repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearNotificationCategory()

public SendTestMessageRequest.Builder clearNotificationCategory()

Required. The notification category to send the test message for. All contacts must be subscribed to this category.

.google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearResource()

public SendTestMessageRequest.Builder clearResource()

Required. The name of the resource to send the test message for. All contacts must either be set directly on this resource or inherited from another resource that is an ancestor of this one. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}

string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

clone()

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

getContacts(int index)

public String getContacts(int index)

Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id}

repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The contacts at the given index.

getContactsBytes(int index)

public ByteString getContactsBytes(int index)

Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id}

repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the contacts at the given index.

getContactsCount()

public int getContactsCount()

Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id}

repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
int

The count of contacts.

getContactsList()

public ProtocolStringList getContactsList()

Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id}

repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ProtocolStringList

A list containing the contacts.

getDefaultInstanceForType()

public SendTestMessageRequest getDefaultInstanceForType()
Returns
TypeDescription
SendTestMessageRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getNotificationCategory()

public NotificationCategory getNotificationCategory()

Required. The notification category to send the test message for. All contacts must be subscribed to this category.

.google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
NotificationCategory

The notificationCategory.

getNotificationCategoryValue()

public int getNotificationCategoryValue()

Required. The notification category to send the test message for. All contacts must be subscribed to this category.

.google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The enum numeric value on the wire for notificationCategory.

getResource()

public String getResource()

Required. The name of the resource to send the test message for. All contacts must either be set directly on this resource or inherited from another resource that is an ancestor of this one. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}

string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The resource.

getResourceBytes()

public ByteString getResourceBytes()

Required. The name of the resource to send the test message for. All contacts must either be set directly on this resource or inherited from another resource that is an ancestor of this one. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}

string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for resource.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SendTestMessageRequest other)

public SendTestMessageRequest.Builder mergeFrom(SendTestMessageRequest other)
Parameter
NameDescription
otherSendTestMessageRequest
Returns
TypeDescription
SendTestMessageRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setContacts(int index, String value)

public SendTestMessageRequest.Builder setContacts(int index, String value)

Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id}

repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The contacts to set.

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setNotificationCategory(NotificationCategory value)

public SendTestMessageRequest.Builder setNotificationCategory(NotificationCategory value)

Required. The notification category to send the test message for. All contacts must be subscribed to this category.

.google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueNotificationCategory

The notificationCategory to set.

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

setNotificationCategoryValue(int value)

public SendTestMessageRequest.Builder setNotificationCategoryValue(int value)

Required. The notification category to send the test message for. All contacts must be subscribed to this category.

.google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

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

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

setResource(String value)

public SendTestMessageRequest.Builder setResource(String value)

Required. The name of the resource to send the test message for. All contacts must either be set directly on this resource or inherited from another resource that is an ancestor of this one. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}

string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The resource to set.

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

setResourceBytes(ByteString value)

public SendTestMessageRequest.Builder setResourceBytes(ByteString value)

Required. The name of the resource to send the test message for. All contacts must either be set directly on this resource or inherited from another resource that is an ancestor of this one. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}

string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for resource to set.

Returns
TypeDescription
SendTestMessageRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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