Class: Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1PhoneNumber

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2beta1/classes.rb,
lib/google/apis/dialogflow_v2beta1/representations.rb,
lib/google/apis/dialogflow_v2beta1/representations.rb

Overview

Represents a phone number. PhoneNumber resources enable phone calls to be answered by Dialogflow services and are added to a project through a PhoneNumberOrder.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2beta1PhoneNumber

Returns a new instance of GoogleCloudDialogflowV2beta1PhoneNumber.



20260
20261
20262
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 20260

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#conversation_profileString

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// conversationProfiles/. Format: projects//locations//conversationProfiles/. Corresponds to the JSON property conversationProfile

Returns:

  • (String)


20238
20239
20240
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 20238

def conversation_profile
  @conversation_profile
end

#lifecycle_stateString

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. Corresponds to the JSON property lifecycleState

Returns:

  • (String)


20245
20246
20247
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 20245

def lifecycle_state
  @lifecycle_state
end

#nameString

Optional. The unique identifier of this phone number. Required for PhoneNumbers.UpdatePhoneNumber method. Format: projects//phoneNumbers/. Format: projects//locations//phoneNumbers/. Corresponds to the JSON property name

Returns:

  • (String)


20252
20253
20254
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 20252

def name
  @name
end

#phone_numberString

Output only. Phone number in E.164 format. An example of a correctly formatted phone number: +15556767888. Corresponds to the JSON property phoneNumber

Returns:

  • (String)


20258
20259
20260
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 20258

def phone_number
  @phone_number
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



20265
20266
20267
20268
20269
20270
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 20265

def update!(**args)
  @conversation_profile = args[:conversation_profile] if args.key?(:conversation_profile)
  @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state)
  @name = args[:name] if args.key?(:name)
  @phone_number = args[:phone_number] if args.key?(:phone_number)
end