Class Contact.Builder (2.35.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.essentialcontacts.v1.NotificationCategory>

The notificationCategorySubscriptions to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<Integer>

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

Returns
TypeDescription
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
NameDescription
valueNotificationCategory

The notificationCategorySubscriptions to add.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
Contact.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Contact build()
Returns
TypeDescription
Contact

buildPartial()

public Contact buildPartial()
Returns
TypeDescription
Contact

clear()

public Contact.Builder clear()
Returns
TypeDescription
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
TypeDescription
Contact.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Contact.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Contact.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Contact.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Contact.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Contact getDefaultInstanceForType()
Returns
TypeDescription
Contact

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the validateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Contact other)

public Contact.Builder mergeFrom(Contact other)
Parameter
NameDescription
otherContact
Returns
TypeDescription
Contact.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Contact.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueString

The email to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for email to set.

Returns
TypeDescription
Contact.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Contact.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The languageTag to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for languageTag to set.

Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueNotificationCategory

The notificationCategorySubscriptions to set.

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueint

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

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Contact.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Contact.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueValidationState

The validationState to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
Contact.Builder

This builder for chaining.