Class Contact.Builder

  • All Implemented Interfaces:
    ContactOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Contact

    public static final class Contact.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
    implements ContactOrBuilder
     A contact that will receive notifications from Google Cloud.
     
    Protobuf type google.cloud.essentialcontacts.v1.Contact
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • clear

        public Contact.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • getDefaultInstanceForType

        public Contact getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Contact build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Contact buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Contact.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • setField

        public Contact.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                        Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • clearField

        public Contact.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • clearOneof

        public Contact.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • setRepeatedField

        public Contact.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                int index,
                                                Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • addRepeatedField

        public Contact.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • mergeFrom

        public Contact.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Contact.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • mergeFrom

        public Contact.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Contact.Builder>
        Throws:
        IOException
      • 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];
        Specified by:
        getName in interface ContactOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.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];
        Specified by:
        getNameBytes in interface ContactOrBuilder
        Returns:
        The bytes for name.
      • setName

        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];
        Parameters:
        value - The name to set.
        Returns:
        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:
        This builder for chaining.
      • setNameBytes

        public Contact.Builder setNameBytes​(com.google.protobuf.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];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • 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];
        Specified by:
        getEmail in interface ContactOrBuilder
        Returns:
        The email.
      • getEmailBytes

        public com.google.protobuf.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];
        Specified by:
        getEmailBytes in interface ContactOrBuilder
        Returns:
        The bytes for email.
      • setEmail

        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];
        Parameters:
        value - The email to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setEmailBytes

        public Contact.Builder setEmailBytes​(com.google.protobuf.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];
        Parameters:
        value - The bytes for email to set.
        Returns:
        This builder for chaining.
      • 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];
        Specified by:
        getNotificationCategorySubscriptionsList in interface ContactOrBuilder
        Returns:
        A list containing the notificationCategorySubscriptions.
      • 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];
        Specified by:
        getNotificationCategorySubscriptionsCount in interface ContactOrBuilder
        Returns:
        The count of notificationCategorySubscriptions.
      • getNotificationCategorySubscriptions

        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];
        Specified by:
        getNotificationCategorySubscriptions in interface ContactOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The notificationCategorySubscriptions at the given index.
      • setNotificationCategorySubscriptions

        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:
        index - The index to set the value at.
        value - The notificationCategorySubscriptions to set.
        Returns:
        This builder for chaining.
      • addNotificationCategorySubscriptions

        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];
        Parameters:
        value - The notificationCategorySubscriptions to add.
        Returns:
        This builder for chaining.
      • addAllNotificationCategorySubscriptions

        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];
        Parameters:
        values - The notificationCategorySubscriptions to add.
        Returns:
        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:
        This builder for chaining.
      • 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];
        Specified by:
        getNotificationCategorySubscriptionsValueList in interface ContactOrBuilder
        Returns:
        A list containing the enum numeric values on the wire for notificationCategorySubscriptions.
      • getNotificationCategorySubscriptionsValue

        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];
        Specified by:
        getNotificationCategorySubscriptionsValue in interface ContactOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of notificationCategorySubscriptions at the given index.
      • setNotificationCategorySubscriptionsValue

        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:
        index - The index to set the value at.
        value - The enum numeric value on the wire for notificationCategorySubscriptions to set.
        Returns:
        This builder for chaining.
      • addNotificationCategorySubscriptionsValue

        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];
        Parameters:
        value - The enum numeric value on the wire for notificationCategorySubscriptions to add.
        Returns:
        This builder for chaining.
      • addAllNotificationCategorySubscriptionsValue

        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];
        Parameters:
        values - The enum numeric values on the wire for notificationCategorySubscriptions to add.
        Returns:
        This builder for chaining.
      • getLanguageTag

        public String getLanguageTag()
         Required. The preferred language for notifications, as a ISO 639-1 language
         code. See [Supported
         languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages)
         for a list of supported languages.
         
        string language_tag = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLanguageTag in interface ContactOrBuilder
        Returns:
        The languageTag.
      • getLanguageTagBytes

        public com.google.protobuf.ByteString getLanguageTagBytes()
         Required. The preferred language for notifications, as a ISO 639-1 language
         code. See [Supported
         languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages)
         for a list of supported languages.
         
        string language_tag = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLanguageTagBytes in interface ContactOrBuilder
        Returns:
        The bytes for languageTag.
      • setLanguageTag

        public Contact.Builder setLanguageTag​(String value)
         Required. The preferred language for notifications, as a ISO 639-1 language
         code. See [Supported
         languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages)
         for a list of supported languages.
         
        string language_tag = 4 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The languageTag to set.
        Returns:
        This builder for chaining.
      • clearLanguageTag

        public Contact.Builder clearLanguageTag()
         Required. The preferred language for notifications, as a ISO 639-1 language
         code. See [Supported
         languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages)
         for a list of supported languages.
         
        string language_tag = 4 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setLanguageTagBytes

        public Contact.Builder setLanguageTagBytes​(com.google.protobuf.ByteString value)
         Required. The preferred language for notifications, as a ISO 639-1 language
         code. See [Supported
         languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages)
         for a list of supported languages.
         
        string language_tag = 4 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for languageTag to set.
        Returns:
        This builder for chaining.
      • 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;
        Specified by:
        getValidationStateValue in interface ContactOrBuilder
        Returns:
        The enum numeric value on the wire for validationState.
      • setValidationStateValue

        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;
        Parameters:
        value - The enum numeric value on the wire for validationState to set.
        Returns:
        This builder for chaining.
      • 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;
        Specified by:
        getValidationState in interface ContactOrBuilder
        Returns:
        The validationState.
      • setValidationState

        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;
        Parameters:
        value - The validationState to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • 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;
        Specified by:
        hasValidateTime in interface ContactOrBuilder
        Returns:
        Whether the validateTime field is set.
      • getValidateTime

        public com.google.protobuf.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;
        Specified by:
        getValidateTime in interface ContactOrBuilder
        Returns:
        The validateTime.
      • setValidateTime

        public Contact.Builder setValidateTime​(com.google.protobuf.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;
      • setValidateTime

        public Contact.Builder setValidateTime​(com.google.protobuf.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;
      • mergeValidateTime

        public Contact.Builder mergeValidateTime​(com.google.protobuf.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;
      • 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;
      • getValidateTimeBuilder

        public com.google.protobuf.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;
      • getValidateTimeOrBuilder

        public com.google.protobuf.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;
        Specified by:
        getValidateTimeOrBuilder in interface ContactOrBuilder
      • setUnknownFields

        public final Contact.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>
      • mergeUnknownFields

        public final Contact.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Contact.Builder>