Documentation ¶
Overview ¶
Package mybusinessaccountmanagement provides access to the My Business Account Management API.
For product documentation, see: https://developers.google.com/my-business/
Creating a client ¶
Usage example:
import "google.golang.org/api/mybusinessaccountmanagement/v1" ... ctx := context.Background() mybusinessaccountmanagementService, err := mybusinessaccountmanagement.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 ¶
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
mybusinessaccountmanagementService, err := mybusinessaccountmanagement.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) mybusinessaccountmanagementService, err := mybusinessaccountmanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See https://godoc.org/google.golang.org/api/option/ for details on options.
Index ¶
- type AcceptInvitationRequest
- type Account
- type AccountsAdminsCreateCall
- func (c *AccountsAdminsCreateCall) Context(ctx context.Context) *AccountsAdminsCreateCall
- func (c *AccountsAdminsCreateCall) Do(opts ...googleapi.CallOption) (*Admin, error)
- func (c *AccountsAdminsCreateCall) Fields(s ...googleapi.Field) *AccountsAdminsCreateCall
- func (c *AccountsAdminsCreateCall) Header() http.Header
- type AccountsAdminsDeleteCall
- func (c *AccountsAdminsDeleteCall) Context(ctx context.Context) *AccountsAdminsDeleteCall
- func (c *AccountsAdminsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *AccountsAdminsDeleteCall) Fields(s ...googleapi.Field) *AccountsAdminsDeleteCall
- func (c *AccountsAdminsDeleteCall) Header() http.Header
- type AccountsAdminsListCall
- func (c *AccountsAdminsListCall) Context(ctx context.Context) *AccountsAdminsListCall
- func (c *AccountsAdminsListCall) Do(opts ...googleapi.CallOption) (*ListAccountAdminsResponse, error)
- func (c *AccountsAdminsListCall) Fields(s ...googleapi.Field) *AccountsAdminsListCall
- func (c *AccountsAdminsListCall) Header() http.Header
- func (c *AccountsAdminsListCall) IfNoneMatch(entityTag string) *AccountsAdminsListCall
- type AccountsAdminsPatchCall
- func (c *AccountsAdminsPatchCall) Context(ctx context.Context) *AccountsAdminsPatchCall
- func (c *AccountsAdminsPatchCall) Do(opts ...googleapi.CallOption) (*Admin, error)
- func (c *AccountsAdminsPatchCall) Fields(s ...googleapi.Field) *AccountsAdminsPatchCall
- func (c *AccountsAdminsPatchCall) Header() http.Header
- func (c *AccountsAdminsPatchCall) UpdateMask(updateMask string) *AccountsAdminsPatchCall
- type AccountsAdminsService
- func (r *AccountsAdminsService) Create(parent string, admin *Admin) *AccountsAdminsCreateCall
- func (r *AccountsAdminsService) Delete(name string) *AccountsAdminsDeleteCall
- func (r *AccountsAdminsService) List(parent string) *AccountsAdminsListCall
- func (r *AccountsAdminsService) Patch(name string, admin *Admin) *AccountsAdminsPatchCall
- type AccountsCreateCall
- type AccountsGetCall
- func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall
- func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error)
- func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall
- func (c *AccountsGetCall) Header() http.Header
- func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall
- type AccountsInvitationsAcceptCall
- func (c *AccountsInvitationsAcceptCall) Context(ctx context.Context) *AccountsInvitationsAcceptCall
- func (c *AccountsInvitationsAcceptCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *AccountsInvitationsAcceptCall) Fields(s ...googleapi.Field) *AccountsInvitationsAcceptCall
- func (c *AccountsInvitationsAcceptCall) Header() http.Header
- type AccountsInvitationsDeclineCall
- func (c *AccountsInvitationsDeclineCall) Context(ctx context.Context) *AccountsInvitationsDeclineCall
- func (c *AccountsInvitationsDeclineCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *AccountsInvitationsDeclineCall) Fields(s ...googleapi.Field) *AccountsInvitationsDeclineCall
- func (c *AccountsInvitationsDeclineCall) Header() http.Header
- type AccountsInvitationsListCall
- func (c *AccountsInvitationsListCall) Context(ctx context.Context) *AccountsInvitationsListCall
- func (c *AccountsInvitationsListCall) Do(opts ...googleapi.CallOption) (*ListInvitationsResponse, error)
- func (c *AccountsInvitationsListCall) Fields(s ...googleapi.Field) *AccountsInvitationsListCall
- func (c *AccountsInvitationsListCall) Filter(filter string) *AccountsInvitationsListCall
- func (c *AccountsInvitationsListCall) Header() http.Header
- func (c *AccountsInvitationsListCall) IfNoneMatch(entityTag string) *AccountsInvitationsListCall
- type AccountsInvitationsService
- func (r *AccountsInvitationsService) Accept(name string, acceptinvitationrequest *AcceptInvitationRequest) *AccountsInvitationsAcceptCall
- func (r *AccountsInvitationsService) Decline(name string, declineinvitationrequest *DeclineInvitationRequest) *AccountsInvitationsDeclineCall
- func (r *AccountsInvitationsService) List(parent string) *AccountsInvitationsListCall
- type AccountsListCall
- func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall
- func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*ListAccountsResponse, error)
- func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall
- func (c *AccountsListCall) Filter(filter string) *AccountsListCall
- func (c *AccountsListCall) Header() http.Header
- func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall
- func (c *AccountsListCall) PageSize(pageSize int64) *AccountsListCall
- func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall
- func (c *AccountsListCall) Pages(ctx context.Context, f func(*ListAccountsResponse) error) error
- func (c *AccountsListCall) ParentAccount(parentAccount string) *AccountsListCall
- type AccountsPatchCall
- func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall
- func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error)
- func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall
- func (c *AccountsPatchCall) Header() http.Header
- func (c *AccountsPatchCall) UpdateMask(updateMask string) *AccountsPatchCall
- func (c *AccountsPatchCall) ValidateOnly(validateOnly bool) *AccountsPatchCall
- type AccountsService
- type Admin
- type DeclineInvitationRequest
- type Empty
- type Invitation
- type ListAccountAdminsResponse
- type ListAccountsResponse
- type ListInvitationsResponse
- type ListLocationAdminsResponse
- type LocationsAdminsCreateCall
- func (c *LocationsAdminsCreateCall) Context(ctx context.Context) *LocationsAdminsCreateCall
- func (c *LocationsAdminsCreateCall) Do(opts ...googleapi.CallOption) (*Admin, error)
- func (c *LocationsAdminsCreateCall) Fields(s ...googleapi.Field) *LocationsAdminsCreateCall
- func (c *LocationsAdminsCreateCall) Header() http.Header
- type LocationsAdminsDeleteCall
- func (c *LocationsAdminsDeleteCall) Context(ctx context.Context) *LocationsAdminsDeleteCall
- func (c *LocationsAdminsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *LocationsAdminsDeleteCall) Fields(s ...googleapi.Field) *LocationsAdminsDeleteCall
- func (c *LocationsAdminsDeleteCall) Header() http.Header
- type LocationsAdminsListCall
- func (c *LocationsAdminsListCall) Context(ctx context.Context) *LocationsAdminsListCall
- func (c *LocationsAdminsListCall) Do(opts ...googleapi.CallOption) (*ListLocationAdminsResponse, error)
- func (c *LocationsAdminsListCall) Fields(s ...googleapi.Field) *LocationsAdminsListCall
- func (c *LocationsAdminsListCall) Header() http.Header
- func (c *LocationsAdminsListCall) IfNoneMatch(entityTag string) *LocationsAdminsListCall
- type LocationsAdminsPatchCall
- func (c *LocationsAdminsPatchCall) Context(ctx context.Context) *LocationsAdminsPatchCall
- func (c *LocationsAdminsPatchCall) Do(opts ...googleapi.CallOption) (*Admin, error)
- func (c *LocationsAdminsPatchCall) Fields(s ...googleapi.Field) *LocationsAdminsPatchCall
- func (c *LocationsAdminsPatchCall) Header() http.Header
- func (c *LocationsAdminsPatchCall) UpdateMask(updateMask string) *LocationsAdminsPatchCall
- type LocationsAdminsService
- func (r *LocationsAdminsService) Create(parent string, admin *Admin) *LocationsAdminsCreateCall
- func (r *LocationsAdminsService) Delete(name string) *LocationsAdminsDeleteCall
- func (r *LocationsAdminsService) List(parent string) *LocationsAdminsListCall
- func (r *LocationsAdminsService) Patch(name string, admin *Admin) *LocationsAdminsPatchCall
- type LocationsService
- type LocationsTransferCall
- func (c *LocationsTransferCall) Context(ctx context.Context) *LocationsTransferCall
- func (c *LocationsTransferCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *LocationsTransferCall) Fields(s ...googleapi.Field) *LocationsTransferCall
- func (c *LocationsTransferCall) Header() http.Header
- type OrganizationInfo
- type PostalAddress
- type Service
- type TargetLocation
- type TransferLocationRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptInvitationRequest ¶
type AcceptInvitationRequest struct { }
AcceptInvitationRequest: Request message for AccessControl.AcceptInvitation.
type Account ¶
type Account struct { // AccountName: Required. The name of the account. For an account of // type `PERSONAL`, this is the first and last name of the user account. AccountName string `json:"accountName,omitempty"` // AccountNumber: Output only. Account reference number if provisioned. AccountNumber string `json:"accountNumber,omitempty"` // Name: Immutable. The resource name, in the format // `accounts/{account_id}`. Name string `json:"name,omitempty"` // OrganizationInfo: Output only. Additional info for an organization. // This is populated only for an organization account. OrganizationInfo *OrganizationInfo `json:"organizationInfo,omitempty"` // PermissionLevel: Output only. Specifies the permission level the user // has for this account. // // Possible values: // "PERMISSION_LEVEL_UNSPECIFIED" - Not specified. // "OWNER_LEVEL" - The user has owner level permission. // "MEMBER_LEVEL" - The user has member level permission. PermissionLevel string `json:"permissionLevel,omitempty"` // PrimaryOwner: Required. Input only. The resource name of the account // which will be the primary owner of the account being created. It // should be of the form `accounts/{account_id}/`. PrimaryOwner string `json:"primaryOwner,omitempty"` // Role: Output only. Specifies the AccountRole of this account. // // Possible values: // "ACCOUNT_ROLE_UNSPECIFIED" - Not specified. // "PRIMARY_OWNER" - The user is the primary owner this account. // "OWNER" - The user owner of the account. // "MANAGER" - The user can manage this account. // "SITE_MANAGER" - The user can manage a limited set of features for // the account. Role string `json:"role,omitempty"` // Type: Required. Contains the type of account. Accounts of type // PERSONAL and ORGANIZATION cannot be created using this API. // // Possible values: // "ACCOUNT_TYPE_UNSPECIFIED" - Not specified. // "PERSONAL" - An end-user account. // "LOCATION_GROUP" - A group of Locations. For more information, see // the [help center article] // (https://support.google.com/business/answer/6085326) // "USER_GROUP" - A User Group for segregating organization staff in // groups. For more information, see the [help center // article](https://support.google.com/business/answer/7655731) // "ORGANIZATION" - An organization representing a company. For more // information, see the [help center // article](https://support.google.com/business/answer/7663063) Type string `json:"type,omitempty"` // VerificationState: Output only. If verified, future locations that // are created are automatically connected to Google Maps, and have // Google+ pages created, without requiring moderation. // // Possible values: // "VERIFICATION_STATE_UNSPECIFIED" - Not specified. // "VERIFIED" - Verified account. // "UNVERIFIED" - Account that is not verified, and verification has // not been requested. // "VERIFICATION_REQUESTED" - Account that is not verified, but // verification has been requested. VerificationState string `json:"verificationState,omitempty"` // VettedState: Output only. Indicates whether the account is vetted by // Google. A vetted account is able to verify locations via the // VETTED_PARTNER method. // // Possible values: // "VETTED_STATE_UNSPECIFIED" - Not Specified // "NOT_VETTED" - The account is not vetted by Google. // "VETTED" - The account is vetted by Google and in a valid state. An // account is automatically vetted if it has direct access to a vetted // group account. // "INVALID" - The account is vetted but in an invalid state. The // account will behave like an unvetted account. VettedState string `json:"vettedState,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "AccountName") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "AccountName") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Account: An account is a container for your location. If you are the only user who manages locations for your business, you can use your personal Google Account. To share management of locations with multiple users, [create a business account] (https://support.google.com/business/answer/6085339?ref_topic=6085325).
func (*Account) MarshalJSON ¶
type AccountsAdminsCreateCall ¶
type AccountsAdminsCreateCall struct {
// contains filtered or unexported fields
}
func (*AccountsAdminsCreateCall) Context ¶
func (c *AccountsAdminsCreateCall) Context(ctx context.Context) *AccountsAdminsCreateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsAdminsCreateCall) Do ¶
func (c *AccountsAdminsCreateCall) Do(opts ...googleapi.CallOption) (*Admin, error)
Do executes the "mybusinessaccountmanagement.accounts.admins.create" call. Exactly one of *Admin or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Admin.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 (*AccountsAdminsCreateCall) Fields ¶
func (c *AccountsAdminsCreateCall) Fields(s ...googleapi.Field) *AccountsAdminsCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsAdminsCreateCall) Header ¶
func (c *AccountsAdminsCreateCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type AccountsAdminsDeleteCall ¶
type AccountsAdminsDeleteCall struct {
// contains filtered or unexported fields
}
func (*AccountsAdminsDeleteCall) Context ¶
func (c *AccountsAdminsDeleteCall) Context(ctx context.Context) *AccountsAdminsDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsAdminsDeleteCall) Do ¶
func (c *AccountsAdminsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "mybusinessaccountmanagement.accounts.admins.delete" call. Exactly one of *Empty or error will be non-nil. 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 (*AccountsAdminsDeleteCall) Fields ¶
func (c *AccountsAdminsDeleteCall) Fields(s ...googleapi.Field) *AccountsAdminsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsAdminsDeleteCall) Header ¶
func (c *AccountsAdminsDeleteCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type AccountsAdminsListCall ¶
type AccountsAdminsListCall struct {
// contains filtered or unexported fields
}
func (*AccountsAdminsListCall) Context ¶
func (c *AccountsAdminsListCall) Context(ctx context.Context) *AccountsAdminsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsAdminsListCall) Do ¶
func (c *AccountsAdminsListCall) Do(opts ...googleapi.CallOption) (*ListAccountAdminsResponse, error)
Do executes the "mybusinessaccountmanagement.accounts.admins.list" call. Exactly one of *ListAccountAdminsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListAccountAdminsResponse.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 (*AccountsAdminsListCall) Fields ¶
func (c *AccountsAdminsListCall) Fields(s ...googleapi.Field) *AccountsAdminsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsAdminsListCall) Header ¶
func (c *AccountsAdminsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*AccountsAdminsListCall) IfNoneMatch ¶
func (c *AccountsAdminsListCall) IfNoneMatch(entityTag string) *AccountsAdminsListCall
IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type AccountsAdminsPatchCall ¶
type AccountsAdminsPatchCall struct {
// contains filtered or unexported fields
}
func (*AccountsAdminsPatchCall) Context ¶
func (c *AccountsAdminsPatchCall) Context(ctx context.Context) *AccountsAdminsPatchCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsAdminsPatchCall) Do ¶
func (c *AccountsAdminsPatchCall) Do(opts ...googleapi.CallOption) (*Admin, error)
Do executes the "mybusinessaccountmanagement.accounts.admins.patch" call. Exactly one of *Admin or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Admin.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 (*AccountsAdminsPatchCall) Fields ¶
func (c *AccountsAdminsPatchCall) Fields(s ...googleapi.Field) *AccountsAdminsPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsAdminsPatchCall) Header ¶
func (c *AccountsAdminsPatchCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*AccountsAdminsPatchCall) UpdateMask ¶
func (c *AccountsAdminsPatchCall) UpdateMask(updateMask string) *AccountsAdminsPatchCall
UpdateMask sets the optional parameter "updateMask": Required. The specific fields that should be updated. The only editable field is role.
type AccountsAdminsService ¶
type AccountsAdminsService struct {
// contains filtered or unexported fields
}
func NewAccountsAdminsService ¶
func NewAccountsAdminsService(s *Service) *AccountsAdminsService
func (*AccountsAdminsService) Create ¶
func (r *AccountsAdminsService) Create(parent string, admin *Admin) *AccountsAdminsCreateCall
Create: Invites the specified user to become an administrator for the specified account. The invitee must accept the invitation in order to be granted access to the account. See AcceptInvitation to programmatically accept an invitation.
- parent: The resource name of the account this admin is created for. `accounts/{account_id}`.
func (*AccountsAdminsService) Delete ¶
func (r *AccountsAdminsService) Delete(name string) *AccountsAdminsDeleteCall
Delete: Removes the specified admin from the specified account.
- name: The resource name of the admin to remove from the account. `accounts/{account_id}/admins/{admin_id}`.
func (*AccountsAdminsService) List ¶
func (r *AccountsAdminsService) List(parent string) *AccountsAdminsListCall
List: Lists the admins for the specified account.
- parent: The name of the account from which to retrieve a list of admins. `accounts/{account_id}/admins`.
func (*AccountsAdminsService) Patch ¶
func (r *AccountsAdminsService) Patch(name string, admin *Admin) *AccountsAdminsPatchCall
Patch: Updates the Admin for the specified Account Admin.
- name: Immutable. The resource name. For account admins, this is in the form: `accounts/{account_id}/admins/{admin_id}` For location admins, this is in the form: `locations/{location_id}/admins/{admin_id}` This field will be ignored if set during admin creation.
type AccountsCreateCall ¶
type AccountsCreateCall struct {
// contains filtered or unexported fields
}
func (*AccountsCreateCall) Context ¶
func (c *AccountsCreateCall) Context(ctx context.Context) *AccountsCreateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsCreateCall) Do ¶
func (c *AccountsCreateCall) Do(opts ...googleapi.CallOption) (*Account, error)
Do executes the "mybusinessaccountmanagement.accounts.create" call. Exactly one of *Account or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Account.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 (*AccountsCreateCall) Fields ¶
func (c *AccountsCreateCall) Fields(s ...googleapi.Field) *AccountsCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsCreateCall) Header ¶
func (c *AccountsCreateCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type AccountsGetCall ¶
type AccountsGetCall struct {
// contains filtered or unexported fields
}
func (*AccountsGetCall) Context ¶
func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsGetCall) Do ¶
func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error)
Do executes the "mybusinessaccountmanagement.accounts.get" call. Exactly one of *Account or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Account.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 (*AccountsGetCall) Fields ¶
func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsGetCall) Header ¶
func (c *AccountsGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*AccountsGetCall) IfNoneMatch ¶
func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall
IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type AccountsInvitationsAcceptCall ¶
type AccountsInvitationsAcceptCall struct {
// contains filtered or unexported fields
}
func (*AccountsInvitationsAcceptCall) Context ¶
func (c *AccountsInvitationsAcceptCall) Context(ctx context.Context) *AccountsInvitationsAcceptCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsInvitationsAcceptCall) Do ¶
func (c *AccountsInvitationsAcceptCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "mybusinessaccountmanagement.accounts.invitations.accept" call. Exactly one of *Empty or error will be non-nil. 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 (*AccountsInvitationsAcceptCall) Fields ¶
func (c *AccountsInvitationsAcceptCall) Fields(s ...googleapi.Field) *AccountsInvitationsAcceptCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsInvitationsAcceptCall) Header ¶
func (c *AccountsInvitationsAcceptCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type AccountsInvitationsDeclineCall ¶
type AccountsInvitationsDeclineCall struct {
// contains filtered or unexported fields
}
func (*AccountsInvitationsDeclineCall) Context ¶
func (c *AccountsInvitationsDeclineCall) Context(ctx context.Context) *AccountsInvitationsDeclineCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsInvitationsDeclineCall) Do ¶
func (c *AccountsInvitationsDeclineCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "mybusinessaccountmanagement.accounts.invitations.decline" call. Exactly one of *Empty or error will be non-nil. 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 (*AccountsInvitationsDeclineCall) Fields ¶
func (c *AccountsInvitationsDeclineCall) Fields(s ...googleapi.Field) *AccountsInvitationsDeclineCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsInvitationsDeclineCall) Header ¶
func (c *AccountsInvitationsDeclineCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type AccountsInvitationsListCall ¶
type AccountsInvitationsListCall struct {
// contains filtered or unexported fields
}
func (*AccountsInvitationsListCall) Context ¶
func (c *AccountsInvitationsListCall) Context(ctx context.Context) *AccountsInvitationsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsInvitationsListCall) Do ¶
func (c *AccountsInvitationsListCall) Do(opts ...googleapi.CallOption) (*ListInvitationsResponse, error)
Do executes the "mybusinessaccountmanagement.accounts.invitations.list" call. Exactly one of *ListInvitationsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListInvitationsResponse.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 (*AccountsInvitationsListCall) Fields ¶
func (c *AccountsInvitationsListCall) Fields(s ...googleapi.Field) *AccountsInvitationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsInvitationsListCall) Filter ¶
func (c *AccountsInvitationsListCall) Filter(filter string) *AccountsInvitationsListCall
Filter sets the optional parameter "filter": Filtering the response is supported via the Invitation.target_type field.
func (*AccountsInvitationsListCall) Header ¶
func (c *AccountsInvitationsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*AccountsInvitationsListCall) IfNoneMatch ¶
func (c *AccountsInvitationsListCall) IfNoneMatch(entityTag string) *AccountsInvitationsListCall
IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type AccountsInvitationsService ¶
type AccountsInvitationsService struct {
// contains filtered or unexported fields
}
func NewAccountsInvitationsService ¶
func NewAccountsInvitationsService(s *Service) *AccountsInvitationsService
func (*AccountsInvitationsService) Accept ¶
func (r *AccountsInvitationsService) Accept(name string, acceptinvitationrequest *AcceptInvitationRequest) *AccountsInvitationsAcceptCall
Accept: Accepts the specified invitation.
- name: The name of the invitation that is being accepted. `accounts/{account_id}/invitations/{invitation_id}`.
func (*AccountsInvitationsService) Decline ¶
func (r *AccountsInvitationsService) Decline(name string, declineinvitationrequest *DeclineInvitationRequest) *AccountsInvitationsDeclineCall
Decline: Declines the specified invitation.
- name: The name of the account invitation that is being declined. `accounts/{account_id}/invitations/{invitation_id}`.
func (*AccountsInvitationsService) List ¶
func (r *AccountsInvitationsService) List(parent string) *AccountsInvitationsListCall
List: Lists pending invitations for the specified account.
- parent: The name of the account from which the list of invitations is being retrieved. `accounts/{account_id}/invitations`.
type AccountsListCall ¶
type AccountsListCall struct {
// contains filtered or unexported fields
}
func (*AccountsListCall) Context ¶
func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsListCall) Do ¶
func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*ListAccountsResponse, error)
Do executes the "mybusinessaccountmanagement.accounts.list" call. Exactly one of *ListAccountsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListAccountsResponse.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 (*AccountsListCall) Fields ¶
func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsListCall) Filter ¶
func (c *AccountsListCall) Filter(filter string) *AccountsListCall
Filter sets the optional parameter "filter": A filter constraining the accounts to return. The response includes only entries that match the filter. If `filter` is empty, then no constraints are applied and all accounts (paginated) are retrieved for the requested account. For example, a request with the filter `type=USER_GROUP` will only return user groups. The `type` field is the only supported filter.
func (*AccountsListCall) Header ¶
func (c *AccountsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*AccountsListCall) IfNoneMatch ¶
func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall
IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*AccountsListCall) PageSize ¶
func (c *AccountsListCall) PageSize(pageSize int64) *AccountsListCall
PageSize sets the optional parameter "pageSize": How many accounts to fetch per page. The minimum supported page_size is 2. The default and maximum is 20.
func (*AccountsListCall) PageToken ¶
func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall
PageToken sets the optional parameter "pageToken": If specified, the next page of accounts is retrieved. The `pageToken` is returned when a call to `accounts.list` returns more results than can fit into the requested page size.
func (*AccountsListCall) Pages ¶
func (c *AccountsListCall) Pages(ctx context.Context, f func(*ListAccountsResponse) error) error
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 (*AccountsListCall) ParentAccount ¶
func (c *AccountsListCall) ParentAccount(parentAccount string) *AccountsListCall
ParentAccount sets the optional parameter "parentAccount": The resource name of the account for which the list of directly accessible accounts is to be retrieved. This only makes sense for Organizations and User Groups. If empty, will return `ListAccounts` for the authenticated user. `accounts/{account_id}`.
type AccountsPatchCall ¶
type AccountsPatchCall struct {
// contains filtered or unexported fields
}
func (*AccountsPatchCall) Context ¶
func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AccountsPatchCall) Do ¶
func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error)
Do executes the "mybusinessaccountmanagement.accounts.patch" call. Exactly one of *Account or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Account.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 (*AccountsPatchCall) Fields ¶
func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*AccountsPatchCall) Header ¶
func (c *AccountsPatchCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*AccountsPatchCall) UpdateMask ¶
func (c *AccountsPatchCall) UpdateMask(updateMask string) *AccountsPatchCall
UpdateMask sets the optional parameter "updateMask": Required. The specific fields that should be updated. The only editable field is `accountName`.
func (*AccountsPatchCall) ValidateOnly ¶
func (c *AccountsPatchCall) ValidateOnly(validateOnly bool) *AccountsPatchCall
ValidateOnly sets the optional parameter "validateOnly": If true, the request is validated without actually updating the account.
type AccountsService ¶
type AccountsService struct { Admins *AccountsAdminsService Invitations *AccountsInvitationsService // contains filtered or unexported fields }
func NewAccountsService ¶
func NewAccountsService(s *Service) *AccountsService
func (*AccountsService) Create ¶
func (r *AccountsService) Create(account *Account) *AccountsCreateCall
Create: Creates an account with the specified name and type under the given parent. - Personal accounts and Organizations cannot be created. - User Groups cannot be created with a Personal account as primary owner. - Location Groups cannot be created with a primary owner of a Personal account if the Personal account is in an Organization. - Location Groups cannot own Location Groups.
func (*AccountsService) Get ¶
func (r *AccountsService) Get(name string) *AccountsGetCall
Get: Gets the specified account. Returns `NOT_FOUND` if the account does not exist or if the caller does not have access rights to it.
- name: The name of the account to fetch.
func (*AccountsService) List ¶
func (r *AccountsService) List() *AccountsListCall
List: Lists all of the accounts for the authenticated user. This includes all accounts that the user owns, as well as any accounts for which the user has management rights.
func (*AccountsService) Patch ¶
func (r *AccountsService) Patch(name string, account *Account) *AccountsPatchCall
Patch: Updates the specified business account. Personal accounts cannot be updated using this method.
- name: Immutable. The resource name, in the format `accounts/{account_id}`.
type Admin ¶
type Admin struct { // Admin: Optional. The name of the admin. When making the initial // invitation, this is the invitee's email address. On `GET` calls, the // user's email address is returned if the invitation is still pending. // Otherwise, it contains the user's first and last names. This field is // only needed to be set during admin creation. Admin string `json:"admin,omitempty"` // Name: Immutable. The resource name. For account admins, this is in // the form: `accounts/{account_id}/admins/{admin_id}` For location // admins, this is in the form: // `locations/{location_id}/admins/{admin_id}` This field will be // ignored if set during admin creation. Name string `json:"name,omitempty"` // PendingInvitation: Output only. Indicates whether this admin has a // pending invitation for the specified resource. PendingInvitation bool `json:"pendingInvitation,omitempty"` // Role: Required. Specifies the role that this admin uses with the // specified Account or Location. // // Possible values: // "ADMIN_ROLE_UNSPECIFIED" - Not specified. // "PRIMARY_OWNER" - The admin has owner-level access and is the // primary owner. (Displays as 'Primary Owner' in UI). // "OWNER" - The admin has owner-level access. (Displays as 'Owner' in // UI). // "MANAGER" - The admin has managerial access. // "SITE_MANAGER" - The admin can manage social (Google+) pages. // (Displays as 'Site Manager' in UI). This API doesn't allow creating // an account admin with a SITE_MANAGER role. Role string `json:"role,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Admin") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Admin") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Admin: An administrator of an Account or a location.
func (*Admin) MarshalJSON ¶
type DeclineInvitationRequest ¶
type DeclineInvitationRequest struct { }
DeclineInvitationRequest: Request message for AccessControl.DeclineInvitation.
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); } The JSON representation for `Empty` is empty JSON object `{}`.
type Invitation ¶
type Invitation struct { // Name: Required. The resource name for the invitation. // `accounts/{account_id}/invitations/{invitation_id}`. Name string `json:"name,omitempty"` // Role: Output only. The invited role on the account. // // Possible values: // "ADMIN_ROLE_UNSPECIFIED" - Not specified. // "PRIMARY_OWNER" - The admin has owner-level access and is the // primary owner. (Displays as 'Primary Owner' in UI). // "OWNER" - The admin has owner-level access. (Displays as 'Owner' in // UI). // "MANAGER" - The admin has managerial access. // "SITE_MANAGER" - The admin can manage social (Google+) pages. // (Displays as 'Site Manager' in UI). This API doesn't allow creating // an account admin with a SITE_MANAGER role. Role string `json:"role,omitempty"` // TargetAccount: The sparsely populated account this invitation is for. TargetAccount *Account `json:"targetAccount,omitempty"` // TargetLocation: The target location this invitation is for. TargetLocation *TargetLocation `json:"targetLocation,omitempty"` // TargetType: Output only. Specifies which target types should appear // in the response. // // Possible values: // "TARGET_TYPE_UNSPECIFIED" - Set when target type is unspecified. // "ACCOUNTS_ONLY" - List invitations only for targets of type // Account. // "LOCATIONS_ONLY" - List invitations only for targets of type // Location. TargetType string `json:"targetType,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Name") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
Invitation: Represents a pending invitation.
func (*Invitation) MarshalJSON ¶
func (s *Invitation) MarshalJSON() ([]byte, error)
type ListAccountAdminsResponse ¶
type ListAccountAdminsResponse struct { // AccountAdmins: A collection of Admin instances. AccountAdmins []*Admin `json:"accountAdmins,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "AccountAdmins") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "AccountAdmins") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ListAccountAdminsResponse: Response message for AccessControl.ListAccountAdmins.
func (*ListAccountAdminsResponse) MarshalJSON ¶
func (s *ListAccountAdminsResponse) MarshalJSON() ([]byte, error)
type ListAccountsResponse ¶
type ListAccountsResponse struct { // Accounts: A collection of accounts to which the user has access. The // personal account of the user doing the query will always be the first // item of the result, unless it is filtered out. Accounts []*Account `json:"accounts,omitempty"` // NextPageToken: If the number of accounts exceeds the requested page // size, this field is populated with a token to fetch the next page of // accounts on a subsequent call to `accounts.list`. If there are no // more accounts, this field is not present in the response. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Accounts") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Accounts") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ListAccountsResponse: Response message for Accounts.ListAccounts.
func (*ListAccountsResponse) MarshalJSON ¶
func (s *ListAccountsResponse) MarshalJSON() ([]byte, error)
type ListInvitationsResponse ¶
type ListInvitationsResponse struct { // Invitations: A collection of invitations that are pending for the // account. The number of invitations listed here cannot exceed 1000. Invitations []*Invitation `json:"invitations,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Invitations") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Invitations") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ListInvitationsResponse: Response message for AccessControl.ListInvitations.
func (*ListInvitationsResponse) MarshalJSON ¶
func (s *ListInvitationsResponse) MarshalJSON() ([]byte, error)
type ListLocationAdminsResponse ¶
type ListLocationAdminsResponse struct { // Admins: A collection of Admins. Admins []*Admin `json:"admins,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Admins") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Admins") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ListLocationAdminsResponse: Response message for AccessControl.ListLocationAdmins.
func (*ListLocationAdminsResponse) MarshalJSON ¶
func (s *ListLocationAdminsResponse) MarshalJSON() ([]byte, error)
type LocationsAdminsCreateCall ¶
type LocationsAdminsCreateCall struct {
// contains filtered or unexported fields
}
func (*LocationsAdminsCreateCall) Context ¶
func (c *LocationsAdminsCreateCall) Context(ctx context.Context) *LocationsAdminsCreateCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*LocationsAdminsCreateCall) Do ¶
func (c *LocationsAdminsCreateCall) Do(opts ...googleapi.CallOption) (*Admin, error)
Do executes the "mybusinessaccountmanagement.locations.admins.create" call. Exactly one of *Admin or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Admin.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 (*LocationsAdminsCreateCall) Fields ¶
func (c *LocationsAdminsCreateCall) Fields(s ...googleapi.Field) *LocationsAdminsCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*LocationsAdminsCreateCall) Header ¶
func (c *LocationsAdminsCreateCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type LocationsAdminsDeleteCall ¶
type LocationsAdminsDeleteCall struct {
// contains filtered or unexported fields
}
func (*LocationsAdminsDeleteCall) Context ¶
func (c *LocationsAdminsDeleteCall) Context(ctx context.Context) *LocationsAdminsDeleteCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*LocationsAdminsDeleteCall) Do ¶
func (c *LocationsAdminsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "mybusinessaccountmanagement.locations.admins.delete" call. Exactly one of *Empty or error will be non-nil. 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 (*LocationsAdminsDeleteCall) Fields ¶
func (c *LocationsAdminsDeleteCall) Fields(s ...googleapi.Field) *LocationsAdminsDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*LocationsAdminsDeleteCall) Header ¶
func (c *LocationsAdminsDeleteCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type LocationsAdminsListCall ¶
type LocationsAdminsListCall struct {
// contains filtered or unexported fields
}
func (*LocationsAdminsListCall) Context ¶
func (c *LocationsAdminsListCall) Context(ctx context.Context) *LocationsAdminsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*LocationsAdminsListCall) Do ¶
func (c *LocationsAdminsListCall) Do(opts ...googleapi.CallOption) (*ListLocationAdminsResponse, error)
Do executes the "mybusinessaccountmanagement.locations.admins.list" call. Exactly one of *ListLocationAdminsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListLocationAdminsResponse.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 (*LocationsAdminsListCall) Fields ¶
func (c *LocationsAdminsListCall) Fields(s ...googleapi.Field) *LocationsAdminsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*LocationsAdminsListCall) Header ¶
func (c *LocationsAdminsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*LocationsAdminsListCall) IfNoneMatch ¶
func (c *LocationsAdminsListCall) IfNoneMatch(entityTag string) *LocationsAdminsListCall
IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type LocationsAdminsPatchCall ¶
type LocationsAdminsPatchCall struct {
// contains filtered or unexported fields
}
func (*LocationsAdminsPatchCall) Context ¶
func (c *LocationsAdminsPatchCall) Context(ctx context.Context) *LocationsAdminsPatchCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*LocationsAdminsPatchCall) Do ¶
func (c *LocationsAdminsPatchCall) Do(opts ...googleapi.CallOption) (*Admin, error)
Do executes the "mybusinessaccountmanagement.locations.admins.patch" call. Exactly one of *Admin or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Admin.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 (*LocationsAdminsPatchCall) Fields ¶
func (c *LocationsAdminsPatchCall) Fields(s ...googleapi.Field) *LocationsAdminsPatchCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*LocationsAdminsPatchCall) Header ¶
func (c *LocationsAdminsPatchCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*LocationsAdminsPatchCall) UpdateMask ¶
func (c *LocationsAdminsPatchCall) UpdateMask(updateMask string) *LocationsAdminsPatchCall
UpdateMask sets the optional parameter "updateMask": Required. The specific fields that should be updated. The only editable field is role.
type LocationsAdminsService ¶
type LocationsAdminsService struct {
// contains filtered or unexported fields
}
func NewLocationsAdminsService ¶
func NewLocationsAdminsService(s *Service) *LocationsAdminsService
func (*LocationsAdminsService) Create ¶
func (r *LocationsAdminsService) Create(parent string, admin *Admin) *LocationsAdminsCreateCall
Create: Invites the specified user to become an administrator for the specified location. The invitee must accept the invitation in order to be granted access to the location. See AcceptInvitation to programmatically accept an invitation.
- parent: The resource name of the location this admin is created for. `locations/{location_id}/admins`.
func (*LocationsAdminsService) Delete ¶
func (r *LocationsAdminsService) Delete(name string) *LocationsAdminsDeleteCall
Delete: Removes the specified admin as a manager of the specified location.
- name: The resource name of the admin to remove from the location.
func (*LocationsAdminsService) List ¶
func (r *LocationsAdminsService) List(parent string) *LocationsAdminsListCall
List: Lists all of the admins for the specified location.
- parent: The name of the location to list admins of. `locations/{location_id}/admins`.
func (*LocationsAdminsService) Patch ¶
func (r *LocationsAdminsService) Patch(name string, admin *Admin) *LocationsAdminsPatchCall
Patch: Updates the Admin for the specified location. Only the AdminRole of the Admin can be updated.
- name: Immutable. The resource name. For account admins, this is in the form: `accounts/{account_id}/admins/{admin_id}` For location admins, this is in the form: `locations/{location_id}/admins/{admin_id}` This field will be ignored if set during admin creation.
type LocationsService ¶
type LocationsService struct { Admins *LocationsAdminsService // contains filtered or unexported fields }
func NewLocationsService ¶
func NewLocationsService(s *Service) *LocationsService
func (*LocationsService) Transfer ¶
func (r *LocationsService) Transfer(name string, transferlocationrequest *TransferLocationRequest) *LocationsTransferCall
Transfer: Moves a location from an account that the user owns to another account that the same user administers. The user must be an owner of the account the location is currently associated with and must also be at least a manager of the destination account.
- name: The name of the location to transfer. `locations/{location_id}`.
type LocationsTransferCall ¶
type LocationsTransferCall struct {
// contains filtered or unexported fields
}
func (*LocationsTransferCall) Context ¶
func (c *LocationsTransferCall) Context(ctx context.Context) *LocationsTransferCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*LocationsTransferCall) Do ¶
func (c *LocationsTransferCall) Do(opts ...googleapi.CallOption) (*Empty, error)
Do executes the "mybusinessaccountmanagement.locations.transfer" call. Exactly one of *Empty or error will be non-nil. 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 (*LocationsTransferCall) Fields ¶
func (c *LocationsTransferCall) Fields(s ...googleapi.Field) *LocationsTransferCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*LocationsTransferCall) Header ¶
func (c *LocationsTransferCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type OrganizationInfo ¶
type OrganizationInfo struct { // Address: Output only. The postal address for the account. Address *PostalAddress `json:"address,omitempty"` // PhoneNumber: Output only. The contact number for the organization. PhoneNumber string `json:"phoneNumber,omitempty"` // RegisteredDomain: Output only. The registered domain for the account. RegisteredDomain string `json:"registeredDomain,omitempty"` // ForceSendFields is a list of field names (e.g. "Address") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Address") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
OrganizationInfo: Additional information stored for an organization.
func (*OrganizationInfo) MarshalJSON ¶
func (s *OrganizationInfo) MarshalJSON() ([]byte, error)
type PostalAddress ¶
type PostalAddress struct { // AddressLines: Unstructured address lines describing the lower levels // of an address. Because values in address_lines do not have type // information and may sometimes contain multiple values in a single // field (e.g. "Austin, TX"), it is important that the line order is // clear. The order of address lines should be "envelope order" for the // country/region of the address. In places where this can vary (e.g. // Japan), address_language is used to make it explicit (e.g. "ja" for // large-to-small ordering and "ja-Latn" or "en" for small-to-large). // This way, the most specific line of an address can be selected based // on the language. The minimum permitted structural representation of // an address consists of a region_code with all remaining information // placed in the address_lines. It would be possible to format such an // address very approximately without geocoding, but no semantic // reasoning could be made about any of the address components until it // was at least partially resolved. Creating an address only containing // a region_code and address_lines, and then geocoding is the // recommended way to handle completely unstructured addresses (as // opposed to guessing which parts of the address should be localities // or administrative areas). AddressLines []string `json:"addressLines,omitempty"` // AdministrativeArea: Optional. Highest administrative subdivision // which is used for postal addresses of a country or region. For // example, this can be a state, a province, an oblast, or a prefecture. // Specifically, for Spain this is the province and not the autonomous // community (e.g. "Barcelona" and not "Catalonia"). Many countries // don't use an administrative area in postal addresses. E.g. in // Switzerland this should be left unpopulated. AdministrativeArea string `json:"administrativeArea,omitempty"` // LanguageCode: Optional. BCP-47 language code of the contents of this // address (if known). This is often the UI language of the input form // or is expected to match one of the languages used in the address' // country/region, or their transliterated equivalents. This can affect // formatting in certain countries, but is not critical to the // correctness of the data and will never affect any validation or other // non-formatting related operations. If this value is not known, it // should be omitted (rather than specifying a possibly incorrect // default). Examples: "zh-Hant", "ja", "ja-Latn", "en". LanguageCode string `json:"languageCode,omitempty"` // Locality: Optional. Generally refers to the city/town portion of the // address. Examples: US city, IT comune, UK post town. In regions of // the world where localities are not well defined or do not fit into // this structure well, leave locality empty and use address_lines. Locality string `json:"locality,omitempty"` // Organization: Optional. The name of the organization at the address. Organization string `json:"organization,omitempty"` // PostalCode: Optional. Postal code of the address. Not all countries // use or require postal codes to be present, but where they are used, // they may trigger additional validation with other parts of the // address (e.g. state/zip validation in the U.S.A.). PostalCode string `json:"postalCode,omitempty"` // Recipients: Optional. The recipient at the address. This field may, // under certain circumstances, contain multiline information. For // example, it might contain "care of" information. Recipients []string `json:"recipients,omitempty"` // RegionCode: Required. CLDR region code of the country/region of the // address. This is never inferred and it is up to the user to ensure // the value is correct. See http://cldr.unicode.org/ and // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html // for details. Example: "CH" for Switzerland. RegionCode string `json:"regionCode,omitempty"` // Revision: The schema revision of the `PostalAddress`. This must be // set to 0, which is the latest revision. All new revisions **must** be // backward compatible with old revisions. Revision int64 `json:"revision,omitempty"` // SortingCode: Optional. Additional, country-specific, sorting code. // This is not used in most regions. Where it is used, the value is // either a string like "CEDEX", optionally followed by a number (e.g. // "CEDEX 7"), or just a number alone, representing the "sector code" // (Jamaica), "delivery area indicator" (Malawi) or "post office // indicator" (e.g. Côte d'Ivoire). SortingCode string `json:"sortingCode,omitempty"` // Sublocality: Optional. Sublocality of the address. For example, this // can be neighborhoods, boroughs, districts. Sublocality string `json:"sublocality,omitempty"` // ForceSendFields is a list of field names (e.g. "AddressLines") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "AddressLines") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
PostalAddress: Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478
func (*PostalAddress) MarshalJSON ¶
func (s *PostalAddress) MarshalJSON() ([]byte, error)
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Accounts *AccountsService Locations *LocationsService // contains filtered or unexported fields }
func New
deprecated
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 ¶
NewService creates a new Service.
type TargetLocation ¶
type TargetLocation struct { // Address: The address of the location to which the user is invited. Address string `json:"address,omitempty"` // LocationName: The name of the location to which the user is invited. LocationName string `json:"locationName,omitempty"` // ForceSendFields is a list of field names (e.g. "Address") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Address") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
TargetLocation: Represents a target location for a pending invitation.
func (*TargetLocation) MarshalJSON ¶
func (s *TargetLocation) MarshalJSON() ([]byte, error)
type TransferLocationRequest ¶
type TransferLocationRequest struct { // DestinationAccount: Required. Name of the account resource to // transfer the location to (for example, "accounts/{account}"). DestinationAccount string `json:"destinationAccount,omitempty"` // ForceSendFields is a list of field names (e.g. "DestinationAccount") // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DestinationAccount") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
TransferLocationRequest: Request message for AccessControl.TransferLocation.
func (*TransferLocationRequest) MarshalJSON ¶
func (s *TransferLocationRequest) MarshalJSON() ([]byte, error)