Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Update contact data for an existing contact person. Any non-contact data will not be modified. The request throws a 400 error if `updatePersonFields` is not specified. The request throws a 400 error if `person.metadata.sources` is not specified for the contact to be updated. The request throws a 412 error if `person.metadata.sources.etag` is different than the contact's etag, which indicates the contact has changed since its data was read. Clients should get the latest person and re-apply their updates to the latest person.
See: People API Reference for people.people.updateContact
.
Synopsis
- type PeopleUpdateContactResource = "v1" :> (CaptureMode "resourceName" "updateContact" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "updatePersonFields" GFieldMask :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Person :> Patch '[JSON] Person)))))))))
- peopleUpdateContact :: Text -> Person -> PeopleUpdateContact
- data PeopleUpdateContact
- pucXgafv :: Lens' PeopleUpdateContact (Maybe Xgafv)
- pucUploadProtocol :: Lens' PeopleUpdateContact (Maybe Text)
- pucResourceName :: Lens' PeopleUpdateContact Text
- pucUpdatePersonFields :: Lens' PeopleUpdateContact (Maybe GFieldMask)
- pucAccessToken :: Lens' PeopleUpdateContact (Maybe Text)
- pucUploadType :: Lens' PeopleUpdateContact (Maybe Text)
- pucPayload :: Lens' PeopleUpdateContact Person
- pucCallback :: Lens' PeopleUpdateContact (Maybe Text)
REST Resource
type PeopleUpdateContactResource = "v1" :> (CaptureMode "resourceName" "updateContact" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "updatePersonFields" GFieldMask :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Person :> Patch '[JSON] Person))))))))) Source #
A resource alias for people.people.updateContact
method which the
PeopleUpdateContact
request conforms to.
Creating a Request
Creates a value of PeopleUpdateContact
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data PeopleUpdateContact Source #
Update contact data for an existing contact person. Any non-contact data will not be modified. The request throws a 400 error if `updatePersonFields` is not specified. The request throws a 400 error if `person.metadata.sources` is not specified for the contact to be updated. The request throws a 412 error if `person.metadata.sources.etag` is different than the contact's etag, which indicates the contact has changed since its data was read. Clients should get the latest person and re-apply their updates to the latest person.
See: peopleUpdateContact
smart constructor.
Instances
Request Lenses
pucUploadProtocol :: Lens' PeopleUpdateContact (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
pucResourceName :: Lens' PeopleUpdateContact Text Source #
The resource name for the person, assigned by the server. An ASCII string with a max length of 27 characters, in the form of `people/`person_id.
pucUpdatePersonFields :: Lens' PeopleUpdateContact (Maybe GFieldMask) Source #
- *Required.** A field mask to restrict which fields on the person are updated. Multiple fields can be specified by separating them with commas. All updated fields will be replaced. Valid values are: * addresses * biographies * birthdays * emailAddresses * events * genders
- imClients * interests * locales * names * nicknames * occupations * organizations * phoneNumbers * relations * residences * sipAddresses * urls * userDefined
pucAccessToken :: Lens' PeopleUpdateContact (Maybe Text) Source #
OAuth access token.
pucUploadType :: Lens' PeopleUpdateContact (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
pucPayload :: Lens' PeopleUpdateContact Person Source #
Multipart request metadata.
pucCallback :: Lens' PeopleUpdateContact (Maybe Text) Source #
JSONP