Alexa Auto SDK  4.3
Public Member Functions | List of all members
aace::addressBook::AddressBook::IAddressBookEntriesFactory Class Referenceabstract

Public Member Functions

virtual bool addName (const std::string &entryId, const std::string &name)=0
 
virtual bool addName (const std::string &entryId, const std::string &firstName, const std::string &lastName)=0
 
virtual bool addName (const std::string &entryId, const std::string &firstName, const std::string &lastName, const std::string &nickname, const std::string &phoneticFirstName="", const std::string &phoneticLastName="")=0
 
virtual bool addPhone (const std::string &entryId, const std::string &label, const std::string &number)=0
 
virtual bool addPostalAddress (const std::string &entryId, const std::string &label, const std::string &addressLine1, const std::string &addressLine2, const std::string &addressLine3, const std::string &city, const std::string &stateOrRegion, const std::string &districtOrCounty, const std::string &postalCode, const std::string &country, float latitudeInDegrees, float longitudeInDegrees, float accuracyInMeters)=0
 
virtual bool addEntry (const std::string &payload)=0
 

Detailed Description

Factory class for ingesting the AddressBook Entries.

Member Function Documentation

◆ addName() [1/3]

virtual bool aace::addressBook::AddressBook::IAddressBookEntriesFactory::addName ( const std::string &  entryId,
const std::string &  name 
)
pure virtual

Add name.

Deprecated:
This function is deprecated. Use addEntry() instead.
Parameters
[in]entryIdA unique identifier of entry in an address book.
[in]nameName of the entry, or an empty string if not available.
Returns
true on successful or false when name for the id was already added or if entryId is empty.

◆ addName() [2/3]

virtual bool aace::addressBook::AddressBook::IAddressBookEntriesFactory::addName ( const std::string &  entryId,
const std::string &  firstName,
const std::string &  lastName 
)
pure virtual

Add first and last name.

Deprecated:
This function is deprecated. Use addEntry() instead.
Parameters
[in]entryIdA unique identifier of entry in an address book.
[in]firstNameFirst name of the entry, or an empty string if not available.
[in]lastNameLast name of the entry, or an empty string if not available.
Returns
true on successful or false when name for the id was already added or if entryId is empty.

◆ addName() [3/3]

virtual bool aace::addressBook::AddressBook::IAddressBookEntriesFactory::addName ( const std::string &  entryId,
const std::string &  firstName,
const std::string &  lastName,
const std::string &  nickname,
const std::string &  phoneticFirstName = "",
const std::string &  phoneticLastName = "" 
)
pure virtual

Add first name, last name, nickname, and phonetics.

Deprecated:
This function is deprecated. Use addEntry() instead.
Parameters
[in]entryIdA unique identifier of entry in an address book.
[in]firstNameFirst name of the entry, or an empty string if not available.
[in]lastNameLast name of the entry, or an empty string if not available.
[in]nicknameNickname of the entry, or an empty string if not available.
[in]phoneticFirstNameThe phonetic first name of the entry, or an empty string if not available.
[in]phoneticLastNameThe phonetic last name of the entry, or an empty string if not available.
Returns
true if successful or false when the entryId is empty or already used.
Note
If a name field contains Japanese Kanji characters, you are required to provide the corresponding phonetic field as well. Alexa uses the phonetic values for entity resolution and TTS when the device locale setting is "ja-JP".

◆ addPhone()

virtual bool aace::addressBook::AddressBook::IAddressBookEntriesFactory::addPhone ( const std::string &  entryId,
const std::string &  label,
const std::string &  number 
)
pure virtual

Add phone number(s).

Deprecated:
This function is deprecated. Use addEntry() instead.
Parameters
[in]entryIdA unique identifier of entry in an address book.
[in]labelAlphanumeric phone label (e.g., Home, Mobile, Work), or an empty string if not available.
[in]numberNumeric phone number, or an empty string if not available.
Returns
true on successful or false when reached the max allowed per entryId or if entryId is empty.
Note
For the phone labels recognized by Alexa and for information about disambiguating phone numbers when multiple labels are associated with a contact, see Phone number type disambiguation.

◆ addPostalAddress()

virtual bool aace::addressBook::AddressBook::IAddressBookEntriesFactory::addPostalAddress ( const std::string &  entryId,
const std::string &  label,
const std::string &  addressLine1,
const std::string &  addressLine2,
const std::string &  addressLine3,
const std::string &  city,
const std::string &  stateOrRegion,
const std::string &  districtOrCounty,
const std::string &  postalCode,
const std::string &  country,
float  latitudeInDegrees,
float  longitudeInDegrees,
float  accuracyInMeters 
)
pure virtual

Add postal address(es).

