Class: Google::Apis::AdminDirectoryV1::UserPhone

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

Overview

JSON template for a phone entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ UserPhone

Returns a new instance of UserPhone.



3873
3874
3875
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3873

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

Instance Attribute Details

#custom_typeString

Custom Type. Corresponds to the JSON property customType

Returns:

  • (String)


3852
3853
3854
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3852

def custom_type
  @custom_type
end

#primaryBoolean Also known as: primary?

If this is user's primary phone or not. Corresponds to the JSON property primary

Returns:

  • (Boolean)


3857
3858
3859
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3857

def primary
  @primary
end

#typeString

Each entry can have a type which indicates standard types of that entry. For example phone could be of home_fax, work, mobile etc. In addition to the standard type, an entry can have a custom type and can give it any name. Such types should have the CUSTOM value as type and also have a customType value. Corresponds to the JSON property type

Returns:

  • (String)


3866
3867
3868
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3866

def type
  @type
end

#valueString

Phone number. Corresponds to the JSON property value

Returns:

  • (String)


3871
3872
3873
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3871

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3878
3879
3880
3881
3882
3883
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3878

def update!(**args)
  @custom_type = args[:custom_type] if args.key?(:custom_type)
  @primary = args[:primary] if args.key?(:primary)
  @type = args[:type] if args.key?(:type)
  @value = args[:value] if args.key?(:value)
end