people

package
v0.207.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: BSD-3-Clause Imports: 16 Imported by: 66

Documentation

Overview

Package people provides access to the People API.

For product documentation, see: https://developers.google.com/people/

Library status

These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/people/v1"
...
ctx := context.Background()
peopleService, err := people.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use google.golang.org/api/option.WithScopes:

peopleService, err := people.NewService(ctx, option.WithScopes(people.UserinfoProfileScope))

To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:

peopleService, err := people.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
peopleService, err := people.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See google.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (
	// See, edit, download, and permanently delete your contacts
	ContactsScope = "https://www.googleapis.com/auth/contacts"

	// See and download contact info automatically saved in your "Other contacts"
	ContactsOtherReadonlyScope = "https://www.googleapis.com/auth/contacts.other.readonly"

	// See and download your contacts
	ContactsReadonlyScope = "https://www.googleapis.com/auth/contacts.readonly"

	// See and download your organization's GSuite directory
	DirectoryReadonlyScope = "https://www.googleapis.com/auth/directory.readonly"

	// View your street addresses
	UserAddressesReadScope = "https://www.googleapis.com/auth/user.addresses.read"

	// See and download your exact date of birth
	UserBirthdayReadScope = "https://www.googleapis.com/auth/user.birthday.read"

	// See and download all of your Google Account email addresses
	UserEmailsReadScope = "https://www.googleapis.com/auth/user.emails.read"

	// See your gender
	UserGenderReadScope = "https://www.googleapis.com/auth/user.gender.read"

	// See your education, work history and org info
	UserOrganizationReadScope = "https://www.googleapis.com/auth/user.organization.read"

	// See and download your personal phone numbers
	UserPhonenumbersReadScope = "https://www.googleapis.com/auth/user.phonenumbers.read"

	// See your primary Google Account email address
	UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"

	// See your personal info, including any personal info you've made publicly
	// available
	UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	// City: The city of the address.
	City string `json:"city,omitempty"`
	// Country: The country of the address.
	Country string `json:"country,omitempty"`
	// CountryCode: The ISO 3166-1 alpha-2
	// (http://www.iso.org/iso/country_codes.htm) country code of the address.
	CountryCode string `json:"countryCode,omitempty"`
	// ExtendedAddress: The extended address of the address; for example, the
	// apartment number.
	ExtendedAddress string `json:"extendedAddress,omitempty"`
	// FormattedType: Output only. The type of the address translated and formatted
	// in the viewer's account locale or the `Accept-Language` HTTP header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// FormattedValue: The unstructured value of the address. If this is not set by
	// the user it will be automatically constructed from structured values.
	FormattedValue string `json:"formattedValue,omitempty"`
	// Metadata: Metadata about the address.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// PoBox: The P.O. box of the address.
	PoBox string `json:"poBox,omitempty"`
	// PostalCode: The postal code of the address.
	PostalCode string `json:"postalCode,omitempty"`
	// Region: The region of the address; for example, the state or province.
	Region string `json:"region,omitempty"`
	// StreetAddress: The street address.
	StreetAddress string `json:"streetAddress,omitempty"`
	// Type: The type of the address. The type can be custom or one of these
	// predefined values: * `home` * `work` * `other`
	Type string `json:"type,omitempty"`
	// ForceSendFields is a list of field names (e.g. "City") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "City") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Address: A person's physical address. May be a P.O. box or street address. All fields are optional.

func (Address) MarshalJSON

func (s Address) MarshalJSON() ([]byte, error)

type AgeRangeType

type AgeRangeType struct {
	// AgeRange: The age range.
	//
	// Possible values:
	//   "AGE_RANGE_UNSPECIFIED" - Unspecified.
	//   "LESS_THAN_EIGHTEEN" - Younger than eighteen.
	//   "EIGHTEEN_TO_TWENTY" - Between eighteen and twenty.
	//   "TWENTY_ONE_OR_OLDER" - Twenty-one and older.
	AgeRange string `json:"ageRange,omitempty"`
	// Metadata: Metadata about the age range.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AgeRange") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AgeRange") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

AgeRangeType: A person's age range.

func (AgeRangeType) MarshalJSON

func (s AgeRangeType) MarshalJSON() ([]byte, error)

type BatchCreateContactsRequest added in v0.43.0

type BatchCreateContactsRequest struct {
	// Contacts: Required. The contact to create. Allows up to 200 contacts in a
	// single request.
	Contacts []*ContactToCreate `json:"contacts,omitempty"`
	// ReadMask: Required. A field mask to restrict which fields on each person are
	// returned in the response. Multiple fields can be specified by separating
	// them with commas. If read mask is left empty, the post-mutate-get is skipped
	// and no data will be returned in the response. Valid values are: * addresses
	// * ageRanges * biographies * birthdays * calendarUrls * clientData *
	// coverPhotos * emailAddresses * events * externalIds * genders * imClients *
	// interests * locales * locations * memberships * metadata * miscKeywords *
	// names * nicknames * occupations * organizations * phoneNumbers * photos *
	// relations * sipAddresses * skills * urls * userDefined
	ReadMask string `json:"readMask,omitempty"`
	// Sources: Optional. A mask of what source types to return in the post mutate
	// read. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if
	// not set.
	//
	// Possible values:
	//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
	//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
	// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
	//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
	//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
	//   "READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.
	Sources []string `json:"sources,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Contacts") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Contacts") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BatchCreateContactsRequest: A request to create a batch of contacts.

func (BatchCreateContactsRequest) MarshalJSON added in v0.43.0

func (s BatchCreateContactsRequest) MarshalJSON() ([]byte, error)

type BatchCreateContactsResponse added in v0.43.0

type BatchCreateContactsResponse struct {
	// CreatedPeople: The contacts that were created, unless the request
	// `read_mask` is empty.
	CreatedPeople []*PersonResponse `json:"createdPeople,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "CreatedPeople") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CreatedPeople") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BatchCreateContactsResponse: If not successful, returns BatchCreateContactsErrorDetails which contains a list of errors for each invalid contact. The response to a request to create a batch of contacts.

func (BatchCreateContactsResponse) MarshalJSON added in v0.43.0

func (s BatchCreateContactsResponse) MarshalJSON() ([]byte, error)

type BatchDeleteContactsRequest added in v0.43.0

type BatchDeleteContactsRequest struct {
	// ResourceNames: Required. The resource names of the contact to delete. It's
	// repeatable. Allows up to 500 resource names in a single request.
	ResourceNames []string `json:"resourceNames,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ResourceNames") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ResourceNames") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BatchDeleteContactsRequest: A request to delete a batch of existing contacts.

func (BatchDeleteContactsRequest) MarshalJSON added in v0.43.0

func (s BatchDeleteContactsRequest) MarshalJSON() ([]byte, error)

type BatchGetContactGroupsResponse

type BatchGetContactGroupsResponse struct {
	// Responses: The list of responses for each requested contact group resource.
	Responses []*ContactGroupResponse `json:"responses,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Responses") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Responses") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BatchGetContactGroupsResponse: The response to a batch get contact groups request.

func (BatchGetContactGroupsResponse) MarshalJSON

func (s BatchGetContactGroupsResponse) MarshalJSON() ([]byte, error)

type BatchUpdateContactsRequest added in v0.43.0

type BatchUpdateContactsRequest struct {
	// Contacts: Required. A map of resource names to the person data to be
	// updated. Allows up to 200 contacts in a single request.
	Contacts map[string]Person `json:"contacts,omitempty"`
	// ReadMask: Required. A field mask to restrict which fields on each person are
	// returned. Multiple fields can be specified by separating them with commas.
	// If read mask is left empty, the post-mutate-get is skipped and no data will
	// be returned in the response. Valid values are: * addresses * ageRanges *
	// biographies * birthdays * calendarUrls * clientData * coverPhotos *
	// emailAddresses * events * externalIds * genders * imClients * interests *
	// locales * locations * memberships * metadata * miscKeywords * names *
	// nicknames * occupations * organizations * phoneNumbers * photos * relations
	// * sipAddresses * skills * urls * userDefined
	ReadMask string `json:"readMask,omitempty"`
	// Sources: Optional. A mask of what source types to return. Defaults to
	// READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
	//
	// Possible values:
	//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
	//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
	// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
	//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
	//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
	//   "READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.
	Sources []string `json:"sources,omitempty"`
	// UpdateMask: Required. A field mask to restrict which fields on the person
	// are updated. Multiple fields can be specified by separating them with
	// commas. All specified fields will be replaced, or cleared if left empty for
	// each person. Valid values are: * addresses * biographies * birthdays *
	// calendarUrls * clientData * emailAddresses * events * externalIds * genders
	// * imClients * interests * locales * locations * memberships * miscKeywords *
	// names * nicknames * occupations * organizations * phoneNumbers * relations *
	// sipAddresses * urls * userDefined
	UpdateMask string `json:"updateMask,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Contacts") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Contacts") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BatchUpdateContactsRequest: A request to update a batch of contacts.

func (BatchUpdateContactsRequest) MarshalJSON added in v0.43.0

func (s BatchUpdateContactsRequest) MarshalJSON() ([]byte, error)

type BatchUpdateContactsResponse added in v0.43.0

type BatchUpdateContactsResponse struct {
	// UpdateResult: A map of resource names to the contacts that were updated,
	// unless the request `read_mask` is empty.
	UpdateResult map[string]PersonResponse `json:"updateResult,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "UpdateResult") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "UpdateResult") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BatchUpdateContactsResponse: If not successful, returns BatchUpdateContactsErrorDetails, a list of errors corresponding to each contact. The response to a request to update a batch of contacts.

func (BatchUpdateContactsResponse) MarshalJSON added in v0.43.0

func (s BatchUpdateContactsResponse) MarshalJSON() ([]byte, error)

type Biography

type Biography struct {
	// ContentType: The content type of the biography.
	//
	// Possible values:
	//   "CONTENT_TYPE_UNSPECIFIED" - Unspecified.
	//   "TEXT_PLAIN" - Plain text.
	//   "TEXT_HTML" - HTML text.
	ContentType string `json:"contentType,omitempty"`
	// Metadata: Metadata about the biography.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The short biography.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ContentType") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ContentType") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Biography: A person's short biography.

func (Biography) MarshalJSON

func (s Biography) MarshalJSON() ([]byte, error)

type Birthday

type Birthday struct {
	// Date: The structured date of the birthday.
	Date *Date `json:"date,omitempty"`
	// Metadata: Metadata about the birthday.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Text: Prefer to use the `date` field if set. A free-form string representing
	// the user's birthday. This value is not validated.
	Text string `json:"text,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Date") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Date") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Birthday: A person's birthday. At least one of the `date` and `text` fields are specified. The `date` and `text` fields typically represent the same date, but are not guaranteed to. Clients should always set the `date` field when mutating birthdays.

func (Birthday) MarshalJSON

func (s Birthday) MarshalJSON() ([]byte, error)

type BraggingRights

type BraggingRights struct {
	// Metadata: Metadata about the bragging rights.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The bragging rights; for example, `climbed mount everest`.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Metadata") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Metadata") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BraggingRights: **DEPRECATED**: No data will be returned A person's bragging rights.

func (BraggingRights) MarshalJSON

func (s BraggingRights) MarshalJSON() ([]byte, error)

type CalendarUrl added in v0.30.0

type CalendarUrl struct {
	// FormattedType: Output only. The type of the calendar URL translated and
	// formatted in the viewer's account locale or the `Accept-Language` HTTP
	// header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// Metadata: Metadata about the calendar URL.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Type: The type of the calendar URL. The type can be custom or one of these
	// predefined values: * `home` * `freeBusy` * `work`
	Type string `json:"type,omitempty"`
	// Url: The calendar URL.
	Url string `json:"url,omitempty"`
	// ForceSendFields is a list of field names (e.g. "FormattedType") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FormattedType") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CalendarUrl: A person's calendar URL.

func (CalendarUrl) MarshalJSON added in v0.30.0

func (s CalendarUrl) MarshalJSON() ([]byte, error)

type ClientData added in v0.31.0

type ClientData struct {
	// Key: The client specified key of the client data.
	Key string `json:"key,omitempty"`
	// Metadata: Metadata about the client data.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The client specified value of the client data.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Key") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ClientData: Arbitrary client data that is populated by clients. Duplicate keys and values are allowed.

func (ClientData) MarshalJSON added in v0.31.0

func (s ClientData) MarshalJSON() ([]byte, error)

type ContactGroup

type ContactGroup struct {
	// ClientData: The group's client data.
	ClientData []*GroupClientData `json:"clientData,omitempty"`
	// Etag: The HTTP entity tag (https://en.wikipedia.org/wiki/HTTP_ETag) of the
	// resource. Used for web cache validation.
	Etag string `json:"etag,omitempty"`
	// FormattedName: Output only. The name translated and formatted in the
	// viewer's account locale or the `Accept-Language` HTTP header locale for
	// system groups names. Group names set by the owner are the same as name.
	FormattedName string `json:"formattedName,omitempty"`
	// GroupType: Output only. The contact group type.
	//
	// Possible values:
	//   "GROUP_TYPE_UNSPECIFIED" - Unspecified.
	//   "USER_CONTACT_GROUP" - User defined contact group.
	//   "SYSTEM_CONTACT_GROUP" - System defined contact group.
	GroupType string `json:"groupType,omitempty"`
	// MemberCount: Output only. The total number of contacts in the group
	// irrespective of max members in specified in the request.
	MemberCount int64 `json:"memberCount,omitempty"`
	// MemberResourceNames: Output only. The list of contact person resource names
	// that are members of the contact group. The field is only populated for GET
	// requests and will only return as many members as `maxMembers` in the get
	// request.
	MemberResourceNames []string `json:"memberResourceNames,omitempty"`
	// Metadata: Output only. Metadata about the contact group.
	Metadata *ContactGroupMetadata `json:"metadata,omitempty"`
	// Name: The contact group name set by the group owner or a system provided
	// name for system groups. For `contactGroups.create`
	// (/people/api/rest/v1/contactGroups/create) or `contactGroups.update`
	// (/people/api/rest/v1/contactGroups/update) the name must be unique to the
	// users contact groups. Attempting to create a group with a duplicate name
	// will return a HTTP 409 error.
	Name string `json:"name,omitempty"`
	// ResourceName: The resource name for the contact group, assigned by the
	// server. An ASCII string, in the form of `contactGroups/{contact_group_id}`.
	ResourceName string `json:"resourceName,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "ClientData") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ClientData") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ContactGroup: A contact group.

func (ContactGroup) MarshalJSON

func (s ContactGroup) MarshalJSON() ([]byte, error)

type ContactGroupMembership

type ContactGroupMembership struct {
	// ContactGroupId: Output only. The contact group ID for the contact group
	// membership.
	ContactGroupId string `json:"contactGroupId,omitempty"`
	// ContactGroupResourceName: The resource name for the contact group, assigned
	// by the server. An ASCII string, in the form of
	// `contactGroups/{contact_group_id}`. Only contact_group_resource_name can be
	// used for modifying memberships. Any contact group membership can be removed,
	// but only user group or "myContacts" or "starred" system groups memberships
	// can be added. A contact must always have at least one contact group
	// membership.
	ContactGroupResourceName string `json:"contactGroupResourceName,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ContactGroupId") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ContactGroupId") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ContactGroupMembership: A Google contact group membership.

func (ContactGroupMembership) MarshalJSON

func (s ContactGroupMembership) MarshalJSON() ([]byte, error)

type ContactGroupMetadata

type ContactGroupMetadata struct {
	// Deleted: Output only. True if the contact group resource has been deleted.
	// Populated only for `ListContactGroups`
	// (/people/api/rest/v1/contactgroups/list) requests that include a sync token.
	Deleted bool `json:"deleted,omitempty"`
	// UpdateTime: Output only. The time the group was last updated.
	UpdateTime string `json:"updateTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Deleted") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Deleted") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ContactGroupMetadata: The metadata about a contact group.

func (ContactGroupMetadata) MarshalJSON

func (s ContactGroupMetadata) MarshalJSON() ([]byte, error)

type ContactGroupResponse

type ContactGroupResponse struct {
	// ContactGroup: The contact group.
	ContactGroup *ContactGroup `json:"contactGroup,omitempty"`
	// RequestedResourceName: The original requested resource name.
	RequestedResourceName string `json:"requestedResourceName,omitempty"`
	// Status: The status of the response.
	Status *Status `json:"status,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ContactGroup") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ContactGroup") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ContactGroupResponse: The response for a specific contact group.

func (ContactGroupResponse) MarshalJSON

func (s ContactGroupResponse) MarshalJSON() ([]byte, error)

type ContactGroupsBatchGetCall

type ContactGroupsBatchGetCall struct {
	// contains filtered or unexported fields
}

func (*ContactGroupsBatchGetCall) Context

Context sets the context to be used in this call's Do method.

func (*ContactGroupsBatchGetCall) Do

Do executes the "people.contactGroups.batchGet" call. Any non-2xx status code is an error. Response headers are in either *BatchGetContactGroupsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ContactGroupsBatchGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ContactGroupsBatchGetCall) GroupFields added in v0.37.0

func (c *ContactGroupsBatchGetCall) GroupFields(groupFields string) *ContactGroupsBatchGetCall

GroupFields sets the optional parameter "groupFields": A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * memberCount * metadata * name

func (*ContactGroupsBatchGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*ContactGroupsBatchGetCall) IfNoneMatch

func (c *ContactGroupsBatchGetCall) IfNoneMatch(entityTag string) *ContactGroupsBatchGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*ContactGroupsBatchGetCall) MaxMembers

func (c *ContactGroupsBatchGetCall) MaxMembers(maxMembers int64) *ContactGroupsBatchGetCall

MaxMembers sets the optional parameter "maxMembers": Specifies the maximum number of members to return for each group. Defaults to 0 if not set, which will return zero members.

func (*ContactGroupsBatchGetCall) ResourceNames

func (c *ContactGroupsBatchGetCall) ResourceNames(resourceNames ...string) *ContactGroupsBatchGetCall

ResourceNames sets the optional parameter "resourceNames": Required. The resource names of the contact groups to get. There is a maximum of 200 resource names.

type ContactGroupsCreateCall

type ContactGroupsCreateCall struct {
	// contains filtered or unexported fields
}

func (*ContactGroupsCreateCall) Context

Context sets the context to be used in this call's Do method.

func (*ContactGroupsCreateCall) Do

Do executes the "people.contactGroups.create" call. Any non-2xx status code is an error. Response headers are in either *ContactGroup.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ContactGroupsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ContactGroupsCreateCall) Header

func (c *ContactGroupsCreateCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type ContactGroupsDeleteCall

type ContactGroupsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*ContactGroupsDeleteCall) Context

Context sets the context to be used in this call's Do method.

func (*ContactGroupsDeleteCall) DeleteContacts

func (c *ContactGroupsDeleteCall) DeleteContacts(deleteContacts bool) *ContactGroupsDeleteCall

DeleteContacts sets the optional parameter "deleteContacts": Set to true to also delete the contacts in the specified group.

func (*ContactGroupsDeleteCall) Do

Do executes the "people.contactGroups.delete" call. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ContactGroupsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ContactGroupsDeleteCall) Header

func (c *ContactGroupsDeleteCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type ContactGroupsGetCall

type ContactGroupsGetCall struct {
	// contains filtered or unexported fields
}

func (*ContactGroupsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*ContactGroupsGetCall) Do

Do executes the "people.contactGroups.get" call. Any non-2xx status code is an error. Response headers are in either *ContactGroup.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ContactGroupsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ContactGroupsGetCall) GroupFields added in v0.37.0

func (c *ContactGroupsGetCall) GroupFields(groupFields string) *ContactGroupsGetCall

GroupFields sets the optional parameter "groupFields": A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * memberCount * metadata * name

func (*ContactGroupsGetCall) Header

func (c *ContactGroupsGetCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*ContactGroupsGetCall) IfNoneMatch

func (c *ContactGroupsGetCall) IfNoneMatch(entityTag string) *ContactGroupsGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*ContactGroupsGetCall) MaxMembers

func (c *ContactGroupsGetCall) MaxMembers(maxMembers int64) *ContactGroupsGetCall

MaxMembers sets the optional parameter "maxMembers": Specifies the maximum number of members to return. Defaults to 0 if not set, which will return zero members.

type ContactGroupsListCall

type ContactGroupsListCall struct {
	// contains filtered or unexported fields
}

func (*ContactGroupsListCall) Context

Context sets the context to be used in this call's Do method.

func (*ContactGroupsListCall) Do

Do executes the "people.contactGroups.list" call. Any non-2xx status code is an error. Response headers are in either *ListContactGroupsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ContactGroupsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ContactGroupsListCall) GroupFields added in v0.37.0

func (c *ContactGroupsListCall) GroupFields(groupFields string) *ContactGroupsListCall

GroupFields sets the optional parameter "groupFields": A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * memberCount * metadata * name

func (*ContactGroupsListCall) Header

func (c *ContactGroupsListCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*ContactGroupsListCall) IfNoneMatch

func (c *ContactGroupsListCall) IfNoneMatch(entityTag string) *ContactGroupsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*ContactGroupsListCall) PageSize

func (c *ContactGroupsListCall) PageSize(pageSize int64) *ContactGroupsListCall

PageSize sets the optional parameter "pageSize": The maximum number of resources to return. Valid values are between 1 and 1000, inclusive. Defaults to 30 if not set or set to 0.

func (*ContactGroupsListCall) PageToken

func (c *ContactGroupsListCall) PageToken(pageToken string) *ContactGroupsListCall

PageToken sets the optional parameter "pageToken": The next_page_token value returned from a previous call to ListContactGroups (/people/api/rest/v1/contactgroups/list). Requests the next page of resources.

func (*ContactGroupsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*ContactGroupsListCall) SyncToken

func (c *ContactGroupsListCall) SyncToken(syncToken string) *ContactGroupsListCall

SyncToken sets the optional parameter "syncToken": A sync token, returned by a previous call to `contactgroups.list`. Only resources changed since the sync token was created will be returned.

type ContactGroupsMembersModifyCall

type ContactGroupsMembersModifyCall struct {
	// contains filtered or unexported fields
}

func (*ContactGroupsMembersModifyCall) Context

Context sets the context to be used in this call's Do method.

func (*ContactGroupsMembersModifyCall) Do

Do executes the "people.contactGroups.members.modify" call. Any non-2xx status code is an error. Response headers are in either *ModifyContactGroupMembersResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ContactGroupsMembersModifyCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ContactGroupsMembersModifyCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type ContactGroupsMembersService

type ContactGroupsMembersService struct {
	// contains filtered or unexported fields
}

func NewContactGroupsMembersService

func NewContactGroupsMembersService(s *Service) *ContactGroupsMembersService

func (*ContactGroupsMembersService) Modify

func (r *ContactGroupsMembersService) Modify(resourceName string, modifycontactgroupmembersrequest *ModifyContactGroupMembersRequest) *ContactGroupsMembersModifyCall

Modify: Modify the members of a contact group owned by the authenticated user. The only system contact groups that can have members added are `contactGroups/myContacts` and `contactGroups/starred`. Other system contact groups are deprecated and can only have contacts removed.

- resourceName: The resource name of the contact group to modify.

type ContactGroupsService

type ContactGroupsService struct {
	Members *ContactGroupsMembersService
	// contains filtered or unexported fields
}

func NewContactGroupsService

func NewContactGroupsService(s *Service) *ContactGroupsService

func (*ContactGroupsService) BatchGet

BatchGet: Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.

func (*ContactGroupsService) Create

func (r *ContactGroupsService) Create(createcontactgrouprequest *CreateContactGroupRequest) *ContactGroupsCreateCall

Create: Create a new contact group owned by the authenticated user. Created contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

func (*ContactGroupsService) Delete

func (r *ContactGroupsService) Delete(resourceName string) *ContactGroupsDeleteCall

Delete: Delete an existing contact group owned by the authenticated user by specifying a contact group resource name. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

- resourceName: The resource name of the contact group to delete.

func (*ContactGroupsService) Get

func (r *ContactGroupsService) Get(resourceName string) *ContactGroupsGetCall

Get: Get a specific contact group owned by the authenticated user by specifying a contact group resource name.

- resourceName: The resource name of the contact group to get.

func (*ContactGroupsService) List

List: List all contact groups owned by the authenticated user. Members of the contact groups are not populated.

func (*ContactGroupsService) Update

func (r *ContactGroupsService) Update(resourceName string, updatecontactgrouprequest *UpdateContactGroupRequest) *ContactGroupsUpdateCall

Update: Update the name of an existing contact group owned by the authenticated user. Updated contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

  • resourceName: The resource name for the contact group, assigned by the server. An ASCII string, in the form of `contactGroups/{contact_group_id}`.

type ContactGroupsUpdateCall

type ContactGroupsUpdateCall struct {
	// contains filtered or unexported fields
}

func (*ContactGroupsUpdateCall) Context

Context sets the context to be used in this call's Do method.

func (*ContactGroupsUpdateCall) Do

Do executes the "people.contactGroups.update" call. Any non-2xx status code is an error. Response headers are in either *ContactGroup.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ContactGroupsUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ContactGroupsUpdateCall) Header

func (c *ContactGroupsUpdateCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type ContactToCreate added in v0.43.0

type ContactToCreate struct {
	// ContactPerson: Required. The person data to populate a newly created source.
	ContactPerson *Person `json:"contactPerson,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ContactPerson") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ContactPerson") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ContactToCreate: A wrapper that contains the person data to populate a newly created source.

func (ContactToCreate) MarshalJSON added in v0.43.0

func (s ContactToCreate) MarshalJSON() ([]byte, error)

type CopyOtherContactToMyContactsGroupRequest added in v0.27.0

type CopyOtherContactToMyContactsGroupRequest struct {
	// CopyMask: Required. A field mask to restrict which fields are copied into
	// the new contact. Valid values are: * emailAddresses * names * phoneNumbers
	CopyMask string `json:"copyMask,omitempty"`
	// ReadMask: Optional. A field mask to restrict which fields on the person are
	// returned. Multiple fields can be specified by separating them with commas.
	// Defaults to the copy mask with metadata and membership fields if not set.
	// Valid values are: * addresses * ageRanges * biographies * birthdays *
	// calendarUrls * clientData * coverPhotos * emailAddresses * events *
	// externalIds * genders * imClients * interests * locales * locations *
	// memberships * metadata * miscKeywords * names * nicknames * occupations *
	// organizations * phoneNumbers * photos * relations * sipAddresses * skills *
	// urls * userDefined
	ReadMask string `json:"readMask,omitempty"`
	// Sources: Optional. A mask of what source types to return. Defaults to
	// READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
	//
	// Possible values:
	//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
	//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
	// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
	//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
	//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
	//   "READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.
	Sources []string `json:"sources,omitempty"`
	// ForceSendFields is a list of field names (e.g. "CopyMask") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CopyMask") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CopyOtherContactToMyContactsGroupRequest: A request to copy an "Other contact" to my contacts group.

func (CopyOtherContactToMyContactsGroupRequest) MarshalJSON added in v0.27.0

type CoverPhoto

type CoverPhoto struct {
	// Default: True if the cover photo is the default cover photo; false if the
	// cover photo is a user-provided cover photo.
	Default bool `json:"default,omitempty"`
	// Metadata: Metadata about the cover photo.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Url: The URL of the cover photo.
	Url string `json:"url,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Default") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Default") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CoverPhoto: A person's cover photo. A large image shown on the person's profile page that represents who they are or what they care about.

func (CoverPhoto) MarshalJSON

func (s CoverPhoto) MarshalJSON() ([]byte, error)

type CreateContactGroupRequest

type CreateContactGroupRequest struct {
	// ContactGroup: Required. The contact group to create.
	ContactGroup *ContactGroup `json:"contactGroup,omitempty"`
	// ReadGroupFields: Optional. A field mask to restrict which fields on the
	// group are returned. Defaults to `metadata`, `groupType`, and `name` if not
	// set or set to empty. Valid fields are: * clientData * groupType * metadata *
	// name
	ReadGroupFields string `json:"readGroupFields,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ContactGroup") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ContactGroup") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CreateContactGroupRequest: A request to create a new contact group.

func (CreateContactGroupRequest) MarshalJSON

func (s CreateContactGroupRequest) MarshalJSON() ([]byte, error)

type Date

type Date struct {
	// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
	// or 0 to specify a year by itself or a year and month where the day isn't
	// significant.
	Day int64 `json:"day,omitempty"`
	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
	// a month and day.
	Month int64 `json:"month,omitempty"`
	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
	// without a year.
	Year int64 `json:"year,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Day") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Date: Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp

func (Date) MarshalJSON

func (s Date) MarshalJSON() ([]byte, error)

type DeleteContactPhotoResponse added in v0.8.0

type DeleteContactPhotoResponse struct {
	// Person: The updated person, if person_fields is set in the
	// DeleteContactPhotoRequest; otherwise this will be unset.
	Person *Person `json:"person,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Person") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Person") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

DeleteContactPhotoResponse: The response for deleting a contact's photo.

func (DeleteContactPhotoResponse) MarshalJSON added in v0.8.0

func (s DeleteContactPhotoResponse) MarshalJSON() ([]byte, error)

type DomainMembership

type DomainMembership struct {
	// InViewerDomain: True if the person is in the viewer's Google Workspace
	// domain.
	InViewerDomain bool `json:"inViewerDomain,omitempty"`
	// ForceSendFields is a list of field names (e.g. "InViewerDomain") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "InViewerDomain") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

DomainMembership: A Google Workspace Domain membership.

func (DomainMembership) MarshalJSON

func (s DomainMembership) MarshalJSON() ([]byte, error)

type EmailAddress

type EmailAddress struct {
	// DisplayName: The display name of the email.
	DisplayName string `json:"displayName,omitempty"`
	// FormattedType: Output only. The type of the email address translated and
	// formatted in the viewer's account locale or the `Accept-Language` HTTP
	// header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// Metadata: Metadata about the email address.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Type: The type of the email address. The type can be custom or one of these
	// predefined values: * `home` * `work` * `other`
	Type string `json:"type,omitempty"`
	// Value: The email address.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "DisplayName") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "DisplayName") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

EmailAddress: A person's email address.

func (EmailAddress) MarshalJSON

func (s EmailAddress) MarshalJSON() ([]byte, error)

type Empty

type Empty struct {
	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
}

Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

type Event

type Event struct {
	// Date: The date of the event.
	Date *Date `json:"date,omitempty"`
	// FormattedType: Output only. The type of the event translated and formatted
	// in the viewer's account locale or the `Accept-Language` HTTP header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// Metadata: Metadata about the event.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Type: The type of the event. The type can be custom or one of these
	// predefined values: * `anniversary` * `other`
	Type string `json:"type,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Date") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Date") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Event: An event related to the person.

func (Event) MarshalJSON

func (s Event) MarshalJSON() ([]byte, error)

type ExternalId added in v0.30.0

type ExternalId struct {
	// FormattedType: Output only. The type of the event translated and formatted
	// in the viewer's account locale or the `Accept-Language` HTTP header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// Metadata: Metadata about the external ID.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Type: The type of the external ID. The type can be custom or one of these
	// predefined values: * `account` * `customer` * `loginId` * `network` *
	// `organization`
	Type string `json:"type,omitempty"`
	// Value: The value of the external ID.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "FormattedType") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FormattedType") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ExternalId: An identifier from an external entity related to the person.

func (ExternalId) MarshalJSON added in v0.30.0

func (s ExternalId) MarshalJSON() ([]byte, error)

type FieldMetadata

type FieldMetadata struct {
	// Primary: Output only. True if the field is the primary field for all sources
	// in the person. Each person will have at most one field with `primary` set to
	// true.
	Primary bool `json:"primary,omitempty"`
	// Source: The source of the field.
	Source *Source `json:"source,omitempty"`
	// SourcePrimary: True if the field is the primary field for the source. Each
	// source must have at most one field with `source_primary` set to true.
	SourcePrimary bool `json:"sourcePrimary,omitempty"`
	// Verified: Output only. True if the field is verified; false if the field is
	// unverified. A verified field is typically a name, email address, phone
	// number, or website that has been confirmed to be owned by the person.
	Verified bool `json:"verified,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Primary") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Primary") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

FieldMetadata: Metadata about a field.

func (FieldMetadata) MarshalJSON

func (s FieldMetadata) MarshalJSON() ([]byte, error)

type FileAs added in v0.27.0

type FileAs struct {
	// Metadata: Metadata about the file-as.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The file-as value
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Metadata") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Metadata") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

FileAs: The name that should be used to sort the person in a list.

func (FileAs) MarshalJSON added in v0.27.0

func (s FileAs) MarshalJSON() ([]byte, error)

type Gender

type Gender struct {
	// AddressMeAs: Free form text field for pronouns that should be used to
	// address the person. Common values are: * `he`/`him` * `she`/`her` *
	// `they`/`them`
	AddressMeAs string `json:"addressMeAs,omitempty"`
	// FormattedValue: Output only. The value of the gender translated and
	// formatted in the viewer's account locale or the `Accept-Language` HTTP
	// header locale. Unspecified or custom value are not localized.
	FormattedValue string `json:"formattedValue,omitempty"`
	// Metadata: Metadata about the gender.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The gender for the person. The gender can be custom or one of these
	// predefined values: * `male` * `female` * `unspecified`
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AddressMeAs") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AddressMeAs") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Gender: A person's gender.

func (Gender) MarshalJSON

func (s Gender) MarshalJSON() ([]byte, error)

type GetPeopleResponse

type GetPeopleResponse struct {
	// Responses: The response for each requested resource name.
	Responses []*PersonResponse `json:"responses,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Responses") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Responses") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

GetPeopleResponse: The response to a get request for a list of people by resource name.

func (GetPeopleResponse) MarshalJSON

func (s GetPeopleResponse) MarshalJSON() ([]byte, error)

type GroupClientData added in v0.37.0

type GroupClientData struct {
	// Key: The client specified key of the client data.
	Key string `json:"key,omitempty"`
	// Value: The client specified value of the client data.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Key") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

GroupClientData: Arbitrary client data that is populated by clients. Duplicate keys and values are allowed.

func (GroupClientData) MarshalJSON added in v0.37.0

func (s GroupClientData) MarshalJSON() ([]byte, error)

type ImClient

type ImClient struct {
	// FormattedProtocol: Output only. The protocol of the IM client formatted in
	// the viewer's account locale or the `Accept-Language` HTTP header locale.
	FormattedProtocol string `json:"formattedProtocol,omitempty"`
	// FormattedType: Output only. The type of the IM client translated and
	// formatted in the viewer's account locale or the `Accept-Language` HTTP
	// header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// Metadata: Metadata about the IM client.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Protocol: The protocol of the IM client. The protocol can be custom or one
	// of these predefined values: * `aim` * `msn` * `yahoo` * `skype` * `qq` *
	// `googleTalk` * `icq` * `jabber` * `netMeeting`
	Protocol string `json:"protocol,omitempty"`
	// Type: The type of the IM client. The type can be custom or one of these
	// predefined values: * `home` * `work` * `other`
	Type string `json:"type,omitempty"`
	// Username: The user name used in the IM client.
	Username string `json:"username,omitempty"`
	// ForceSendFields is a list of field names (e.g. "FormattedProtocol") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FormattedProtocol") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ImClient: A person's instant messaging client.

func (ImClient) MarshalJSON

func (s ImClient) MarshalJSON() ([]byte, error)

type Interest

type Interest struct {
	// Metadata: Metadata about the interest.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The interest; for example, `stargazing`.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Metadata") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Metadata") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Interest: One of the person's interests.

func (Interest) MarshalJSON

func (s Interest) MarshalJSON() ([]byte, error)

type ListConnectionsResponse

type ListConnectionsResponse struct {
	// Connections: The list of people that the requestor is connected to.
	Connections []*Person `json:"connections,omitempty"`
	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
	// next page. If this field is omitted, there are no subsequent pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// NextSyncToken: A token, which can be sent as `sync_token` to retrieve
	// changes since the last request. Request must set `request_sync_token` to
	// return the sync token. When the response is paginated, only the last page
	// will contain `nextSyncToken`.
	NextSyncToken string `json:"nextSyncToken,omitempty"`
	// TotalItems: The total number of items in the list without pagination.
	TotalItems int64 `json:"totalItems,omitempty"`
	// TotalPeople: **DEPRECATED** (Please use totalItems) The total number of
	// people in the list without pagination.
	TotalPeople int64 `json:"totalPeople,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Connections") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Connections") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListConnectionsResponse: The response to a request for the authenticated user's connections.

func (ListConnectionsResponse) MarshalJSON

func (s ListConnectionsResponse) MarshalJSON() ([]byte, error)

type ListContactGroupsResponse

type ListContactGroupsResponse struct {
	// ContactGroups: The list of contact groups. Members of the contact groups are
	// not populated.
	ContactGroups []*ContactGroup `json:"contactGroups,omitempty"`
	// NextPageToken: The token that can be used to retrieve the next page of
	// results.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// NextSyncToken: The token that can be used to retrieve changes since the last
	// request.
	NextSyncToken string `json:"nextSyncToken,omitempty"`
	// TotalItems: The total number of items in the list without pagination.
	TotalItems int64 `json:"totalItems,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "ContactGroups") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ContactGroups") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListContactGroupsResponse: The response to a list contact groups request.

func (ListContactGroupsResponse) MarshalJSON

func (s ListContactGroupsResponse) MarshalJSON() ([]byte, error)

type ListDirectoryPeopleResponse added in v0.27.0

type ListDirectoryPeopleResponse struct {
	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
	// next page. If this field is omitted, there are no subsequent pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// NextSyncToken: A token, which can be sent as `sync_token` to retrieve
	// changes since the last request. Request must set `request_sync_token` to
	// return the sync token.
	NextSyncToken string `json:"nextSyncToken,omitempty"`
	// People: The list of people in the domain directory.
	People []*Person `json:"people,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListDirectoryPeopleResponse: The response to a request for the authenticated user's domain directory.

func (ListDirectoryPeopleResponse) MarshalJSON added in v0.27.0

func (s ListDirectoryPeopleResponse) MarshalJSON() ([]byte, error)

type ListOtherContactsResponse added in v0.27.0

type ListOtherContactsResponse struct {
	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
	// next page. If this field is omitted, there are no subsequent pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// NextSyncToken: A token, which can be sent as `sync_token` to retrieve
	// changes since the last request. Request must set `request_sync_token` to
	// return the sync token.
	NextSyncToken string `json:"nextSyncToken,omitempty"`
	// OtherContacts: The list of "Other contacts" returned as Person resources.
	// "Other contacts" support a limited subset of fields. See
	// ListOtherContactsRequest.request_mask for more detailed information.
	OtherContacts []*Person `json:"otherContacts,omitempty"`
	// TotalSize: The total number of other contacts in the list without
	// pagination.
	TotalSize int64 `json:"totalSize,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListOtherContactsResponse: The response to a request for the authenticated user's "Other contacts".

func (ListOtherContactsResponse) MarshalJSON added in v0.27.0

func (s ListOtherContactsResponse) MarshalJSON() ([]byte, error)

type Locale

type Locale struct {
	// Metadata: Metadata about the locale.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The well-formed IETF BCP 47 (https://tools.ietf.org/html/bcp47)
	// language tag representing the locale.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Metadata") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Metadata") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Locale: A person's locale preference.

func (Locale) MarshalJSON

func (s Locale) MarshalJSON() ([]byte, error)

type Location added in v0.31.0

type Location struct {
	// BuildingId: The building identifier.
	BuildingId string `json:"buildingId,omitempty"`
	// Current: Whether the location is the current location.
	Current bool `json:"current,omitempty"`
	// DeskCode: The individual desk location.
	DeskCode string `json:"deskCode,omitempty"`
	// Floor: The floor name or number.
	Floor string `json:"floor,omitempty"`
	// FloorSection: The floor section in `floor_name`.
	FloorSection string `json:"floorSection,omitempty"`
	// Metadata: Metadata about the location.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Type: The type of the location. The type can be custom or one of these
	// predefined values: * `desk` * `grewUp`
	Type string `json:"type,omitempty"`
	// Value: The free-form value of the location.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "BuildingId") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "BuildingId") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Location: A person's location.

func (Location) MarshalJSON added in v0.31.0

func (s Location) MarshalJSON() ([]byte, error)

type Membership

type Membership struct {
	// ContactGroupMembership: The contact group membership.
	ContactGroupMembership *ContactGroupMembership `json:"contactGroupMembership,omitempty"`
	// DomainMembership: Output only. The domain membership.
	DomainMembership *DomainMembership `json:"domainMembership,omitempty"`
	// Metadata: Metadata about the membership.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ContactGroupMembership") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ContactGroupMembership") to
	// include in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Membership: A person's membership in a group. Only contact group memberships can be modified.

func (Membership) MarshalJSON

func (s Membership) MarshalJSON() ([]byte, error)

type MiscKeyword added in v0.30.0

type MiscKeyword struct {
	// FormattedType: Output only. The type of the miscellaneous keyword translated
	// and formatted in the viewer's account locale or the `Accept-Language` HTTP
	// header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// Metadata: Metadata about the miscellaneous keyword.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Type: The miscellaneous keyword type.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Unspecified.
	//   "OUTLOOK_BILLING_INFORMATION" - Outlook field for billing information.
	//   "OUTLOOK_DIRECTORY_SERVER" - Outlook field for directory server.
	//   "OUTLOOK_KEYWORD" - Outlook field for keyword.
	//   "OUTLOOK_MILEAGE" - Outlook field for mileage.
	//   "OUTLOOK_PRIORITY" - Outlook field for priority.
	//   "OUTLOOK_SENSITIVITY" - Outlook field for sensitivity.
	//   "OUTLOOK_SUBJECT" - Outlook field for subject.
	//   "OUTLOOK_USER" - Outlook field for user.
	//   "HOME" - Home.
	//   "WORK" - Work.
	//   "OTHER" - Other.
	Type string `json:"type,omitempty"`
	// Value: The value of the miscellaneous keyword.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "FormattedType") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FormattedType") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

MiscKeyword: A person's miscellaneous keyword.

func (MiscKeyword) MarshalJSON added in v0.30.0

func (s MiscKeyword) MarshalJSON() ([]byte, error)

type ModifyContactGroupMembersRequest

type ModifyContactGroupMembersRequest struct {
	// ResourceNamesToAdd: Optional. The resource names of the contact people to
	// add in the form of `people/{person_id}`. The total number of resource names
	// in `resource_names_to_add` and `resource_names_to_remove` must be less than
	// or equal to 1000.
	ResourceNamesToAdd []string `json:"resourceNamesToAdd,omitempty"`
	// ResourceNamesToRemove: Optional. The resource names of the contact people to
	// remove in the form of `people/{person_id}`. The total number of resource
	// names in `resource_names_to_add` and `resource_names_to_remove` must be less
	// than or equal to 1000.
	ResourceNamesToRemove []string `json:"resourceNamesToRemove,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ResourceNamesToAdd") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ResourceNamesToAdd") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ModifyContactGroupMembersRequest: A request to modify an existing contact group's members. Contacts can be removed from any group but they can only be added to a user group or "myContacts" or "starred" system groups.

func (ModifyContactGroupMembersRequest) MarshalJSON

func (s ModifyContactGroupMembersRequest) MarshalJSON() ([]byte, error)

type ModifyContactGroupMembersResponse

type ModifyContactGroupMembersResponse struct {
	// CanNotRemoveLastContactGroupResourceNames: The contact people resource names
	// that cannot be removed from their last contact group.
	CanNotRemoveLastContactGroupResourceNames []string `json:"canNotRemoveLastContactGroupResourceNames,omitempty"`
	// NotFoundResourceNames: The contact people resource names that were not
	// found.
	NotFoundResourceNames []string `json:"notFoundResourceNames,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g.
	// "CanNotRemoveLastContactGroupResourceNames") to unconditionally include in
	// API requests. By default, fields with empty or default values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g.
	// "CanNotRemoveLastContactGroupResourceNames") to include in API requests with
	// the JSON null value. By default, fields with empty values are omitted from
	// API requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields
	// for more details.
	NullFields []string `json:"-"`
}

ModifyContactGroupMembersResponse: The response to a modify contact group members request.

func (ModifyContactGroupMembersResponse) MarshalJSON

func (s ModifyContactGroupMembersResponse) MarshalJSON() ([]byte, error)

type Name

type Name struct {
	// DisplayName: Output only. The display name formatted according to the locale
	// specified by the viewer's account or the `Accept-Language` HTTP header.
	DisplayName string `json:"displayName,omitempty"`
	// DisplayNameLastFirst: Output only. The display name with the last name first
	// formatted according to the locale specified by the viewer's account or the
	// `Accept-Language` HTTP header.
	DisplayNameLastFirst string `json:"displayNameLastFirst,omitempty"`
	// FamilyName: The family name.
	FamilyName string `json:"familyName,omitempty"`
	// GivenName: The given name.
	GivenName string `json:"givenName,omitempty"`
	// HonorificPrefix: The honorific prefixes, such as `Mrs.` or `Dr.`
	HonorificPrefix string `json:"honorificPrefix,omitempty"`
	// HonorificSuffix: The honorific suffixes, such as `Jr.`
	HonorificSuffix string `json:"honorificSuffix,omitempty"`
	// Metadata: Metadata about the name.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// MiddleName: The middle name(s).
	MiddleName string `json:"middleName,omitempty"`
	// PhoneticFamilyName: The family name spelled as it sounds.
	PhoneticFamilyName string `json:"phoneticFamilyName,omitempty"`
	// PhoneticFullName: The full name spelled as it sounds.
	PhoneticFullName string `json:"phoneticFullName,omitempty"`
	// PhoneticGivenName: The given name spelled as it sounds.
	PhoneticGivenName string `json:"phoneticGivenName,omitempty"`
	// PhoneticHonorificPrefix: The honorific prefixes spelled as they sound.
	PhoneticHonorificPrefix string `json:"phoneticHonorificPrefix,omitempty"`
	// PhoneticHonorificSuffix: The honorific suffixes spelled as they sound.
	PhoneticHonorificSuffix string `json:"phoneticHonorificSuffix,omitempty"`
	// PhoneticMiddleName: The middle name(s) spelled as they sound.
	PhoneticMiddleName string `json:"phoneticMiddleName,omitempty"`
	// UnstructuredName: The free form name value.
	UnstructuredName string `json:"unstructuredName,omitempty"`
	// ForceSendFields is a list of field names (e.g. "DisplayName") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "DisplayName") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Name: A person's name. If the name is a mononym, the family name is empty.

func (Name) MarshalJSON

func (s Name) MarshalJSON() ([]byte, error)

type Nickname

type Nickname struct {
	// Metadata: Metadata about the nickname.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Type: The type of the nickname.
	//
	// Possible values:
	//   "DEFAULT" - Generic nickname.
	//   "MAIDEN_NAME" - Maiden name or birth family name. Used when the person's
	// family name has changed as a result of marriage.
	//   "INITIALS" - Initials.
	//   "GPLUS" - Google+ profile nickname.
	//   "OTHER_NAME" - A professional affiliation or other name; for example, `Dr.
	// Smith.`
	//   "ALTERNATE_NAME" - Alternate name person is known by.
	//   "SHORT_NAME" - A shorter version of the person's name.
	Type string `json:"type,omitempty"`
	// Value: The nickname.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Metadata") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Metadata") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Nickname: A person's nickname.

func (Nickname) MarshalJSON

func (s Nickname) MarshalJSON() ([]byte, error)

type Occupation

type Occupation struct {
	// Metadata: Metadata about the occupation.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The occupation; for example, `carpenter`.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Metadata") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Metadata") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Occupation: A person's occupation.

func (Occupation) MarshalJSON

func (s Occupation) MarshalJSON() ([]byte, error)

type Organization

type Organization struct {
	// CostCenter: The person's cost center at the organization.
	CostCenter string `json:"costCenter,omitempty"`
	// Current: True if the organization is the person's current organization;
	// false if the organization is a past organization.
	Current bool `json:"current,omitempty"`
	// Department: The person's department at the organization.
	Department string `json:"department,omitempty"`
	// Domain: The domain name associated with the organization; for example,
	// `google.com`.
	Domain string `json:"domain,omitempty"`
	// EndDate: The end date when the person left the organization.
	EndDate *Date `json:"endDate,omitempty"`
	// FormattedType: Output only. The type of the organization translated and
	// formatted in the viewer's account locale or the `Accept-Language` HTTP
	// header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// FullTimeEquivalentMillipercent: The person's full-time equivalent
	// millipercent within the organization (100000 = 100%).
	FullTimeEquivalentMillipercent int64 `json:"fullTimeEquivalentMillipercent,omitempty"`
	// JobDescription: The person's job description at the organization.
	JobDescription string `json:"jobDescription,omitempty"`
	// Location: The location of the organization office the person works at.
	Location string `json:"location,omitempty"`
	// Metadata: Metadata about the organization.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Name: The name of the organization.
	Name string `json:"name,omitempty"`
	// PhoneticName: The phonetic name of the organization.
	PhoneticName string `json:"phoneticName,omitempty"`
	// StartDate: The start date when the person joined the organization.
	StartDate *Date `json:"startDate,omitempty"`
	// Symbol: The symbol associated with the organization; for example, a stock
	// ticker symbol, abbreviation, or acronym.
	Symbol string `json:"symbol,omitempty"`
	// Title: The person's job title at the organization.
	Title string `json:"title,omitempty"`
	// Type: The type of the organization. The type can be custom or one of these
	// predefined values: * `work` * `school`
	Type string `json:"type,omitempty"`
	// ForceSendFields is a list of field names (e.g. "CostCenter") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CostCenter") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Organization: A person's past or current organization. Overlapping date ranges are permitted.

func (Organization) MarshalJSON

func (s Organization) MarshalJSON() ([]byte, error)

type OtherContactsCopyOtherContactToMyContactsGroupCall added in v0.27.0

type OtherContactsCopyOtherContactToMyContactsGroupCall struct {
	// contains filtered or unexported fields
}

func (*OtherContactsCopyOtherContactToMyContactsGroupCall) Context added in v0.27.0

Context sets the context to be used in this call's Do method.

func (*OtherContactsCopyOtherContactToMyContactsGroupCall) Do added in v0.27.0

Do executes the "people.otherContacts.copyOtherContactToMyContactsGroup" call. Any non-2xx status code is an error. Response headers are in either *Person.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OtherContactsCopyOtherContactToMyContactsGroupCall) Fields added in v0.27.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OtherContactsCopyOtherContactToMyContactsGroupCall) Header added in v0.27.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

type OtherContactsListCall added in v0.27.0

type OtherContactsListCall struct {
	// contains filtered or unexported fields
}

func (*OtherContactsListCall) Context added in v0.27.0

Context sets the context to be used in this call's Do method.

func (*OtherContactsListCall) Do added in v0.27.0

Do executes the "people.otherContacts.list" call. Any non-2xx status code is an error. Response headers are in either *ListOtherContactsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OtherContactsListCall) Fields added in v0.27.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OtherContactsListCall) Header added in v0.27.0

func (c *OtherContactsListCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OtherContactsListCall) IfNoneMatch added in v0.27.0

func (c *OtherContactsListCall) IfNoneMatch(entityTag string) *OtherContactsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*OtherContactsListCall) PageSize added in v0.27.0

func (c *OtherContactsListCall) PageSize(pageSize int64) *OtherContactsListCall

PageSize sets the optional parameter "pageSize": The number of "Other contacts" to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.

func (*OtherContactsListCall) PageToken added in v0.27.0

func (c *OtherContactsListCall) PageToken(pageToken string) *OtherContactsListCall

PageToken sets the optional parameter "pageToken": A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `otherContacts.list` must match the first call that provided the page token.

func (*OtherContactsListCall) Pages added in v0.27.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*OtherContactsListCall) ReadMask added in v0.27.0

func (c *OtherContactsListCall) ReadMask(readMask string) *OtherContactsListCall

ReadMask sets the optional parameter "readMask": Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. What values are valid depend on what ReadSourceType is used. If READ_SOURCE_TYPE_CONTACT is used, valid values are: * emailAddresses * metadata * names * phoneNumbers * photos If READ_SOURCE_TYPE_PROFILE is used, valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

func (*OtherContactsListCall) RequestSyncToken added in v0.27.0

func (c *OtherContactsListCall) RequestSyncToken(requestSyncToken bool) *OtherContactsListCall

RequestSyncToken sets the optional parameter "requestSyncToken": Whether the response should return `next_sync_token` on the last page of results. It can be used to get incremental changes since the last request by setting it on the request `sync_token`. More details about sync behavior at `otherContacts.list`.

func (*OtherContactsListCall) Sources added in v0.51.0

func (c *OtherContactsListCall) Sources(sources ...string) *OtherContactsListCall

Sources sets the optional parameter "sources": A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set. Possible values for this field are: * READ_SOURCE_TYPE_CONTACT * READ_SOURCE_TYPE_CONTACT,READ_SOURCE_TYPE_PROFILE Specifying READ_SOURCE_TYPE_PROFILE without specifying READ_SOURCE_TYPE_CONTACT is not permitted.

Possible values:

"READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,

SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.

"READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
"READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
"READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.

func (*OtherContactsListCall) SyncToken added in v0.27.0

func (c *OtherContactsListCall) SyncToken(syncToken string) *OtherContactsListCall

SyncToken sets the optional parameter "syncToken": A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syncing, all other parameters provided to `otherContacts.list` must match the first call that provided the sync token. More details about sync behavior at `otherContacts.list`.

type OtherContactsSearchCall added in v0.41.0

type OtherContactsSearchCall struct {
	// contains filtered or unexported fields
}

func (*OtherContactsSearchCall) Context added in v0.41.0

Context sets the context to be used in this call's Do method.

func (*OtherContactsSearchCall) Do added in v0.41.0

Do executes the "people.otherContacts.search" call. Any non-2xx status code is an error. Response headers are in either *SearchResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OtherContactsSearchCall) Fields added in v0.41.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OtherContactsSearchCall) Header added in v0.41.0

func (c *OtherContactsSearchCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OtherContactsSearchCall) IfNoneMatch added in v0.41.0

func (c *OtherContactsSearchCall) IfNoneMatch(entityTag string) *OtherContactsSearchCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*OtherContactsSearchCall) PageSize added in v0.41.0

func (c *OtherContactsSearchCall) PageSize(pageSize int64) *OtherContactsSearchCall

PageSize sets the optional parameter "pageSize": The number of results to return. Defaults to 10 if field is not set, or set to 0. Values greater than 30 will be capped to 30.

func (*OtherContactsSearchCall) Query added in v0.41.0

Query sets the optional parameter "query": Required. The plain-text query for the request. The query is used to match prefix phrases of the fields on a person. For example, a person with name "foo name" matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but not "oo n".

func (*OtherContactsSearchCall) ReadMask added in v0.41.0

ReadMask sets the optional parameter "readMask": Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * emailAddresses * metadata * names * phoneNumbers

type OtherContactsService added in v0.27.0

type OtherContactsService struct {
	// contains filtered or unexported fields
}

func NewOtherContactsService added in v0.27.0

func NewOtherContactsService(s *Service) *OtherContactsService

func (*OtherContactsService) CopyOtherContactToMyContactsGroup added in v0.27.0

func (r *OtherContactsService) CopyOtherContactToMyContactsGroup(resourceName string, copyothercontacttomycontactsgrouprequest *CopyOtherContactToMyContactsGroupRequest) *OtherContactsCopyOtherContactToMyContactsGroupCall

CopyOtherContactToMyContactsGroup: Copies an "Other contact" to a new contact in the user's "myContacts" group Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

- resourceName: The resource name of the "Other contact" to copy.

func (*OtherContactsService) List added in v0.27.0

List: List all "Other contacts", that is contacts that are not in a contact group. "Other contacts" are typically auto created contacts from interactions. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an google.rpc.ErrorInfo (https://cloud.google.com/apis/design/errors#error_info) with reason "EXPIRED_SYNC_TOKEN". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at List the user's other contacts that have changed (/people/v1/other-contacts#list_the_users_other_contacts_that_have_changed).

func (*OtherContactsService) Search added in v0.41.0

Search: Provides a list of contacts in the authenticated user's other contacts that matches the search query. The query matches on a contact's `names`, `emailAddresses`, and `phoneNumbers` fields that are from the OTHER_CONTACT source. **IMPORTANT**: Before searching, clients should send a warmup request with an empty query to update the cache. See https://developers.google.com/people/v1/other-contacts#search_the_users_other_contacts

type PeopleBatchCreateContactsCall added in v0.43.0

type PeopleBatchCreateContactsCall struct {
	// contains filtered or unexported fields
}

func (*PeopleBatchCreateContactsCall) Context added in v0.43.0

Context sets the context to be used in this call's Do method.

func (*PeopleBatchCreateContactsCall) Do added in v0.43.0

Do executes the "people.people.batchCreateContacts" call. Any non-2xx status code is an error. Response headers are in either *BatchCreateContactsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleBatchCreateContactsCall) Fields added in v0.43.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleBatchCreateContactsCall) Header added in v0.43.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

type PeopleBatchDeleteContactsCall added in v0.43.0

type PeopleBatchDeleteContactsCall struct {
	// contains filtered or unexported fields
}

func (*PeopleBatchDeleteContactsCall) Context added in v0.43.0

Context sets the context to be used in this call's Do method.

func (*PeopleBatchDeleteContactsCall) Do added in v0.43.0

Do executes the "people.people.batchDeleteContacts" call. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleBatchDeleteContactsCall) Fields added in v0.43.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleBatchDeleteContactsCall) Header added in v0.43.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