Deprecated:
This function is deprecated. Use addEntry() instead.
Parameters
[in]entryIdA unique identifier of entry in an address book.
[in]labelAlphanumeric postal address label (e.g., Home, Work), or an empty string if not available.
[in]addressLine1First line of the postal address, or an empty string if not available.
[in]addressLine2Second line of the postal address, or an empty string if not available.
[in]addressLine3Third line of the postal address, or an empty string if not available.
[in]cityCity name, or an empty string if not available.
[in]stateOrRegionState or Region name, or an empty string if not available.
[in]districtOrCountyDistrict or County name, or an empty string if not available.
[in]postalCodePostal code or Zip code, or an empty string if not available.
[in]countryCountry name, or an empty string if not available.
[in]latitudeInDegreesGeo latitude in degrees.
[in]longitudeInDegreesGeo longitude in degrees.
[in]accuracyInMetersAccuracy in meters, or zero if not available.
Returns
true on successful or false when reached the max allowed per id or if entryId is empty.

◆ addEntry()

virtual bool aace::addressBook::AddressBook::IAddressBookEntriesFactory::addEntry ( const std::string &  payload)
pure virtual

Add name, phone number and postal address of an entry in the address book

{
"entryId": "{{STRING}}",
"name": {
"firstName": "{{STRING}}",
"lastName": "{{STRING}}",
"nickName": "{{STRING}}",
"phoneticFirstName": "{{STRING}}",
"phoneticLastName": "{{STRING}}"
},
"phoneNumbers": [
{
"label": "{{STRING}}",
"number": "{{STRING}}"
}
],
"postalAddresses": [
{
"label": "{{STRING}}",
"addressLine1": "{{STRING}}",
"addressLine2": "{{STRING}}",
"addressLine3": "{{STRING}}",
"city": "{{STRING}}",
"stateOrRegion": "{{STRING}}",
"districtOrCounty": "{{STRING}}",
"postalCode": "{{STRING}}",
"country": "{{STRING}}",
"latitudeInDegrees": {{FLOAT}},
"longitudeInDegrees": {{FLOAT}},
"accuracyInMeters": {{FLOAT}}
}
]
}
  • entryId A unique identifier for the address book entry. This field is required and must not be an empty string. Max size is 200 characters.
  • name.firstName The first name of the entry.
  • name.lastName The last name of the entry.
  • name.nickName The nick name of the entry.
  • name.phoneticFirstName The phonetic first name of the entry.
  • name.phoneticLastName The phonetic last name of the entry.
  • phoneNumbers.label Alphanumeric phone label (e.g., Home, Mobile, Work). Max size is 100 characters.
  • phoneNumbers.number Numeric phone number.
  • postalAddresses.label Alphanumeric postal address label (e.g., Home, Work). Max size is 100 characters.
  • postalAddresses.addressLine1 First line of the postal address. Max size 60.
  • postalAddresses.addressLine2 Second line of the postal address. Max size 60.
  • postalAddresses.addressLine3 Third line of the postal address. Max size 60.
  • postalAddresses.city City name of the postal address.
  • postalAddresses.stateOrRegion State or region name of the postal address.
  • postalAddresses.districtOrCounty District or county name of the postal address.
  • postalAddresses.postalCode Postal code or zip code of the postal address.
  • postalAddresses.country Country name of the postal address.
  • postalAddresses.latitudeInDegrees The latitude component of GPS geo coordinate in degrees (-90 to 90). This field is required.
  • postalAddresses.longitudeInDegrees The longitude component of GPS geo coordinate in degrees (-180 to 180). This field is required.
  • postalAddresses.accuracyInMeters GPS provided accuracy value for the geo coordinates.
Parameters
payloadThe address book entry data in JSON format.
Returns
true if successful or false when the input validation fails.
Note
For each field not marked required, exclude the field if the value is not available.
If any required field is absent, the Engine returns false from addEntry() and discards the entire entry.
The total length of all fields in the "name" element cannot exceed 1000 characters. If the element exceeds the limit, the Engine returns false from addEntry() and discards the entry.
For each element in the “postalAddresses” or “phoneNumbers” arrays, the total number of characters used in a single element cannot exceed 1000. If an element exceeds the limit, the Engine returns false from addEntry() as a warning, uses the rest of the entry, and discards the element exceeding the limit.
The maximum number of elements allowed in the “postalAddresses” or “phoneNumbers” array is 30. If the total number of elements exceeds the limit, the Engine returns false from addEntry() as a warning and uses the first 30 elements.
The Engine ignores the "postalAddresses" node while ingesting entries for the address book type AddressBookType::CONTACT. Similarly, the Engine ignores the "phoneNumbers" node while ingesting entries for the address book type AddressBookType::NAVIGATION.
For the phone labels recognized by Alexa and for information about disambiguating phone numbers when multiple labels are associated with a contact, see Phone number type disambiguation.
If a name field contains Japanese Kanji characters, you are required to provide the corresponding phonetic field as well. Alexa uses the phonetic values for entity resolution and TTS when the device locale setting is "ja-JP".

Alexa Auto SDK 4.3 - Copyright 2017-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0