Class PhoneNumber.Builder (4.64.0)

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

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.

clearField(Descriptors.FieldDescriptor field)

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

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.

clearOneof(Descriptors.OneofDescriptor oneof)

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

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.

clone()

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

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 GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PhoneNumber.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
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.

setField(Descriptors.FieldDescriptor field, Object value)

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

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.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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