type PeopleBatchUpdateContactsCall added in v0.43.0

type PeopleBatchUpdateContactsCall struct {
	// contains filtered or unexported fields
}

func (*PeopleBatchUpdateContactsCall) Context added in v0.43.0

Context sets the context to be used in this call's Do method.

func (*PeopleBatchUpdateContactsCall) Do added in v0.43.0

Do executes the "people.people.batchUpdateContacts" call. Any non-2xx status code is an error. Response headers are in either *BatchUpdateContactsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleBatchUpdateContactsCall) Fields added in v0.43.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleBatchUpdateContactsCall) Header added in v0.43.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

type PeopleConnectionsListCall

type PeopleConnectionsListCall struct {
	// contains filtered or unexported fields
}

func (*PeopleConnectionsListCall) Context

Context sets the context to be used in this call's Do method.

func (*PeopleConnectionsListCall) Do

Do executes the "people.people.connections.list" call. Any non-2xx status code is an error. Response headers are in either *ListConnectionsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleConnectionsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleConnectionsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*PeopleConnectionsListCall) IfNoneMatch

func (c *PeopleConnectionsListCall) IfNoneMatch(entityTag string) *PeopleConnectionsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*PeopleConnectionsListCall) PageSize

PageSize sets the optional parameter "pageSize": The number of connections to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.

