generated/google/apis/people_v1/service.rb
# 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.
# <br>
# The request throws a 400 error if `person.metadata.sources` is not
# specified for the contact to be updated.
# <br>
# The request throws a 400 error with an error with reason
# `"failedPrecondition"` 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.
# @param [String] resource_name
#   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/`<var>person_id</var>.
# @param [Google::Apis::PeopleV1::Person] person_object
# @param [String] update_person_fields
#   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
#   * memberships
#   * names
#   * nicknames
#   * occupations
#   * organizations
#   * phoneNumbers
#   * relations
#   * residences
#   * sipAddresses
#   * urls
#   * userDefined
# @param [String] fields
#   Selector specifying which fields to include in a partial response.
# @param [String] quota_user
#   Available to use for quota purposes for server-side applications. Can be any
#   arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
#   Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::PeopleV1::Person] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::PeopleV1::Person]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
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 400 error with an error with reason
`"failedPrecondition"` 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.
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 400 error with an error with reason ` " failedPrecondition " ` 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 .
def update_person_contact(resource_name, person_object = nil, update_person_fields: nil, fields: nil, quota_user: nil, options: nil, &block)
          command = make_simple_command(:patch, 'v1/{+resourceName}:updateContact', options)
          command.request_representation = Google::Apis::PeopleV1::Person::Representation
          command.request_object = person_object
          command.response_representation = Google::Apis::PeopleV1::Person::Representation
          command.response_class = Google::Apis::PeopleV1::Person
          command.params['resourceName'] = resource_name unless resource_name.nil?
          command.query['updatePersonFields'] = update_person_fields unless update_person_fields.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          execute_or_queue_command(command, &block)
        end
def update_person_contact ( resource_name , person_object = nil , update_person_fields : nil , fields : nil , quota_user : nil , options : nil , & block ) command = make_simple_command ( :patch , 'v1/{+resourceName}:updateContact' , options ) command . request_representation = Google :: Apis :: PeopleV1 :: Person :: Representation command . request_object = person_object command . response_representation = Google :: Apis :: PeopleV1 :: Person :: Representation command . response_class = Google :: Apis :: PeopleV1 :: Person command . params [ 'resourceName' ] = resource_name unless resource_name . nil? command . query [ 'updatePersonFields' ] = update_person_fields unless update_person_fields . nil? command . query [ 'fields' ] = fields unless fields . nil? command . query [ 'quotaUser' ] = quota_user unless quota_user . nil? execute_or_queue_command ( command , & block ) end
Update contact data for an existing contact person.
Update contact data for an existing contact person .
None
Google::Apis::PeopleV1::Person
[Google::Apis::ServerError] An error occurred on the server and the request can be retried
[ Google :: Apis :: ServerError ] An error occurred on the server and the request can be retried
[Google::Apis::ClientError] The request is invalid and should not be retried without modification
[ Google :: Apis :: ClientError ] The request is invalid and should not be retried without modification
[Google::Apis::AuthorizationError] Authorization is required
[ Google :: Apis :: AuthorizationError ] Authorization is required
resource_name
person_object
update_person_fields
fields
quota_user
options
block
options Request-specific options
options Request - specific options
]
Result & error if block supplied
Result & error if block supplied
result
parsed result object
parsed result object
err
error object if request failed
error object if request failed