Class: Google::Apis::MirrorV1::Contact

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

Overview

A person or group that can be used as a creator or a contact.

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) ⇒ Contact

Returns a new instance of Contact



258
259
260
# File 'generated/google/apis/mirror_v1/classes.rb', line 258

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

Instance Attribute Details

#accept_commandsArray<Google::Apis::MirrorV1::Command>

A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command. Corresponds to the JSON property acceptCommands



186
187
188
# File 'generated/google/apis/mirror_v1/classes.rb', line 186

def accept_commands
  @accept_commands
end

#accept_typesArray<String>

A list of MIME types that a contact supports. The contact will be shown to the user if any of its acceptTypes matches any of the types of the attachments on the item. If no acceptTypes are given, the contact will be shown for all items. Corresponds to the JSON property acceptTypes

Returns:

  • (Array<String>)


193
194
195
# File 'generated/google/apis/mirror_v1/classes.rb', line 193

def accept_types
  @accept_types
end

#display_nameString

The name to display for this contact. Corresponds to the JSON property displayName

Returns:

  • (String)


198
199
200
# File 'generated/google/apis/mirror_v1/classes.rb', line 198

def display_name
  @display_name
end

#idString

An ID for this contact. This is generated by the application and is treated as an opaque token. Corresponds to the JSON property id

Returns:

  • (String)


204
205
206
# File 'generated/google/apis/mirror_v1/classes.rb', line 204

def id
  @id
end

#image_urlsArray<String>

Set of image URLs to display for a contact. Most contacts will have a single image, but a "group" contact may include up to 8 image URLs and they will be resized and cropped into a mosaic on the client. Corresponds to the JSON property imageUrls

Returns:

  • (Array<String>)


211
212
213
# File 'generated/google/apis/mirror_v1/classes.rb', line 211

def image_urls
  @image_urls
end

#kindString

The type of resource. This is always mirror#contact. Corresponds to the JSON property kind

Returns:

  • (String)


216
217
218
# File 'generated/google/apis/mirror_v1/classes.rb', line 216

def kind
  @kind
end

#phone_numberString

Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number. Corresponds to the JSON property phoneNumber

Returns:

  • (String)


222
223
224
# File 'generated/google/apis/mirror_v1/classes.rb', line 222

def phone_number
  @phone_number
end

#priorityFixnum

Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities. Corresponds to the JSON property priority

Returns:

  • (Fixnum)


228
229
230
# File 'generated/google/apis/mirror_v1/classes.rb', line 228

def priority
  @priority
end

#sharing_featuresArray<String>

A list of sharing features that a contact can handle. Allowed values are:

  • ADD_CAPTION Corresponds to the JSON property sharingFeatures

Returns:

  • (Array<String>)


234
235
236
# File 'generated/google/apis/mirror_v1/classes.rb', line 234

def sharing_features
  @sharing_features
end

#sourceString

The ID of the application that created this contact. This is populated by the API Corresponds to the JSON property source

Returns:

  • (String)


240
241
242
# File 'generated/google/apis/mirror_v1/classes.rb', line 240

def source
  @source
end

#speakable_nameString

Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic. Corresponds to the JSON property speakableName

Returns:

  • (String)


248
249
250
# File 'generated/google/apis/mirror_v1/classes.rb', line 248

def speakable_name
  @speakable_name
end

#typeString

The type for this contact. This is used for sorting in UIs. Allowed values are:

  • INDIVIDUAL - Represents a single person. This is the default.
  • GROUP - Represents more than a single person. Corresponds to the JSON property type

Returns:

  • (String)


256
257
258
# File 'generated/google/apis/mirror_v1/classes.rb', line 256

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'generated/google/apis/mirror_v1/classes.rb', line 263

def update!(**args)
  @accept_commands = args[:accept_commands] if args.key?(:accept_commands)
  @accept_types = args[:accept_types] if args.key?(:accept_types)
  @display_name = args[:display_name] if args.key?(:display_name)
  @id = args[:id] if args.key?(:id)
  @image_urls = args[:image_urls] if args.key?(:image_urls)
  @kind = args[:kind] if args.key?(:kind)
  @phone_number = args[:phone_number] if args.key?(:phone_number)
  @priority = args[:priority] if args.key?(:priority)
  @sharing_features = args[:sharing_features] if args.key?(:sharing_features)
  @source = args[:source] if args.key?(:source)
  @speakable_name = args[:speakable_name] if args.key?(:speakable_name)
  @type = args[:type] if args.key?(:type)
end