func (*PeopleConnectionsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `people.connections.list` must match the first call that provided the page token.

func (*PeopleConnectionsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*PeopleConnectionsListCall) PersonFields

func (c *PeopleConnectionsListCall) PersonFields(personFields string) *PeopleConnectionsListCall

PersonFields sets the optional parameter "personFields": Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

func (*PeopleConnectionsListCall) RequestMaskIncludeField

func (c *PeopleConnectionsListCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleConnectionsListCall

RequestMaskIncludeField sets the optional parameter "requestMask.includeField": Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.photos`.

func (*PeopleConnectionsListCall) RequestSyncToken

func (c *PeopleConnectionsListCall) RequestSyncToken(requestSyncToken bool) *PeopleConnectionsListCall

RequestSyncToken sets the optional parameter "requestSyncToken": Whether the response should return `next_sync_token` on the last page of results. It can be used to get incremental changes since the last request by setting it on the request `sync_token`. More details about sync behavior at `people.connections.list`.

func (*PeopleConnectionsListCall) SortOrder

SortOrder sets the optional parameter "sortOrder": The order in which the connections should be sorted. Defaults to `LAST_MODIFIED_ASCENDING`.

Possible values:

"LAST_MODIFIED_ASCENDING" - Sort people by when they were changed; older

entries first.

"LAST_MODIFIED_DESCENDING" - Sort people by when they were changed; newer

entries first.

"FIRST_NAME_ASCENDING" - Sort people by first name.
"LAST_NAME_ASCENDING" - Sort people by last name.

func (*PeopleConnectionsListCall) Sources added in v0.27.0

Sources sets the optional parameter "sources": A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.

Possible values:

"READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,

SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.

"READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
"READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
"READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.

func (*PeopleConnectionsListCall) SyncToken

SyncToken sets the optional parameter "syncToken": A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syncing, all other parameters provided to `people.connections.list` must match the first call that provided the sync token. More details about sync behavior at `people.connections.list`.

type PeopleConnectionsService

type PeopleConnectionsService struct {
	// contains filtered or unexported fields
}

func NewPeopleConnectionsService

func NewPeopleConnectionsService(s *Service) *PeopleConnectionsService

func (*PeopleConnectionsService) List

List: Provides a list of the authenticated user's contacts. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an google.rpc.ErrorInfo (https://cloud.google.com/apis/design/errors#error_info) with reason "EXPIRED_SYNC_TOKEN". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at List the user's contacts that have changed (/people/v1/contacts#list_the_users_contacts_that_have_changed).

  • resourceName: The resource name to return connections for. Only `people/me` is valid.

type PeopleCreateContactCall

type PeopleCreateContactCall struct {
	// contains filtered or unexported fields
}

func (*PeopleCreateContactCall) Context

Context sets the context to be used in this call's Do method.

func (*PeopleCreateContactCall) Do

Do executes the "people.people.createContact" call. Any non-2xx status code is an error. Response headers are in either *Person.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleCreateContactCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleCreateContactCall) Header

func (c *PeopleCreateContactCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*PeopleCreateContactCall) PersonFields added in v0.27.0

func (c *PeopleCreateContactCall) PersonFields(personFields string) *PeopleCreateContactCall

PersonFields sets the optional parameter "personFields": Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Defaults to all fields if not set. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

func (*PeopleCreateContactCall) Sources added in v0.27.0

func (c *PeopleCreateContactCall) Sources(sources ...string) *PeopleCreateContactCall

Sources sets the optional parameter "sources": A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.

Possible values:

"READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,

SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.

"READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
"READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
"READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.

type PeopleDeleteContactCall

type PeopleDeleteContactCall struct {
	// contains filtered or unexported fields
}

func (*PeopleDeleteContactCall) Context

Context sets the context to be used in this call's Do method.

func (*PeopleDeleteContactCall) Do

Do executes the "people.people.deleteContact" call. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleDeleteContactCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleDeleteContactCall) Header

func (c *PeopleDeleteContactCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type PeopleDeleteContactPhotoCall added in v0.8.0

type PeopleDeleteContactPhotoCall struct {
	// contains filtered or unexported fields
}

func (*PeopleDeleteContactPhotoCall) Context added in v0.8.0

Context sets the context to be used in this call's Do method.

func (*PeopleDeleteContactPhotoCall) Do added in v0.8.0

Do executes the "people.people.deleteContactPhoto" call. Any non-2xx status code is an error. Response headers are in either *DeleteContactPhotoResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleDeleteContactPhotoCall) Fields added in v0.8.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleDeleteContactPhotoCall) Header added in v0.8.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*PeopleDeleteContactPhotoCall) PersonFields added in v0.8.0

func (c *PeopleDeleteContactPhotoCall) PersonFields(personFields string) *PeopleDeleteContactPhotoCall

PersonFields sets the optional parameter "personFields": A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Defaults to empty if not set, which will skip the post mutate get. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

func (*PeopleDeleteContactPhotoCall) Sources added in v0.27.0

Sources sets the optional parameter "sources": A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.

Possible values:

"READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,

SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.

"READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
"READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
"READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.

type PeopleGetBatchGetCall

type PeopleGetBatchGetCall struct {
	// contains filtered or unexported fields
}

func (*PeopleGetBatchGetCall) Context

Context sets the context to be used in this call's Do method.

func (*PeopleGetBatchGetCall) Do

Do executes the "people.people.getBatchGet" call. Any non-2xx status code is an error. Response headers are in either *GetPeopleResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleGetBatchGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleGetBatchGetCall) Header

func (c *PeopleGetBatchGetCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*PeopleGetBatchGetCall) IfNoneMatch

func (c *PeopleGetBatchGetCall) IfNoneMatch(entityTag string) *PeopleGetBatchGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*PeopleGetBatchGetCall) PersonFields

func (c *PeopleGetBatchGetCall) PersonFields(personFields string) *PeopleGetBatchGetCall

PersonFields sets the optional parameter "personFields": Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

func (*PeopleGetBatchGetCall) RequestMaskIncludeField

func (c *PeopleGetBatchGetCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleGetBatchGetCall

RequestMaskIncludeField sets the optional parameter "requestMask.includeField": Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.photos`.

func (*PeopleGetBatchGetCall) ResourceNames

func (c *PeopleGetBatchGetCall) ResourceNames(resourceNames ...string) *PeopleGetBatchGetCall

ResourceNames sets the optional parameter "resourceNames": Required. The resource names of the people to provide information about. It's repeatable. The URL query parameter should be resourceNames=<name1>&resourceNames=<name2>&... - To get information about the authenticated user, specify `people/me`. - To get information about a google account, specify `people/{account_id}`. - To get information about a contact, specify the resource name that identifies the contact as returned by `people.connections.list`. There is a maximum of 200 resource names.

func (*PeopleGetBatchGetCall) Sources added in v0.27.0

func (c *PeopleGetBatchGetCall) Sources(sources ...string) *PeopleGetBatchGetCall

Sources sets the optional parameter "sources": A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.

Possible values:

"READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,

SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.

"READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
"READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
"READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.

type PeopleGetCall

type PeopleGetCall struct {
	// contains filtered or unexported fields
}

func (*PeopleGetCall) Context

func (c *PeopleGetCall) Context(ctx context.Context) *PeopleGetCall

Context sets the context to be used in this call's Do method.

func (*PeopleGetCall) Do

func (c *PeopleGetCall) Do(opts ...googleapi.CallOption) (*Person, error)

Do executes the "people.people.get" call. Any non-2xx status code is an error. Response headers are in either *Person.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleGetCall) Fields

func (c *PeopleGetCall) Fields(s ...googleapi.Field) *PeopleGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleGetCall) Header

