Service Client: Google::Cloud::Dialogflow::V2beta1::PhoneNumber::PhoneNumbersClient

Client stub representing the remote PhoneNumbers gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to dialogflow.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Dialogflow::V2beta1::PhoneNumber - Compiled Protocol Buffers messages for google/cloud/dialogflow/v2beta1/phone_number.proto

SYNOPSIS

use Google::Cloud::Dialogflow::V2beta1::PhoneNumber;

my $msg = Google::Cloud::Dialogflow::V2beta1::PhoneNumber::PhoneNumber->new({
    name => $name,
    phone_number => $phone_number,
    conversation_profile => $conversation_profile,
    lifecycle_state => $lifecycle_state,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Dialogflow::V2beta1::PhoneNumber::PhoneNumber->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/dialogflow/v2beta1/phone_number.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Dialogflow::V2beta1::PhoneNumber::PhoneNumber

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

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

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

  • $msg->phone_number() / $msg->phone_number($value)

    Type: String

    Output only. Phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format. An example of a correctly formatted phone number: +15556767888.

  • $msg->conversation_profile() / $msg->conversation_profile($value)

    Type: String

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

  • $msg->lifecycle_state() / $msg->lifecycle_state($value)

    Type: Enum (Google::Cloud::Dialogflow::V2beta1::PhoneNumber::LifecycleState)

    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.

  • $msg->allowed_sip_trunks() / $msg->allowed_sip_trunks($value)

    Type: Message (Google::Cloud::Dialogflow::V2beta1::PhoneNumber::PhoneNumber::AllowedSipTrunks)

    Optional. Only allow calls from the specified SIP trunks.

  • $msg->purge_time() / $msg->purge_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. The time at which this resource will be purged.

Enum: PhoneNumber::LifecycleState

  • LIFECYCLE_STATE_UNSPECIFIED => 0

  • ACTIVE => 1

  • DELETE_REQUESTED => 2

Google::Cloud::Dialogflow::V2beta1::PhoneNumber::DeletePhoneNumberRequest

The request message for [PhoneNumbers.DeletePhoneNumber][google.cloud.dialogflow.v2beta1.PhoneNumbers.DeletePhoneNumber].

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The unique identifier of the `PhoneNumber` to delete. Format: `projects/<Project ID>/phoneNumbers/<PhoneNumber ID>`. Format: `projects/<Project ID>/locations/<Location ID>/phoneNumbers/<PhoneNumber ID>`.

Google::Cloud::Dialogflow::V2beta1::PhoneNumber::UndeletePhoneNumberRequest

The request message for [PhoneNumbers.UndeletePhoneNumber][google.cloud.dialogflow.v2beta1.PhoneNumbers.UndeletePhoneNumber].

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The unique identifier of the `PhoneNumber` to delete. Format: `projects/<Project ID>/phoneNumbers/<PhoneNumber ID>`. Format: `projects/<Project ID>/locations/<Location ID>/phoneNumbers/<PhoneNumber ID>`.

Google::Cloud::Dialogflow::V2beta1::PhoneNumber::ListPhoneNumbersRequest

The request message for [PhoneNumbers.ListPhoneNumbers][google.cloud.dialogflow.v2beta1.PhoneNumbers.ListPhoneNumbers].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The project to list all `PhoneNumber` resources from. Format: `projects/<Project ID>`. Format: `projects/<Project ID>/locations/<Location ID>`.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional. The maximum number of items to return in a single page. The default value is 100. The maximum value is 1000.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional. The next_page_token value returned from a previous list request.

  • $msg->show_deleted() / $msg->show_deleted($value)

    Type: Bool

    Optional. Controls whether `PhoneNumber` resources in the [DELETE_REQUESTED][google.cloud.dialogflow.v2beta1.PhoneNumber.LifecycleState.DELETE_REQUESTED] state should be returned. Defaults to false.

Google::Cloud::Dialogflow::V2beta1::PhoneNumber::ListPhoneNumbersResponse

The response message for [PhoneNumbers.ListPhoneNumbers][google.cloud.dialogflow.v2beta1.PhoneNumbers.ListPhoneNumbers].

Inherits from Protobuf::Message.

Accessors

  • $msg->phone_numbers() / $msg->phone_numbers($value)

    Type: Message (Google::Cloud::Dialogflow::V2beta1::PhoneNumber::PhoneNumber)

    The list of `PhoneNumber` resources. There is a maximum number of items returned based on the page_size field in the request.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    Token to retrieve the next page of results, or empty if there are no more results in the list.

Google::Cloud::Dialogflow::V2beta1::PhoneNumber::UpdatePhoneNumberRequest

The request message for [PhoneNumbers.UpdatePhoneNumber][google.cloud.dialogflow.v2beta1.PhoneNumbers.UpdatePhoneNumber].

Inherits from Protobuf::Message.

Accessors

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Dialogflow::V2beta1::PhoneNumber::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.