Class Contact.Builder (2.43.0)

public static final class Contact.Builder extends GeneratedMessageV3.Builder<Contact.Builder> implements ContactOrBuilder

A contact that will receive notifications from Google Cloud.

Protobuf type google.cloud.essentialcontacts.v1.Contact

Implements

ContactOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllNotificationCategorySubscriptions(Iterable<? extends NotificationCategory> values)

public Contact.Builder addAllNotificationCategorySubscriptions(Iterable<? extends NotificationCategory> values)

Required. The categories of notifications that the contact will receive communications for.

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

Parameter
Name Description
values Iterable<? extends com.google.cloud.essentialcontacts.v1.NotificationCategory>

The notificationCategorySubscriptions to add.

Returns
Type Description
Contact.Builder

This builder for chaining.

addAllNotificationCategorySubscriptionsValue(Iterable<Integer> values)

public Contact.Builder addAllNotificationCategorySubscriptionsValue(Iterable<Integer> values)

Required. The categories of notifications that the contact will receive communications for.

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

Parameter
Name Description
values Iterable<Integer>

The enum numeric values on the wire for notificationCategorySubscriptions to add.

Returns
Type Description
Contact.Builder

This builder for chaining.

addNotificationCategorySubscriptions(NotificationCategory value)

public Contact.Builder addNotificationCategorySubscriptions(NotificationCategory value)

Required. The categories of notifications that the contact will receive communications for.

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

Parameter
Name Description
value NotificationCategory

The notificationCategorySubscriptions to add.

Returns
Type Description
Contact.Builder

This builder for chaining.

addNotificationCategorySubscriptionsValue(int value)

public Contact.Builder addNotificationCategorySubscriptionsValue(int value)

Required. The categories of notifications that the contact will receive communications for.

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

Parameter
Name Description
value int

The enum numeric value on the wire for notificationCategorySubscriptions to add.

Returns
Type Description
Contact.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Contact build()
Returns
Type Description
Contact

buildPartial()

public Contact buildPartial()
Returns
Type Description
Contact

clear()

public Contact.Builder clear()
Returns
Type Description
Contact.Builder
Overrides

clearEmail()

public Contact.Builder clearEmail()

Required. The email address to send notifications to. The email address does not need to be a Google Account.

string email = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearLanguageTag()

public Contact.Builder clearLanguageTag()

Required. The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.

string language_tag = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearName()

public Contact.Builder clearName()

Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Contact.Builder

This builder for chaining.

clearNotificationCategorySubscriptions()

public Contact.Builder clearNotificationCategorySubscriptions()

Required. The categories of notifications that the contact will receive communications for.

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

Returns
Type Description
Contact.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Contact.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Contact.Builder
Overrides

clearValidateTime()

public Contact.Builder clearValidateTime()

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

.google.protobuf.Timestamp validate_time = 9;

Returns
Type Description
Contact.Builder

clearValidationState()

public Contact.Builder clearValidationState()

The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.

.google.cloud.essentialcontacts.v1.ValidationState validation_state = 8;

Returns
Type Description
Contact.Builder

This builder for chaining.

clone()

public Contact.Builder clone()
Returns
Type Description
Contact.Builder
Overrides

getDefaultInstanceForType()

public Contact getDefaultInstanceForType()
Returns
Type Description
Contact

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEmail()

public String getEmail()

Required. The email address to send notifications to. The email address does not need to be a Google Account.

string email = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The email.

getEmailBytes()

public ByteString getEmailBytes()

Required. The email address to send notifications to. The email address does not need to be a Google Account.

string email = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for email.

getLanguageTag()

public String getLanguageTag()

Required. The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.

string language_tag = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The languageTag.

getLanguageTagBytes()

public ByteString getLanguageTagBytes()

Required. The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.

string language_tag = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for languageTag.

getName()

public String getName()

Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getNotificationCategorySubscriptions(int index)

public NotificationCategory getNotificationCategorySubscriptions(int index)

Required. The categories of notifications that the contact will receive communications for.

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

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
NotificationCategory

The notificationCategorySubscriptions at the given index.

getNotificationCategorySubscriptionsCount()

public int getNotificationCategorySubscriptionsCount()

Required. The categories of notifications that the contact will receive communications for.

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

Returns
Type Description
int

The count of notificationCategorySubscriptions.

getNotificationCategorySubscriptionsList()

public List<NotificationCategory> getNotificationCategorySubscriptionsList()

Required. The categories of notifications that the contact will receive communications for.

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