func (c *PeopleGetCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*PeopleGetCall) IfNoneMatch

func (c *PeopleGetCall) IfNoneMatch(entityTag string) *PeopleGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*PeopleGetCall) PersonFields

func (c *PeopleGetCall) PersonFields(personFields string) *PeopleGetCall

PersonFields sets the optional parameter "personFields": Required. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

func (*PeopleGetCall) RequestMaskIncludeField

func (c *PeopleGetCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleGetCall

RequestMaskIncludeField sets the optional parameter "requestMask.includeField": Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.photos`.

func (*PeopleGetCall) Sources added in v0.27.0

func (c *PeopleGetCall) Sources(sources ...string) *PeopleGetCall

Sources sets the optional parameter "sources": A mask of what source types to return. Defaults to READ_SOURCE_TYPE_PROFILE and READ_SOURCE_TYPE_CONTACT if not set.

Possible values:

"READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,

SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.

"READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
"READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
"READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.

type PeopleListDirectoryPeopleCall added in v0.27.0

type PeopleListDirectoryPeopleCall struct {
	// contains filtered or unexported fields
}

func (*PeopleListDirectoryPeopleCall) Context added in v0.27.0

Context sets the context to be used in this call's Do method.

func (*PeopleListDirectoryPeopleCall) Do added in v0.27.0

Do executes the "people.people.listDirectoryPeople" call. Any non-2xx status code is an error. Response headers are in either *ListDirectoryPeopleResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleListDirectoryPeopleCall) Fields added in v0.27.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleListDirectoryPeopleCall) Header added in v0.27.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*PeopleListDirectoryPeopleCall) IfNoneMatch added in v0.27.0

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*PeopleListDirectoryPeopleCall) MergeSources added in v0.27.0

func (c *PeopleListDirectoryPeopleCall) MergeSources(mergeSources ...string) *PeopleListDirectoryPeopleCall

MergeSources sets the optional parameter "mergeSources": Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers.

Possible values:

"DIRECTORY_MERGE_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"DIRECTORY_MERGE_SOURCE_TYPE_CONTACT" - User owned contact.

func (*PeopleListDirectoryPeopleCall) PageSize added in v0.27.0

PageSize sets the optional parameter "pageSize": The number of people to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.

func (*PeopleListDirectoryPeopleCall) PageToken added in v0.27.0

PageToken sets the optional parameter "pageToken": A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `people.listDirectoryPeople` must match the first call that provided the page token.

func (*PeopleListDirectoryPeopleCall) Pages added in v0.27.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*PeopleListDirectoryPeopleCall) ReadMask added in v0.27.0

ReadMask sets the optional parameter "readMask": Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

func (*PeopleListDirectoryPeopleCall) RequestSyncToken added in v0.27.0

func (c *PeopleListDirectoryPeopleCall) RequestSyncToken(requestSyncToken bool) *PeopleListDirectoryPeopleCall

RequestSyncToken sets the optional parameter "requestSyncToken": Whether the response should return `next_sync_token`. It can be used to get incremental changes since the last request by setting it on the request `sync_token`. More details about sync behavior at `people.listDirectoryPeople`.

func (*PeopleListDirectoryPeopleCall) Sources added in v0.27.0

Sources sets the optional parameter "sources": Required. Directory sources to return.

Possible values:

"DIRECTORY_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT" - Google Workspace domain shared

contact.

"DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE" - Google Workspace domain profile.

func (*PeopleListDirectoryPeopleCall) SyncToken added in v0.27.0

SyncToken sets the optional parameter "syncToken": A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syncing, all other parameters provided to `people.listDirectoryPeople` must match the first call that provided the sync token. More details about sync behavior at `people.listDirectoryPeople`.

type PeopleSearchContactsCall added in v0.41.0

type PeopleSearchContactsCall struct {
	// contains filtered or unexported fields
}

func (*PeopleSearchContactsCall) Context added in v0.41.0

Context sets the context to be used in this call's Do method.

func (*PeopleSearchContactsCall) Do added in v0.41.0

Do executes the "people.people.searchContacts" call. Any non-2xx status code is an error. Response headers are in either *SearchResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleSearchContactsCall) Fields added in v0.41.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleSearchContactsCall) Header added in v0.41.0

func (c *PeopleSearchContactsCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*PeopleSearchContactsCall) IfNoneMatch added in v0.41.0

func (c *PeopleSearchContactsCall) IfNoneMatch(entityTag string) *PeopleSearchContactsCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*PeopleSearchContactsCall) PageSize added in v0.41.0

PageSize sets the optional parameter "pageSize": The number of results to return. Defaults to 10 if field is not set, or set to 0. Values greater than 30 will be capped to 30.

func (*PeopleSearchContactsCall) Query added in v0.41.0

Query sets the optional parameter "query": Required. The plain-text query for the request. The query is used to match prefix phrases of the fields on a person. For example, a person with name "foo name" matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but not "oo n".

func (*PeopleSearchContactsCall) ReadMask added in v0.41.0

ReadMask sets the optional parameter "readMask": Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

func (*PeopleSearchContactsCall) Sources added in v0.45.0

Sources sets the optional parameter "sources": A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set.

Possible values:

"READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,

SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.

"READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
"READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
"READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.

type PeopleSearchDirectoryPeopleCall added in v0.27.0

type PeopleSearchDirectoryPeopleCall struct {
	// contains filtered or unexported fields
}

func (*PeopleSearchDirectoryPeopleCall) Context added in v0.27.0

Context sets the context to be used in this call's Do method.

func (*PeopleSearchDirectoryPeopleCall) Do added in v0.27.0

Do executes the "people.people.searchDirectoryPeople" call. Any non-2xx status code is an error. Response headers are in either *SearchDirectoryPeopleResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleSearchDirectoryPeopleCall) Fields added in v0.27.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleSearchDirectoryPeopleCall) Header added in v0.27.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*PeopleSearchDirectoryPeopleCall) IfNoneMatch added in v0.27.0

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*PeopleSearchDirectoryPeopleCall) MergeSources added in v0.27.0

MergeSources sets the optional parameter "mergeSources": Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers.

Possible values:

"DIRECTORY_MERGE_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"DIRECTORY_MERGE_SOURCE_TYPE_CONTACT" - User owned contact.

func (*PeopleSearchDirectoryPeopleCall) PageSize added in v0.27.0

PageSize sets the optional parameter "pageSize": The number of people to include in the response. Valid values are between 1 and 500, inclusive. Defaults to 100 if not set or set to 0.

func (*PeopleSearchDirectoryPeopleCall) PageToken added in v0.27.0

PageToken sets the optional parameter "pageToken": A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchDirectoryPeople` must match the first call that provided the page token.

func (*PeopleSearchDirectoryPeopleCall) Pages added in v0.27.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*PeopleSearchDirectoryPeopleCall) Query added in v0.27.0

