Class PhoneNumber.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PhoneNumber.Builder>
com.google.cloud.dialogflow.v2beta1.PhoneNumber.Builder
All Implemented Interfaces:
PhoneNumberOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
PhoneNumber

public static final class PhoneNumber.Builder extends com.google.protobuf.GeneratedMessage.Builder<PhoneNumber.Builder> implements PhoneNumberOrBuilder
 Represents a phone number.
 `PhoneNumber` resources enable phone calls to be answered by Dialogflow
 services and are added to a project through a
 [PhoneNumberOrder][google.cloud.dialogflow.v2beta1.PhoneNumberOrder].
 
Protobuf type google.cloud.dialogflow.v2beta1.PhoneNumber
  • Method Details

    • getDescriptor

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

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

      public PhoneNumber.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.GeneratedMessage.Builder<PhoneNumber.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.GeneratedMessage.Builder<PhoneNumber.Builder>
    • getDefaultInstanceForType

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

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

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

      public PhoneNumber.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<PhoneNumber.Builder>
    • mergeFrom

      public PhoneNumber.Builder mergeFrom(PhoneNumber other)
    • isInitialized

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

      public PhoneNumber.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<PhoneNumber.Builder>
      Throws:
      IOException
    • getInboundRestrictionCase

      public PhoneNumber.InboundRestrictionCase getInboundRestrictionCase()
      Specified by:
      getInboundRestrictionCase in interface PhoneNumberOrBuilder
    • clearInboundRestriction

      public PhoneNumber.Builder clearInboundRestriction()
    • getName

      public String getName()
       Optional. The unique identifier of this phone number.
       Required for
       [PhoneNumbers.UpdatePhoneNumber][google.cloud.dialogflow.v2beta1.PhoneNumbers.UpdatePhoneNumber]
       method. Format: `projects/<Project ID>/phoneNumbers/<PhoneNumber ID>`.
       Format: `projects/<Project ID>/locations/<Location
       ID>/phoneNumbers/<PhoneNumber ID>`.
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getName in interface PhoneNumberOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Optional. The unique identifier of this phone number.
       Required for
       [PhoneNumbers.UpdatePhoneNumber][google.cloud.dialogflow.v2beta1.PhoneNumbers.UpdatePhoneNumber]
       method. Format: `projects/<Project ID>/phoneNumbers/<PhoneNumber ID>`.
       Format: `projects/<Project ID>/locations/<Location
       ID>/phoneNumbers/<PhoneNumber ID>`.
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNameBytes in interface PhoneNumberOrBuilder
      Returns:
      The bytes for name.
    • setName

      public PhoneNumber.Builder setName(String value)
       Optional. The unique identifier of this phone number.
       Required for
       [PhoneNumbers.UpdatePhoneNumber][google.cloud.dialogflow.v2beta1.PhoneNumbers.UpdatePhoneNumber]
       method. Format: `projects/<Project ID>/phoneNumbers/<PhoneNumber ID>`.
       Format: `projects/<Project ID>/locations/<Location
       ID>/phoneNumbers/<PhoneNumber ID>`.
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public PhoneNumber.Builder clearName()
       Optional. The unique identifier of this phone number.
       Required for
       [PhoneNumbers.UpdatePhoneNumber][google.cloud.dialogflow.v2beta1.PhoneNumbers.UpdatePhoneNumber]
       method. Format: `projects/<Project ID>/phoneNumbers/<PhoneNumber ID>`.
       Format: `projects/<Project ID>/locations/<Location
       ID>/phoneNumbers/<PhoneNumber ID>`.
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setNameBytes

      public PhoneNumber.Builder setNameBytes(com.google.protobuf.ByteString value)
       Optional. The unique identifier of this phone number.
       Required for
       [PhoneNumbers.UpdatePhoneNumber][google.cloud.dialogflow.v2beta1.PhoneNumbers.UpdatePhoneNumber]
       method. Format: `projects/<Project ID>/phoneNumbers/<PhoneNumber ID>`.
       Format: `projects/<Project ID>/locations/<Location
       ID>/phoneNumbers/<PhoneNumber ID>`.
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getPhoneNumber

      public String getPhoneNumber()
       Output only. Phone number in [E.164](https://en.wikipedia.org/wiki/E.164)
       format. An example of a correctly formatted phone number: +15556767888.
       
      string phone_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPhoneNumber in interface PhoneNumberOrBuilder
      Returns:
      The phoneNumber.
    • getPhoneNumberBytes

      public com.google.protobuf.ByteString getPhoneNumberBytes()
       Output only. Phone number in [E.164](https://en.wikipedia.org/wiki/E.164)
       format. An example of a correctly formatted phone number: +15556767888.
       
      string phone_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPhoneNumberBytes in interface PhoneNumberOrBuilder
      Returns:
      The bytes for phoneNumber.
    • setPhoneNumber

      public PhoneNumber.Builder setPhoneNumber(String value)
       Output only. Phone number in [E.164](https://en.wikipedia.org/wiki/E.164)
       format. An example of a correctly formatted phone number: +15556767888.
       
      string phone_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The phoneNumber to set.
      Returns:
      This builder for chaining.
    • clearPhoneNumber

      public PhoneNumber.Builder clearPhoneNumber()
       Output only. Phone number in [E.164](https://en.wikipedia.org/wiki/E.164)
       format. An example of a correctly formatted phone number: +15556767888.
       
      string phone_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setPhoneNumberBytes

      public PhoneNumber.Builder setPhoneNumberBytes(com.google.protobuf.ByteString value)
       Output only. Phone number in [E.164](https://en.wikipedia.org/wiki/E.164)
       format. An example of a correctly formatted phone number: +15556767888.
       
      string phone_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for phoneNumber to set.
      Returns:
      This builder for chaining.
    • getConversationProfile

      public String getConversationProfile()
       Optional. The conversation profile calls to this `PhoneNumber` should use.
       The project ID here should be the same as the one in
       [name][google.cloud.dialogflow.v2beta1.PhoneNumber.name].
       Format: `projects/<Project ID>/conversationProfiles/<ConversationProfile
       ID>`.
       Format: `projects/<Project ID>/locations/<Location
       ID>/conversationProfiles/<ConversationProfile ID>`.
       
      string conversation_profile = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getConversationProfile in interface PhoneNumberOrBuilder
      Returns:
      The conversationProfile.
    • getConversationProfileBytes

      public com.google.protobuf.ByteString getConversationProfileBytes()
       Optional. The conversation profile calls to this `PhoneNumber` should use.
       The project ID here should be the same as the one in
       [name][google.cloud.dialogflow.v2beta1.PhoneNumber.name].
       Format: `projects/<Project ID>/conversationProfiles/<ConversationProfile
       ID>`.
       Format: `projects/<Project ID>/locations/<Location
       ID>/conversationProfiles/<ConversationProfile ID>`.
       
      string conversation_profile = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getConversationProfileBytes in interface PhoneNumberOrBuilder
      Returns:
      The bytes for conversationProfile.
    • setConversationProfile

      public PhoneNumber.Builder setConversationProfile(String value)
       Optional. The conversation profile calls to this `PhoneNumber` should use.
       The project ID here should be the same as the one in
       [name][google.cloud.dialogflow.v2beta1.PhoneNumber.name].
       Format: `projects/<Project ID>/conversationProfiles/<ConversationProfile
       ID>`.
       Format: `projects/<Project ID>/locations/<Location
       ID>/conversationProfiles/<ConversationProfile ID>`.
       
      string conversation_profile = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The conversationProfile to set.
      Returns:
      This builder for chaining.
    • clearConversationProfile

      public PhoneNumber.Builder clearConversationProfile()
       Optional. The conversation profile calls to this `PhoneNumber` should use.
       The project ID here should be the same as the one in
       [name][google.cloud.dialogflow.v2beta1.PhoneNumber.name].
       Format: `projects/<Project ID>/conversationProfiles/<ConversationProfile
       ID>`.
       Format: `projects/<Project ID>/locations/<Location
       ID>/conversationProfiles/<ConversationProfile ID>`.
       
      string conversation_profile = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setConversationProfileBytes

      public PhoneNumber.Builder setConversationProfileBytes(com.google.protobuf.ByteString value)
       Optional. The conversation profile calls to this `PhoneNumber` should use.
       The project ID here should be the same as the one in
       [name][google.cloud.dialogflow.v2beta1.PhoneNumber.name].
       Format: `projects/<Project ID>/conversationProfiles/<ConversationProfile
       ID>`.
       Format: `projects/<Project ID>/locations/<Location
       ID>/conversationProfiles/<ConversationProfile ID>`.
       
      string conversation_profile = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for conversationProfile to set.
      Returns:
      This builder for chaining.
    • getLifecycleStateValue

      public int getLifecycleStateValue()
       Output only. The state of the `PhoneNumber`. Defaults to `ACTIVE`.
       `PhoneNumber` objects set to `DELETE_REQUESTED` always decline incoming
       calls and can be removed completely within 30 days.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLifecycleStateValue in interface PhoneNumberOrBuilder
      Returns:
      The enum numeric value on the wire for lifecycleState.
    • setLifecycleStateValue

      public PhoneNumber.Builder setLifecycleStateValue(int value)
       Output only. The state of the `PhoneNumber`. Defaults to `ACTIVE`.
       `PhoneNumber` objects set to `DELETE_REQUESTED` always decline incoming
       calls and can be removed completely within 30 days.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for lifecycleState to set.
      Returns:
      This builder for chaining.
    • getLifecycleState

      public PhoneNumber.LifecycleState getLifecycleState()
       Output only. The state of the `PhoneNumber`. Defaults to `ACTIVE`.
       `PhoneNumber` objects set to `DELETE_REQUESTED` always decline incoming
       calls and can be removed completely within 30 days.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLifecycleState in interface PhoneNumberOrBuilder
      Returns:
      The lifecycleState.
    • setLifecycleState

      public PhoneNumber.Builder setLifecycleState(PhoneNumber.LifecycleState value)
       Output only. The state of the `PhoneNumber`. Defaults to `ACTIVE`.
       `PhoneNumber` objects set to `DELETE_REQUESTED` always decline incoming
       calls and can be removed completely within 30 days.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The lifecycleState to set.
      Returns:
      This builder for chaining.
    • clearLifecycleState

      public PhoneNumber.Builder clearLifecycleState()
       Output only. The state of the `PhoneNumber`. Defaults to `ACTIVE`.
       `PhoneNumber` objects set to `DELETE_REQUESTED` always decline incoming
       calls and can be removed completely within 30 days.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasAllowedSipTrunks

      public boolean hasAllowedSipTrunks()
       Optional. Only allow calls from the specified SIP trunks.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.AllowedSipTrunks allowed_sip_trunks = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasAllowedSipTrunks in interface PhoneNumberOrBuilder
      Returns:
      Whether the allowedSipTrunks field is set.
    • getAllowedSipTrunks

      public PhoneNumber.AllowedSipTrunks getAllowedSipTrunks()
       Optional. Only allow calls from the specified SIP trunks.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.AllowedSipTrunks allowed_sip_trunks = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAllowedSipTrunks in interface PhoneNumberOrBuilder
      Returns:
      The allowedSipTrunks.
    • setAllowedSipTrunks

      public PhoneNumber.Builder setAllowedSipTrunks(PhoneNumber.AllowedSipTrunks value)
       Optional. Only allow calls from the specified SIP trunks.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.AllowedSipTrunks allowed_sip_trunks = 7 [(.google.api.field_behavior) = OPTIONAL];
    • setAllowedSipTrunks

      public PhoneNumber.Builder setAllowedSipTrunks(PhoneNumber.AllowedSipTrunks.Builder builderForValue)
       Optional. Only allow calls from the specified SIP trunks.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.AllowedSipTrunks allowed_sip_trunks = 7 [(.google.api.field_behavior) = OPTIONAL];
    • mergeAllowedSipTrunks

      public PhoneNumber.Builder mergeAllowedSipTrunks(PhoneNumber.AllowedSipTrunks value)
       Optional. Only allow calls from the specified SIP trunks.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.AllowedSipTrunks allowed_sip_trunks = 7 [(.google.api.field_behavior) = OPTIONAL];
    • clearAllowedSipTrunks

      public PhoneNumber.Builder clearAllowedSipTrunks()
       Optional. Only allow calls from the specified SIP trunks.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.AllowedSipTrunks allowed_sip_trunks = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getAllowedSipTrunksBuilder

      public PhoneNumber.AllowedSipTrunks.Builder getAllowedSipTrunksBuilder()
       Optional. Only allow calls from the specified SIP trunks.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.AllowedSipTrunks allowed_sip_trunks = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getAllowedSipTrunksOrBuilder

      public PhoneNumber.AllowedSipTrunksOrBuilder getAllowedSipTrunksOrBuilder()
       Optional. Only allow calls from the specified SIP trunks.
       
      .google.cloud.dialogflow.v2beta1.PhoneNumber.AllowedSipTrunks allowed_sip_trunks = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAllowedSipTrunksOrBuilder in interface PhoneNumberOrBuilder
    • hasPurgeTime

      public boolean hasPurgeTime()
       Output only. The time at which this resource will be purged.
       
      .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasPurgeTime in interface PhoneNumberOrBuilder
      Returns:
      Whether the purgeTime field is set.
    • getPurgeTime

      public com.google.protobuf.Timestamp getPurgeTime()
       Output only. The time at which this resource will be purged.
       
      .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPurgeTime in interface PhoneNumberOrBuilder
      Returns:
      The purgeTime.
    • setPurgeTime

      public PhoneNumber.Builder setPurgeTime(com.google.protobuf.Timestamp value)
       Output only. The time at which this resource will be purged.
       
      .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setPurgeTime

      public PhoneNumber.Builder setPurgeTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The time at which this resource will be purged.
       
      .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergePurgeTime

      public PhoneNumber.Builder mergePurgeTime(com.google.protobuf.Timestamp value)
       Output only. The time at which this resource will be purged.
       
      .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearPurgeTime

      public PhoneNumber.Builder clearPurgeTime()
       Output only. The time at which this resource will be purged.
       
      .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getPurgeTimeBuilder

      public com.google.protobuf.Timestamp.Builder getPurgeTimeBuilder()
       Output only. The time at which this resource will be purged.
       
      .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getPurgeTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder()
       Output only. The time at which this resource will be purged.
       
      .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPurgeTimeOrBuilder in interface PhoneNumberOrBuilder