Returns
Type Description
List<NotificationCategory>

A list containing the notificationCategorySubscriptions.

getNotificationCategorySubscriptionsValue(int index)

public int getNotificationCategorySubscriptionsValue(int index)

Required. The categories of notifications that the contact will receive communications for.

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

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of notificationCategorySubscriptions at the given index.

getNotificationCategorySubscriptionsValueList()

public List<Integer> getNotificationCategorySubscriptionsValueList()

Required. The categories of notifications that the contact will receive communications for.

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

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for notificationCategorySubscriptions.

getValidateTime()

public Timestamp getValidateTime()

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

.google.protobuf.Timestamp validate_time = 9;

Returns
Type Description
Timestamp

The validateTime.

getValidateTimeBuilder()

public Timestamp.Builder getValidateTimeBuilder()

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

.google.protobuf.Timestamp validate_time = 9;

Returns
Type Description
Builder

getValidateTimeOrBuilder()

public TimestampOrBuilder getValidateTimeOrBuilder()

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

.google.protobuf.Timestamp validate_time = 9;

Returns
Type Description
TimestampOrBuilder

getValidationState()

public ValidationState getValidationState()

The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.

.google.cloud.essentialcontacts.v1.ValidationState validation_state = 8;

Returns
Type Description
ValidationState

The validationState.

getValidationStateValue()

public int getValidationStateValue()

The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.

.google.cloud.essentialcontacts.v1.ValidationState validation_state = 8;

Returns
Type Description
int

The enum numeric value on the wire for validationState.

hasValidateTime()

public boolean hasValidateTime()

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

.google.protobuf.Timestamp validate_time = 9;

Returns
Type Description
boolean

Whether the validateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Contact other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Contact.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Contact.Builder
Overrides

mergeValidateTime(Timestamp value)

public Contact.Builder mergeValidateTime(Timestamp value)

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

.google.protobuf.Timestamp validate_time = 9;

Parameter
Name Description
value Timestamp
Returns
Type Description
Contact.Builder

setEmail(String value)

public Contact.Builder setEmail(String value)

Required. The email address to send notifications to. The email address does not need to be a Google Account.

string email = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The email to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setEmailBytes(ByteString value)

public Contact.Builder setEmailBytes(ByteString value)

Required. The email address to send notifications to. The email address does not need to be a Google Account.

string email = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for email to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setLanguageTag(String value)

public Contact.Builder setLanguageTag(String value)

Required. The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.

string language_tag = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The languageTag to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setLanguageTagBytes(ByteString value)

public Contact.Builder setLanguageTagBytes(ByteString value)

Required. The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.

string language_tag = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for languageTag to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setName(String value)

public Contact.Builder setName(String value)

Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Contact.Builder setNameBytes(ByteString value)

Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setNotificationCategorySubscriptions(int index, NotificationCategory value)

public Contact.Builder setNotificationCategorySubscriptions(int index, NotificationCategory value)

Required. The categories of notifications that the contact will receive communications for.

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

Parameters
Name Description
index int

The index to set the value at.

value NotificationCategory

The notificationCategorySubscriptions to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setNotificationCategorySubscriptionsValue(int index, int value)

public Contact.Builder setNotificationCategorySubscriptionsValue(int index, int value)

Required. The categories of notifications that the contact will receive communications for.

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

Parameters
Name Description
index int

The index to set the value at.

value int

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

Returns
Type Description
Contact.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

public final Contact.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Contact.Builder
Overrides

setValidateTime(Timestamp value)

public Contact.Builder setValidateTime(Timestamp value)

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

.google.protobuf.Timestamp validate_time = 9;

Parameter
Name Description
value Timestamp
Returns
Type Description
Contact.Builder

setValidateTime(Timestamp.Builder builderForValue)

public Contact.Builder setValidateTime(Timestamp.Builder builderForValue)

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

.google.protobuf.Timestamp validate_time = 9;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Contact.Builder

setValidationState(ValidationState value)

public Contact.Builder setValidationState(ValidationState value)

The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.

.google.cloud.essentialcontacts.v1.ValidationState validation_state = 8;

Parameter
Name Description
value ValidationState

The validationState to set.

Returns
Type Description
Contact.Builder

This builder for chaining.

setValidationStateValue(int value)

public Contact.Builder setValidationStateValue(int value)

The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.

.google.cloud.essentialcontacts.v1.ValidationState validation_state = 8;

Parameter
Name Description
value int

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

Returns
Type Description
Contact.Builder

This builder for chaining.