Query sets the optional parameter "query": Required. Prefix query that matches fields in the person. Does NOT use the read_mask for determining what fields to match.

func (*PeopleSearchDirectoryPeopleCall) ReadMask added in v0.27.0

ReadMask sets the optional parameter "readMask": Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

func (*PeopleSearchDirectoryPeopleCall) Sources added in v0.27.0

Sources sets the optional parameter "sources": Required. Directory sources to return.

Possible values:

"DIRECTORY_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT" - Google Workspace domain shared

contact.

"DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE" - Google Workspace domain profile.

type PeopleService

type PeopleService struct {
	Connections *PeopleConnectionsService
	// contains filtered or unexported fields
}

func NewPeopleService

func NewPeopleService(s *Service) *PeopleService

func (*PeopleService) BatchCreateContacts added in v0.43.0

func (r *PeopleService) BatchCreateContacts(batchcreatecontactsrequest *BatchCreateContactsRequest) *PeopleBatchCreateContactsCall

BatchCreateContacts: Create a batch of new contacts and return the PersonResponses for the newly Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

func (*PeopleService) BatchDeleteContacts added in v0.43.0

func (r *PeopleService) BatchDeleteContacts(batchdeletecontactsrequest *BatchDeleteContactsRequest) *PeopleBatchDeleteContactsCall

