Class PhoneNumber.Builder (4.89.0)

public static final class PhoneNumber.Builder extends 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.

Protobuf type google.cloud.dialogflow.v2beta1.PhoneNumber

Static Methods

getDescriptor()

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

Methods

build()

public PhoneNumber build()
Returns
Type Description
PhoneNumber

buildPartial()

public PhoneNumber buildPartial()
Returns
Type Description
PhoneNumber

clear()

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

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. 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
Type Description
PhoneNumber.Builder

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
Type Description
PhoneNumber.Builder

This builder for chaining.

clearName()

public PhoneNumber.Builder clearName()

Optional. The unique identifier of this phone number. Required for 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
Type Description
PhoneNumber.Builder

This builder for chaining.

clearPhoneNumber()

public PhoneNumber.Builder clearPhoneNumber()

Output only. Phone number in E.164 format. An example of a correctly formatted phone number: +15556767888.

string phone_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PhoneNumber.Builder

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. 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
Type Description
String

The conversationProfile.

getConversationProfileBytes()

public 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. 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
Type Description
ByteString

The bytes for conversationProfile.

getDefaultInstanceForType()

public PhoneNumber getDefaultInstanceForType()
Returns
Type Description
PhoneNumber

getDescriptorForType()

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

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];

Returns
Type Description
PhoneNumber.LifecycleState

The lifecycleState.

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];

Returns
Type Description
int

The enum numeric value on the wire for lifecycleState.

getName()

public String getName()

Optional. The unique identifier of this phone number. Required for 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
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Optional. The unique identifier of this phone number. Required for 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
Type Description
ByteString

The bytes for name.

getPhoneNumber()

public String getPhoneNumber()

Output only. Phone number in E.164 format. An example of a correctly formatted phone number: +15556767888.

string phone_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The phoneNumber.

getPhoneNumberBytes()

public ByteString getPhoneNumberBytes()

Output only. Phone number in E.164 format. An example of a correctly formatted phone number: +15556767888.

string phone_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for phoneNumber.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PhoneNumber other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setConversationProfile(String value)

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. 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];

Parameter
Name Description
value String

The conversationProfile to set.

Returns
Type Description
PhoneNumber.Builder

This builder for chaining.

setConversationProfileBytes(ByteString value)

public PhoneNumber.Builder setConversationProfileBytes(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. 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];

Parameter
Name Description
value ByteString

The bytes for conversationProfile to set.

Returns
Type Description
PhoneNumber.Builder

This builder for chaining.

setLifecycleState(PhoneNumber.LifecycleState value)

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];

Parameter
Name Description
value PhoneNumber.LifecycleState

The lifecycleState to set.

Returns
Type Description
PhoneNumber.Builder

This builder for chaining.

setLifecycleStateValue(int value)

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];

Parameter
Name Description
value int

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

Returns
Type Description
PhoneNumber.Builder

This builder for chaining.

setName(String value)

public PhoneNumber.Builder setName(String value)

Optional. The unique identifier of this phone number. Required for 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];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
PhoneNumber.Builder

This builder for chaining.

setNameBytes(ByteString value)

public PhoneNumber.Builder setNameBytes(ByteString value)

Optional. The unique identifier of this phone number. Required for 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];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
PhoneNumber.Builder

This builder for chaining.

setPhoneNumber(String value)

public PhoneNumber.Builder setPhoneNumber(String value)

Output only. Phone number in E.164 format. An example of a correctly formatted phone number: +15556767888.

string phone_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The phoneNumber to set.

Returns
Type Description
PhoneNumber.Builder

This builder for chaining.

setPhoneNumberBytes(ByteString value)

public PhoneNumber.Builder setPhoneNumberBytes(ByteString value)

Output only. Phone number in E.164 format. An example of a correctly formatted phone number: +15556767888.

string phone_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for phoneNumber to set.

Returns
Type Description
PhoneNumber.Builder

This builder for chaining.