BatchDeleteContacts: Delete a batch of contacts. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

func (*PeopleService) BatchUpdateContacts added in v0.43.0

func (r *PeopleService) BatchUpdateContacts(batchupdatecontactsrequest *BatchUpdateContactsRequest) *PeopleBatchUpdateContactsCall

BatchUpdateContacts: Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

func (*PeopleService) CreateContact

func (r *PeopleService) CreateContact(person *Person) *PeopleCreateContactCall

CreateContact: Create a new contact and return the person resource for that contact. The request returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

func (*PeopleService) DeleteContact

func (r *PeopleService) DeleteContact(resourceName string) *PeopleDeleteContactCall

DeleteContact: Delete a contact person. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

- resourceName: The resource name of the contact to delete.

func (*PeopleService) DeleteContactPhoto added in v0.8.0

func (r *PeopleService) DeleteContactPhoto(resourceName string) *PeopleDeleteContactPhotoCall

DeleteContactPhoto: Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid // lock contention.

  • resourceName: The resource name of the contact whose photo will be deleted.

func (*PeopleService) Get

func (r *PeopleService) Get(resourceName string) *PeopleGetCall

Get: Provides information about a person by specifying a resource name. Use `people/me` to indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.

  • resourceName: The resource name of the person to provide information about. - To get information about the authenticated user, specify `people/me`. - To get information about a google account, specify `people/{account_id}`. - To get information about a contact, specify the resource name that identifies the contact as returned by `people.connections.list`.

func (*PeopleService) GetBatchGet

func (r *PeopleService) GetBatchGet() *PeopleGetBatchGetCall

GetBatchGet: Provides information about a list of specific people by specifying a list of requested resource names. Use `people/me` to indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.

func (*PeopleService) ListDirectoryPeople added in v0.27.0

func (r *PeopleService) ListDirectoryPeople() *PeopleListDirectoryPeopleCall

ListDirectoryPeople: Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at List the directory people that have changed (/people/v1/directory#list_the_directory_people_that_have_changed).

func (*PeopleService) SearchContacts added in v0.41.0

func (r *PeopleService) SearchContacts() *PeopleSearchContactsCall

SearchContacts: Provides a list of contacts in the authenticated user's grouped contacts that matches the search query. The query matches on a contact's `names`, `nickNames`, `emailAddresses`, `phoneNumbers`, and `organizations` fields that are from the CONTACT source. **IMPORTANT**: Before searching, clients should send a warmup request with an empty query to update the cache. See https://developers.google.com/people/v1/contacts#search_the_users_contacts

func (*PeopleService) SearchDirectoryPeople added in v0.27.0

func (r *PeopleService) SearchDirectoryPeople() *PeopleSearchDirectoryPeopleCall

SearchDirectoryPeople: Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.

func (*PeopleService) UpdateContact

func (r *PeopleService) UpdateContact(resourceName string, person *Person) *PeopleUpdateContactCall

UpdateContact: Update contact data for an existing contact person. Any non-contact data will not be modified. Any non-contact data in the person to update will be ignored. All fields specified in the `update_mask` will be replaced. The server returns a 400 error if `person.metadata.sources` is not specified for the contact to be updated or if there is no contact source. The server returns a 400 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 merge their updates into the latest person. The server returns a 400 error if `memberships` are being updated and there are no contact group memberships specified on the person. The server returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

  • resourceName: The resource name for the person, assigned by the server. An ASCII string in the form of `people/{person_id}`.

func (*PeopleService) UpdateContactPhoto added in v0.8.0

func (r *PeopleService) UpdateContactPhoto(resourceName string, updatecontactphotorequest *UpdateContactPhotoRequest) *PeopleUpdateContactPhotoCall

UpdateContactPhoto: Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.

- resourceName: Person resource name.

type PeopleUpdateContactCall

type PeopleUpdateContactCall struct {
	// contains filtered or unexported fields
}

func (*PeopleUpdateContactCall) Context

Context sets the context to be used in this call's Do method.

func (*PeopleUpdateContactCall) Do

Do executes the "people.people.updateContact" call. Any non-2xx status code is an error. Response headers are in either *Person.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleUpdateContactCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleUpdateContactCall) Header

func (c *PeopleUpdateContactCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*PeopleUpdateContactCall) PersonFields added in v0.27.0

func (c *PeopleUpdateContactCall) PersonFields(personFields string) *PeopleUpdateContactCall

PersonFields sets the optional parameter "personFields": A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Defaults to all fields if not set. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined

func (*PeopleUpdateContactCall) Sources added in v0.27.0

func (c *PeopleUpdateContactCall) Sources(sources ...string) *PeopleUpdateContactCall

Sources sets the optional parameter "sources": A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.

Possible values:

"READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
"READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,

SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.

"READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
"READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
"READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.

func (*PeopleUpdateContactCall) UpdatePersonFields

func (c *PeopleUpdateContactCall) UpdatePersonFields(updatePersonFields string) *PeopleUpdateContactCall

UpdatePersonFields sets the optional parameter "updatePersonFields": 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 * calendarUrls * clientData * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * relations * sipAddresses * urls * userDefined

type PeopleUpdateContactPhotoCall added in v0.8.0

type PeopleUpdateContactPhotoCall struct {
	// contains filtered or unexported fields
}

func (*PeopleUpdateContactPhotoCall) Context added in v0.8.0

Context sets the context to be used in this call's Do method.

func (*PeopleUpdateContactPhotoCall) Do added in v0.8.0

Do executes the "people.people.updateContactPhoto" call. Any non-2xx status code is an error. Response headers are in either *UpdateContactPhotoResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PeopleUpdateContactPhotoCall) Fields added in v0.8.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*PeopleUpdateContactPhotoCall) Header added in v0.8.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

type Person

type Person struct {
	// Addresses: The person's street addresses.
	Addresses []*Address `json:"addresses,omitempty"`
	// AgeRange: Output only. **DEPRECATED** (Please use `person.ageRanges`
	// instead) The person's age range.
	//
	// Possible values:
	//   "AGE_RANGE_UNSPECIFIED" - Unspecified.
	//   "LESS_THAN_EIGHTEEN" - Younger than eighteen.
	//   "EIGHTEEN_TO_TWENTY" - Between eighteen and twenty.
	//   "TWENTY_ONE_OR_OLDER" - Twenty-one and older.
	AgeRange string `json:"ageRange,omitempty"`
	// AgeRanges: Output only. The person's age ranges.
	AgeRanges []*AgeRangeType `json:"ageRanges,omitempty"`
	// Biographies: The person's biographies. This field is a singleton for contact
	// sources.
	Biographies []*Biography `json:"biographies,omitempty"`
	// Birthdays: The person's birthdays. This field is a singleton for contact
	// sources.
	Birthdays []*Birthday `json:"birthdays,omitempty"`
	// BraggingRights: **DEPRECATED**: No data will be returned The person's
	// bragging rights.
	BraggingRights []*BraggingRights `json:"braggingRights,omitempty"`
	// CalendarUrls: The person's calendar URLs.
	CalendarUrls []*CalendarUrl `json:"calendarUrls,omitempty"`
	// ClientData: The person's client data.
	ClientData []*ClientData `json:"clientData,omitempty"`
	// CoverPhotos: Output only. The person's cover photos.
	CoverPhotos []*CoverPhoto `json:"coverPhotos,omitempty"`
	// EmailAddresses: The person's email addresses. For `people.connections.list`
	// and `otherContacts.list` the number of email addresses is limited to 100. If
	// a Person has more email addresses the entire set can be obtained by calling
	// GetPeople.
	EmailAddresses []*EmailAddress `json:"emailAddresses,omitempty"`
	// Etag: The HTTP entity tag (https://en.wikipedia.org/wiki/HTTP_ETag) of the
	// resource. Used for web cache validation.
	Etag string `json:"etag,omitempty"`
	// Events: The person's events.
	Events []*Event `json:"events,omitempty"`
	// ExternalIds: The person's external IDs.
	ExternalIds []*ExternalId `json:"externalIds,omitempty"`
	// FileAses: The person's file-ases.
	FileAses []*FileAs `json:"fileAses,omitempty"`
	// Genders: The person's genders. This field is a singleton for contact
	// sources.
	Genders []*Gender `json:"genders,omitempty"`
	// ImClients: The person's instant messaging clients.
	ImClients []*ImClient `json:"imClients,omitempty"`
	// Interests: The person's interests.
	Interests []*Interest `json:"interests,omitempty"`
	// Locales: The person's locale preferences.
	Locales []*Locale `json:"locales,omitempty"`
	// Locations: The person's locations.
	Locations []*Location `json:"locations,omitempty"`
	// Memberships: The person's group memberships.
	Memberships []*Membership `json:"memberships,omitempty"`
	// Metadata: Output only. Metadata about the person.
	Metadata *PersonMetadata `json:"metadata,omitempty"`
	// MiscKeywords: The person's miscellaneous keywords.
	MiscKeywords []*MiscKeyword `json:"miscKeywords,omitempty"`
	// Names: The person's names. This field is a singleton for contact sources.
	Names []*Name `json:"names,omitempty"`
	// Nicknames: The person's nicknames.
	Nicknames []*Nickname `json:"nicknames,omitempty"`
	// Occupations: The person's occupations.
	Occupations []*Occupation `json:"occupations,omitempty"`
	// Organizations: The person's past or current organizations.
	Organizations []*Organization `json:"organizations,omitempty"`
	// PhoneNumbers: The person's phone numbers. For `people.connections.list` and
	// `otherContacts.list` the number of phone numbers is limited to 100. If a
	// Person has more phone numbers the entire set can be obtained by calling
	// GetPeople.
	PhoneNumbers []*PhoneNumber `json:"phoneNumbers,omitempty"`
	// Photos: Output only. The person's photos.
	Photos []*Photo `json:"photos,omitempty"`
	// Relations: The person's relations.
	Relations []*Relation `json:"relations,omitempty"`
	// RelationshipInterests: Output only. **DEPRECATED**: No data will be returned
	// The person's relationship interests.
	RelationshipInterests []*RelationshipInterest `json:"relationshipInterests,omitempty"`
	// RelationshipStatuses: Output only. **DEPRECATED**: No data will be returned
	// The person's relationship statuses.
	RelationshipStatuses []*RelationshipStatus `json:"relationshipStatuses,omitempty"`
	// Residences: **DEPRECATED**: (Please use `person.locations` instead) The
	// person's residences.
	Residences []*Residence `json:"residences,omitempty"`
	// ResourceName: The resource name for the person, assigned by the server. An
	// ASCII string in the form of `people/{person_id}`.
	ResourceName string `json:"resourceName,omitempty"`
	// SipAddresses: The person's SIP addresses.
	SipAddresses []*SipAddress `json:"sipAddresses,omitempty"`
	// Skills: The person's skills.
	Skills []*Skill `json:"skills,omitempty"`
	// Taglines: Output only. **DEPRECATED**: No data will be returned The person's
	// taglines.
	Taglines []*Tagline `json:"taglines,omitempty"`
	// Urls: The person's associated URLs.
	Urls []*Url `json:"urls,omitempty"`
	// UserDefined: The person's user defined data.
	UserDefined []*UserDefined `json:"userDefined,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Addresses") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Addresses") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Person: Information about a person merged from various data sources such as the authenticated user's contacts and profile data. Most fields can have multiple items. The items in a field have no guaranteed order, but each non-empty field is guaranteed to have exactly one field with `metadata.primary` set to true.

func (Person) MarshalJSON

func (s Person) MarshalJSON() ([]byte, error)

type PersonMetadata

type PersonMetadata struct {
	// Deleted: Output only. True if the person resource has been deleted.
	// Populated only for `people.connections.list` and `otherContacts.list` sync
	// requests.
	Deleted bool `json:"deleted,omitempty"`
	// LinkedPeopleResourceNames: Output only. Resource names of people linked to
	// this resource.
	LinkedPeopleResourceNames []string `json:"linkedPeopleResourceNames,omitempty"`
	// ObjectType: Output only. **DEPRECATED** (Please use
	// `person.metadata.sources.profileMetadata.objectType` instead) The type of
	// the person object.
	//
	// Possible values:
	//   "OBJECT_TYPE_UNSPECIFIED" - Unspecified.
	//   "PERSON" - Person.
	//   "PAGE" - [Currents Page.](https://workspace.google.com/products/currents/)
	ObjectType string `json:"objectType,omitempty"`
	// PreviousResourceNames: Output only. Any former resource names this person
	// has had. Populated only for `people.connections.list` requests that include
	// a sync token. The resource name may change when adding or removing fields
	// that link a contact and profile such as a verified email, verified phone
	// number, or profile URL.
	PreviousResourceNames []string `json:"previousResourceNames,omitempty"`
	// Sources: The sources of data for the person.
	Sources []*Source `json:"sources,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Deleted") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Deleted") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

PersonMetadata: The metadata about a person.

func (PersonMetadata) MarshalJSON

func (s PersonMetadata) MarshalJSON() ([]byte, error)

type PersonResponse

type PersonResponse struct {
	// HttpStatusCode: **DEPRECATED** (Please use status instead) [HTTP 1.1 status
	// code] (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).
	HttpStatusCode int64 `json:"httpStatusCode,omitempty"`
	// Person: The person.
	Person *Person `json:"person,omitempty"`
	// RequestedResourceName: The original requested resource name. May be
	// different than the resource name on the returned person. The resource name
	// can change when adding or removing fields that link a contact and profile
	// such as a verified email, verified phone number, or a profile URL.
	RequestedResourceName string `json:"requestedResourceName,omitempty"`
	// Status: The status of the response.
	Status *Status `json:"status,omitempty"`
	// ForceSendFields is a list of field names (e.g. "HttpStatusCode") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "HttpStatusCode") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

PersonResponse: The response for a single person

func (PersonResponse) MarshalJSON

func (s PersonResponse) MarshalJSON() ([]byte, error)

type PhoneNumber

type PhoneNumber struct {
	// CanonicalForm: Output only. The canonicalized ITU-T E.164
	// (https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf) form of
	// the phone number.
	CanonicalForm string `json:"canonicalForm,omitempty"`
	// FormattedType: Output only. The type of the phone number translated and
	// formatted in the viewer's account locale or the `Accept-Language` HTTP
	// header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// Metadata: Metadata about the phone number.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Type: The type of the phone number. The type can be custom or one of these
	// predefined values: * `home` * `work` * `mobile` * `homeFax` * `workFax` *
	// `otherFax` * `pager` * `workMobile` * `workPager` * `main` * `googleVoice` *
	// `other`
	Type string `json:"type,omitempty"`
	// Value: The phone number.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "CanonicalForm") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CanonicalForm") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

PhoneNumber: A person's phone number.

func (PhoneNumber) MarshalJSON

func (s PhoneNumber) MarshalJSON() ([]byte, error)

type Photo

type Photo struct {
	// Default: True if the photo is a default photo; false if the photo is a
	// user-provided photo.
	Default bool `json:"default,omitempty"`
	// Metadata: Metadata about the photo.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Url: The URL of the photo. You can change the desired size by appending a
	// query parameter `sz={size}` at the end of the url, where {size} is the size
	// in pixels. Example:
	// https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/AAAAAAAABa8/00gzXvDBYqw/s100/photo.jpg?sz=50
	Url string `json:"url,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Default") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Default") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Photo: A person's photo. A picture shown next to the person's name to help others recognize the person.

func (Photo) MarshalJSON

func (s Photo) MarshalJSON() ([]byte, error)

type ProfileMetadata

type ProfileMetadata struct {
	// ObjectType: Output only. The profile object type.
	//
	// Possible values:
	//   "OBJECT_TYPE_UNSPECIFIED" - Unspecified.
	//   "PERSON" - Person.
	//   "PAGE" - [Currents Page.](https://workspace.google.com/products/currents/)
	ObjectType string `json:"objectType,omitempty"`
	// UserTypes: Output only. The user types.
	//
	// Possible values:
	//   "USER_TYPE_UNKNOWN" - The user type is not known.
	//   "GOOGLE_USER" - The user is a Google user.
	//   "GPLUS_USER" - The user is a Currents user.
	//   "GOOGLE_APPS_USER" - The user is a Google Workspace user.
	UserTypes []string `json:"userTypes,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ObjectType") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ObjectType") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ProfileMetadata: The metadata about a profile.

func (ProfileMetadata) MarshalJSON

func (s ProfileMetadata) MarshalJSON() ([]byte, error)

type Relation

type Relation struct {
	// FormattedType: Output only. The type of the relation translated and
	// formatted in the viewer's account locale or the locale specified in the
	// Accept-Language HTTP header.
	FormattedType string `json:"formattedType,omitempty"`
	// Metadata: Metadata about the relation.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Person: The name of the other person this relation refers to.
	Person string `json:"person,omitempty"`
	// Type: The person's relation to the other person. The type can be custom or
	// one of these predefined values: * `spouse` * `child` * `mother` * `father` *
	// `parent` * `brother` * `sister` * `friend` * `relative` * `domesticPartner`
	// * `manager` * `assistant` * `referredBy` * `partner`
	Type string `json:"type,omitempty"`
	// ForceSendFields is a list of field names (e.g. "FormattedType") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FormattedType") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Relation: A person's relation to another person.

func (Relation) MarshalJSON

func (s Relation) MarshalJSON() ([]byte, error)

type RelationshipInterest

type RelationshipInterest struct {
	// FormattedValue: Output only. The value of the relationship interest
	// translated and formatted in the viewer's account locale or the locale
	// specified in the Accept-Language HTTP header.
	FormattedValue string `json:"formattedValue,omitempty"`
	// Metadata: Metadata about the relationship interest.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The kind of relationship the person is looking for. The value can be
	// custom or one of these predefined values: * `friend` * `date` *
	// `relationship` * `networking`
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FormattedValue") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

RelationshipInterest: **DEPRECATED**: No data will be returned A person's relationship interest .

func (RelationshipInterest) MarshalJSON

func (s RelationshipInterest) MarshalJSON() ([]byte, error)

type RelationshipStatus

type RelationshipStatus struct {
	// FormattedValue: Output only. The value of the relationship status translated
	// and formatted in the viewer's account locale or the `Accept-Language` HTTP
	// header locale.
	FormattedValue string `json:"formattedValue,omitempty"`
	// Metadata: Metadata about the relationship status.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The relationship status. The value can be custom or one of these
	// predefined values: * `single` * `inARelationship` * `engaged` * `married` *
	// `itsComplicated` * `openRelationship` * `widowed` * `inDomesticPartnership`
	// * `inCivilUnion`
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FormattedValue") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

RelationshipStatus: **DEPRECATED**: No data will be returned A person's relationship status.

func (RelationshipStatus) MarshalJSON

func (s RelationshipStatus) MarshalJSON() ([]byte, error)

type Residence

type Residence struct {
	// Current: True if the residence is the person's current residence; false if
	// the residence is a past residence.
	Current bool `json:"current,omitempty"`
	// Metadata: Metadata about the residence.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The address of the residence.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Current") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Current") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Residence: **DEPRECATED**: Please use `person.locations` instead. A person's past or current residence.

func (Residence) MarshalJSON

func (s Residence) MarshalJSON() ([]byte, error)

type SearchDirectoryPeopleResponse added in v0.27.0

type SearchDirectoryPeopleResponse struct {
	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
	// next page. If this field is omitted, there are no subsequent pages.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// People: The list of people in the domain directory that match the query.
	People []*Person `json:"people,omitempty"`
	// TotalSize: The total number of items in the list without pagination.
	TotalSize int64 `json:"totalSize,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

SearchDirectoryPeopleResponse: The response to a request for people in the authenticated user's domain directory that match the specified query.

func (SearchDirectoryPeopleResponse) MarshalJSON added in v0.27.0

func (s SearchDirectoryPeopleResponse) MarshalJSON() ([]byte, error)

type SearchResponse added in v0.41.0

type SearchResponse struct {
	// Results: The results of the request.
	Results []*SearchResult `json:"results,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Results") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Results") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

SearchResponse: The response to a search request for the authenticated user, given a query.

func (SearchResponse) MarshalJSON added in v0.41.0

func (s SearchResponse) MarshalJSON() ([]byte, error)

type SearchResult added in v0.41.0

type SearchResult struct {
	// Person: The matched Person.
	Person *Person `json:"person,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Person") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Person") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

SearchResult: A result of a search query.

func (SearchResult) MarshalJSON added in v0.41.0

func (s SearchResult) MarshalJSON() ([]byte, error)

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	ContactGroups *ContactGroupsService

	OtherContacts *OtherContactsService

	People *PeopleService
	// contains filtered or unexported fields
}

func New deprecated

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService added in v0.3.0

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type SipAddress

type SipAddress struct {
	// FormattedType: Output only. The type of the SIP address translated and
	// formatted in the viewer's account locale or the `Accept-Language` HTTP
	// header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// Metadata: Metadata about the SIP address.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Type: The type of the SIP address. The type can be custom or or one of these
	// predefined values: * `home` * `work` * `mobile` * `other`
	Type string `json:"type,omitempty"`
	// Value: The SIP address in the RFC 3261 19.1
	// (https://tools.ietf.org/html/rfc3261#section-19.1) SIP URI format.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "FormattedType") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FormattedType") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

SipAddress: A person's SIP address. Session Initial Protocol addresses are used for VoIP communications to make voice or video calls over the internet.

func (SipAddress) MarshalJSON

func (s SipAddress) MarshalJSON() ([]byte, error)

type Skill

type Skill struct {
	// Metadata: Metadata about the skill.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The skill; for example, `underwater basket weaving`.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Metadata") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Metadata") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Skill: A skill that the person has.

func (Skill) MarshalJSON

func (s Skill) MarshalJSON() ([]byte, error)

type Source

type Source struct {
	// Etag: **Only populated in `person.metadata.sources`.** The HTTP entity tag
	// (https://en.wikipedia.org/wiki/HTTP_ETag) of the source. Used for web cache
	// validation.
	Etag string `json:"etag,omitempty"`
	// Id: The unique identifier within the source type generated by the server.
	Id string `json:"id,omitempty"`
	// ProfileMetadata: Output only. **Only populated in
	// `person.metadata.sources`.** Metadata about a source of type PROFILE.
	ProfileMetadata *ProfileMetadata `json:"profileMetadata,omitempty"`
	// Type: The source type.
	//
	// Possible values:
	//   "SOURCE_TYPE_UNSPECIFIED" - Unspecified.
	//   "ACCOUNT" - [Google Account](https://accounts.google.com).
	//   "PROFILE" - [Google profile](https://profiles.google.com). You can view
	// the profile at
	// [https://profiles.google.com/](https://profiles.google.com/){id}, where {id}
	// is the source id.
	//   "DOMAIN_PROFILE" - [Google Workspace domain
	// profile](https://support.google.com/a/answer/1628008).
	//   "CONTACT" - [Google contact](https://contacts.google.com). You can view
	// the contact at
	// [https://contact.google.com/](https://contact.google.com/){id}, where {id}
	// is the source id.
	//   "OTHER_CONTACT" - [Google "Other
	// contact"](https://contacts.google.com/other).
	//   "DOMAIN_CONTACT" - [Google Workspace domain shared
	// contact](https://support.google.com/a/answer/9281635).
	Type string `json:"type,omitempty"`
	// UpdateTime: Output only. **Only populated in `person.metadata.sources`.**
	// Last update timestamp of this source.
	UpdateTime string `json:"updateTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Etag") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Source: The source of a field.

func (Source) MarshalJSON

func (s Source) MarshalJSON() ([]byte, error)

type Status

type Status struct {
	// Code: The status code, which should be an enum value of google.rpc.Code.
	Code int64 `json:"code,omitempty"`
	// Details: A list of messages that carry the error details. There is a common
	// set of message types for APIs to use.
	Details []googleapi.RawMessage `json:"details,omitempty"`
	// Message: A developer-facing error message, which should be in English. Any
	// user-facing error message should be localized and sent in the
	// google.rpc.Status.details field, or localized by the client.
	Message string `json:"message,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Code") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).

func (Status) MarshalJSON

func (s Status) MarshalJSON() ([]byte, error)

type Tagline

type Tagline struct {
	// Metadata: Metadata about the tagline.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The tagline.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Metadata") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Metadata") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Tagline: **DEPRECATED**: No data will be returned A brief one-line description of the person.

func (Tagline) MarshalJSON

func (s Tagline) MarshalJSON() ([]byte, error)

type UpdateContactGroupRequest

type UpdateContactGroupRequest struct {
	// ContactGroup: Required. The contact group to update.
	ContactGroup *ContactGroup `json:"contactGroup,omitempty"`
	// ReadGroupFields: Optional. A field mask to restrict which fields on the
	// group are returned. Defaults to `metadata`, `groupType`, and `name` if not
	// set or set to empty. Valid fields are: * clientData * groupType *
	// memberCount * metadata * name
	ReadGroupFields string `json:"readGroupFields,omitempty"`
	// UpdateGroupFields: Optional. A field mask to restrict which fields on the
	// group are updated. Multiple fields can be specified by separating them with
	// commas. Defaults to `name` if not set or set to empty. Updated fields are
	// replaced. Valid values are: * clientData * name
	UpdateGroupFields string `json:"updateGroupFields,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ContactGroup") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ContactGroup") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

UpdateContactGroupRequest: A request to update an existing user contact group. All updated fields will be replaced.

func (UpdateContactGroupRequest) MarshalJSON

func (s UpdateContactGroupRequest) MarshalJSON() ([]byte, error)

type UpdateContactPhotoRequest added in v0.8.0

type UpdateContactPhotoRequest struct {
	// PersonFields: Optional. A field mask to restrict which fields on the person
	// are returned. Multiple fields can be specified by separating them with
	// commas. Defaults to empty if not set, which will skip the post mutate get.
	// Valid values are: * addresses * ageRanges * biographies * birthdays *
	// calendarUrls * clientData * coverPhotos * emailAddresses * events *
	// externalIds * genders * imClients * interests * locales * locations *
	// memberships * metadata * miscKeywords * names * nicknames * occupations *
	// organizations * phoneNumbers * photos * relations * sipAddresses * skills *
	// urls * userDefined
	PersonFields string `json:"personFields,omitempty"`
	// PhotoBytes: Required. Raw photo bytes
	PhotoBytes string `json:"photoBytes,omitempty"`
	// Sources: Optional. A mask of what source types to return. Defaults to
	// READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
	//
	// Possible values:
	//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
	//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
	// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
	//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
	//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns SourceType.DOMAIN_CONTACT.
	//   "READ_SOURCE_TYPE_OTHER_CONTACT" - Returns SourceType.OTHER_CONTACT.
	Sources []string `json:"sources,omitempty"`
	// ForceSendFields is a list of field names (e.g. "PersonFields") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "PersonFields") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

UpdateContactPhotoRequest: A request to update an existing contact's photo. All requests must have a valid photo format: JPEG or PNG.

func (UpdateContactPhotoRequest) MarshalJSON added in v0.8.0

func (s UpdateContactPhotoRequest) MarshalJSON() ([]byte, error)

type UpdateContactPhotoResponse added in v0.8.0

type UpdateContactPhotoResponse struct {
	// Person: The updated person, if person_fields is set in the
	// UpdateContactPhotoRequest; otherwise this will be unset.
	Person *Person `json:"person,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Person") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Person") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

UpdateContactPhotoResponse: The response for updating a contact's photo.

func (UpdateContactPhotoResponse) MarshalJSON added in v0.8.0

func (s UpdateContactPhotoResponse) MarshalJSON() ([]byte, error)

type Url

type Url struct {
	// FormattedType: Output only. The type of the URL translated and formatted in
	// the viewer's account locale or the `Accept-Language` HTTP header locale.
	FormattedType string `json:"formattedType,omitempty"`
	// Metadata: Metadata about the URL.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Type: The type of the URL. The type can be custom or one of these predefined
	// values: * `home` * `work` * `blog` * `profile` * `homePage` * `ftp` *
	// `reservations` * `appInstallPage`: website for a Currents application. *
	// `other`
	Type string `json:"type,omitempty"`
	// Value: The URL.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "FormattedType") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "FormattedType") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Url: A person's associated URLs.

func (Url) MarshalJSON

func (s Url) MarshalJSON() ([]byte, error)

type UserDefined

type UserDefined struct {
	// Key: The end user specified key of the user defined data.
	Key string `json:"key,omitempty"`
	// Metadata: Metadata about the user defined data.
	Metadata *FieldMetadata `json:"metadata,omitempty"`
	// Value: The end user specified value of the user defined data.
	Value string `json:"value,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Key") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

UserDefined: Arbitrary user data that is populated by the end users.

func (UserDefined) MarshalJSON

func (s UserDefined) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL