Documentation
¶
Overview ¶
Package billing is a generated protocol buffer package.
It is generated from these files:
google/cloud/billing/v1/cloud_billing.proto
It has these top-level messages:
BillingAccount ProjectBillingInfo GetBillingAccountRequest ListBillingAccountsRequest ListBillingAccountsResponse ListProjectBillingInfoRequest ListProjectBillingInfoResponse GetProjectBillingInfoRequest UpdateProjectBillingInfoRequest
Index ¶
- func RegisterCloudBillingServer(s *grpc.Server, srv CloudBillingServer)
- type BillingAccount
- type CloudBillingClient
- type CloudBillingServer
- type GetBillingAccountRequest
- type GetProjectBillingInfoRequest
- type ListBillingAccountsRequest
- func (*ListBillingAccountsRequest) Descriptor() ([]byte, []int)
- func (m *ListBillingAccountsRequest) GetPageSize() int32
- func (m *ListBillingAccountsRequest) GetPageToken() string
- func (*ListBillingAccountsRequest) ProtoMessage()
- func (m *ListBillingAccountsRequest) Reset()
- func (m *ListBillingAccountsRequest) String() string
- type ListBillingAccountsResponse
- func (*ListBillingAccountsResponse) Descriptor() ([]byte, []int)
- func (m *ListBillingAccountsResponse) GetBillingAccounts() []*BillingAccount
- func (m *ListBillingAccountsResponse) GetNextPageToken() string
- func (*ListBillingAccountsResponse) ProtoMessage()
- func (m *ListBillingAccountsResponse) Reset()
- func (m *ListBillingAccountsResponse) String() string
- type ListProjectBillingInfoRequest
- func (*ListProjectBillingInfoRequest) Descriptor() ([]byte, []int)
- func (m *ListProjectBillingInfoRequest) GetName() string
- func (m *ListProjectBillingInfoRequest) GetPageSize() int32
- func (m *ListProjectBillingInfoRequest) GetPageToken() string
- func (*ListProjectBillingInfoRequest) ProtoMessage()
- func (m *ListProjectBillingInfoRequest) Reset()
- func (m *ListProjectBillingInfoRequest) String() string
- type ListProjectBillingInfoResponse
- func (*ListProjectBillingInfoResponse) Descriptor() ([]byte, []int)
- func (m *ListProjectBillingInfoResponse) GetNextPageToken() string
- func (m *ListProjectBillingInfoResponse) GetProjectBillingInfo() []*ProjectBillingInfo
- func (*ListProjectBillingInfoResponse) ProtoMessage()
- func (m *ListProjectBillingInfoResponse) Reset()
- func (m *ListProjectBillingInfoResponse) String() string
- type ProjectBillingInfo
- func (*ProjectBillingInfo) Descriptor() ([]byte, []int)
- func (m *ProjectBillingInfo) GetBillingAccountName() string
- func (m *ProjectBillingInfo) GetBillingEnabled() bool
- func (m *ProjectBillingInfo) GetName() string
- func (m *ProjectBillingInfo) GetProjectId() string
- func (*ProjectBillingInfo) ProtoMessage()
- func (m *ProjectBillingInfo) Reset()
- func (m *ProjectBillingInfo) String() string
- type UpdateProjectBillingInfoRequest
- func (*UpdateProjectBillingInfoRequest) Descriptor() ([]byte, []int)
- func (m *UpdateProjectBillingInfoRequest) GetName() string
- func (m *UpdateProjectBillingInfoRequest) GetProjectBillingInfo() *ProjectBillingInfo
- func (*UpdateProjectBillingInfoRequest) ProtoMessage()
- func (m *UpdateProjectBillingInfoRequest) Reset()
- func (m *UpdateProjectBillingInfoRequest) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCloudBillingServer ¶
func RegisterCloudBillingServer(s *grpc.Server, srv CloudBillingServer)
Types ¶
type BillingAccount ¶
type BillingAccount struct {
// The resource name of the billing account. The resource name has the form
// `billingAccounts/{billing_account_id}`. For example,
// `billingAccounts/012345-567890-ABCDEF` would be the resource name for
// billing account `012345-567890-ABCDEF`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// True if the billing account is open, and will therefore be charged for any
// usage on associated projects. False if the billing account is closed, and
// therefore projects associated with it will be unable to use paid services.
Open bool `protobuf:"varint,2,opt,name=open" json:"open,omitempty"`
// The display name given to the billing account, such as `My Billing
// Account`. This name is displayed in the Google Cloud Console.
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName" json:"display_name,omitempty"`
}
A billing account in [Google Cloud Console](https://console.cloud.google.com/). You can assign a billing account to one or more projects.
func (*BillingAccount) Descriptor ¶
func (*BillingAccount) Descriptor() ([]byte, []int)
func (*BillingAccount) GetDisplayName ¶
func (m *BillingAccount) GetDisplayName() string
func (*BillingAccount) GetName ¶
func (m *BillingAccount) GetName() string
func (*BillingAccount) GetOpen ¶
func (m *BillingAccount) GetOpen() bool
func (*BillingAccount) ProtoMessage ¶
func (*BillingAccount) ProtoMessage()
func (*BillingAccount) Reset ¶
func (m *BillingAccount) Reset()
func (*BillingAccount) String ¶
func (m *BillingAccount) String() string
type CloudBillingClient ¶
type CloudBillingClient interface {
// Gets information about a billing account. The current authenticated user
// must be an [owner of the billing
// account](https://support.google.com/cloud/answer/4430947).
GetBillingAccount(ctx context.Context, in *GetBillingAccountRequest, opts ...grpc.CallOption) (*BillingAccount, error)
// Lists the billing accounts that the current authenticated user
// [owns](https://support.google.com/cloud/answer/4430947).
ListBillingAccounts(ctx context.Context, in *ListBillingAccountsRequest, opts ...grpc.CallOption) (*ListBillingAccountsResponse, error)
// Lists the projects associated with a billing account. The current
// authenticated user must be an [owner of the billing
// account](https://support.google.com/cloud/answer/4430947).
ListProjectBillingInfo(ctx context.Context, in *ListProjectBillingInfoRequest, opts ...grpc.CallOption) (*ListProjectBillingInfoResponse, error)
// Gets the billing information for a project. The current authenticated user
// must have [permission to view the
// project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
// ).
GetProjectBillingInfo(ctx context.Context, in *GetProjectBillingInfoRequest, opts ...grpc.CallOption) (*ProjectBillingInfo, error)
// Sets or updates the billing account associated with a project. You specify
// the new billing account by setting the `billing_account_name` in the
// `ProjectBillingInfo` resource to the resource name of a billing account.
// Associating a project with an open billing account enables billing on the
// project and allows charges for resource usage. If the project already had a
// billing account, this method changes the billing account used for resource
// usage charges.
//
// *Note:* Incurred charges that have not yet been reported in the transaction
// history of the Google Cloud Console may be billed to the new billing
// account, even if the charge occurred before the new billing account was
// assigned to the project.
//
// The current authenticated user must have ownership privileges for both the
// [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
// ) and the [billing
// account](https://support.google.com/cloud/answer/4430947).
//
// You can disable billing on the project by setting the
// `billing_account_name` field to empty. This action disassociates the
// current billing account from the project. Any billable activity of your
// in-use services will stop, and your application could stop functioning as
// expected. Any unbilled charges to date will be billed to the previously
// associated account. The current authenticated user must be either an owner
// of the project or an owner of the billing account for the project.
//
// Note that associating a project with a *closed* billing account will have
// much the same effect as disabling billing on the project: any paid
// resources used by the project will be shut down. Thus, unless you wish to
// disable billing, you should always call this method with the name of an
// *open* billing account.
UpdateProjectBillingInfo(ctx context.Context, in *UpdateProjectBillingInfoRequest, opts ...grpc.CallOption) (*ProjectBillingInfo, error)
}
func NewCloudBillingClient ¶
func NewCloudBillingClient(cc *grpc.ClientConn) CloudBillingClient
type CloudBillingServer ¶
type CloudBillingServer interface {
// Gets information about a billing account. The current authenticated user
// must be an [owner of the billing
// account](https://support.google.com/cloud/answer/4430947).
GetBillingAccount(context.Context, *GetBillingAccountRequest) (*BillingAccount, error)
// Lists the billing accounts that the current authenticated user
// [owns](https://support.google.com/cloud/answer/4430947).
ListBillingAccounts(context.Context, *ListBillingAccountsRequest) (*ListBillingAccountsResponse, error)
// Lists the projects associated with a billing account. The current
// authenticated user must be an [owner of the billing
// account](https://support.google.com/cloud/answer/4430947).
ListProjectBillingInfo(context.Context, *ListProjectBillingInfoRequest) (*ListProjectBillingInfoResponse, error)
// Gets the billing information for a project. The current authenticated user
// must have [permission to view the
// project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
// ).
GetProjectBillingInfo(context.Context, *GetProjectBillingInfoRequest) (*ProjectBillingInfo, error)
// Sets or updates the billing account associated with a project. You specify
// the new billing account by setting the `billing_account_name` in the
// `ProjectBillingInfo` resource to the resource name of a billing account.
// Associating a project with an open billing account enables billing on the
// project and allows charges for resource usage. If the project already had a
// billing account, this method changes the billing account used for resource
// usage charges.
//
// *Note:* Incurred charges that have not yet been reported in the transaction
// history of the Google Cloud Console may be billed to the new billing
// account, even if the charge occurred before the new billing account was
// assigned to the project.
//
// The current authenticated user must have ownership privileges for both the
// [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
// ) and the [billing
// account](https://support.google.com/cloud/answer/4430947).
//
// You can disable billing on the project by setting the
// `billing_account_name` field to empty. This action disassociates the
// current billing account from the project. Any billable activity of your
// in-use services will stop, and your application could stop functioning as
// expected. Any unbilled charges to date will be billed to the previously
// associated account. The current authenticated user must be either an owner
// of the project or an owner of the billing account for the project.
//
// Note that associating a project with a *closed* billing account will have
// much the same effect as disabling billing on the project: any paid
// resources used by the project will be shut down. Thus, unless you wish to
// disable billing, you should always call this method with the name of an
// *open* billing account.
UpdateProjectBillingInfo(context.Context, *UpdateProjectBillingInfoRequest) (*ProjectBillingInfo, error)
}
type GetBillingAccountRequest ¶
type GetBillingAccountRequest struct {
// The resource name of the billing account to retrieve. For example,
// `billingAccounts/012345-567890-ABCDEF`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
Request message for `GetBillingAccount`.
func (*GetBillingAccountRequest) Descriptor ¶
func (*GetBillingAccountRequest) Descriptor() ([]byte, []int)
func (*GetBillingAccountRequest) GetName ¶
func (m *GetBillingAccountRequest) GetName() string
func (*GetBillingAccountRequest) ProtoMessage ¶
func (*GetBillingAccountRequest) ProtoMessage()
func (*GetBillingAccountRequest) Reset ¶
func (m *GetBillingAccountRequest) Reset()
func (*GetBillingAccountRequest) String ¶
func (m *GetBillingAccountRequest) String() string
type GetProjectBillingInfoRequest ¶
type GetProjectBillingInfoRequest struct {
// The resource name of the project for which billing information is
// retrieved. For example, `projects/tokyo-rain-123`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
Request message for `GetProjectBillingInfo`.
func (*GetProjectBillingInfoRequest) Descriptor ¶
func (*GetProjectBillingInfoRequest) Descriptor() ([]byte, []int)
func (*GetProjectBillingInfoRequest) GetName ¶
func (m *GetProjectBillingInfoRequest) GetName() string
func (*GetProjectBillingInfoRequest) ProtoMessage ¶
func (*GetProjectBillingInfoRequest) ProtoMessage()
func (*GetProjectBillingInfoRequest) Reset ¶
func (m *GetProjectBillingInfoRequest) Reset()
func (*GetProjectBillingInfoRequest) String ¶
func (m *GetProjectBillingInfoRequest) String() string
type ListBillingAccountsRequest ¶
type ListBillingAccountsRequest struct {
// Requested page size. The maximum page size is 100; this is also the
// default.
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
// A token identifying a page of results to return. This should be a
// `next_page_token` value returned from a previous `ListBillingAccounts`
// call. If unspecified, the first page of results is returned.
PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}
Request message for `ListBillingAccounts`.
func (*ListBillingAccountsRequest) Descriptor ¶
func (*ListBillingAccountsRequest) Descriptor() ([]byte, []int)
func (*ListBillingAccountsRequest) GetPageSize ¶
func (m *ListBillingAccountsRequest) GetPageSize() int32
func (*ListBillingAccountsRequest) GetPageToken ¶
func (m *ListBillingAccountsRequest) GetPageToken() string
func (*ListBillingAccountsRequest) ProtoMessage ¶
func (*ListBillingAccountsRequest) ProtoMessage()
func (*ListBillingAccountsRequest) Reset ¶
func (m *ListBillingAccountsRequest) Reset()
func (*ListBillingAccountsRequest) String ¶
func (m *ListBillingAccountsRequest) String() string
type ListBillingAccountsResponse ¶
type ListBillingAccountsResponse struct {
// A list of billing accounts.
BillingAccounts []*BillingAccount `protobuf:"bytes,1,rep,name=billing_accounts,json=billingAccounts" json:"billing_accounts,omitempty"`
// A token to retrieve the next page of results. To retrieve the next page,
// call `ListBillingAccounts` again with the `page_token` field set to this
// value. This field is empty if there are no more results to retrieve.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}
Response message for `ListBillingAccounts`.
func (*ListBillingAccountsResponse) Descriptor ¶
func (*ListBillingAccountsResponse) Descriptor() ([]byte, []int)
func (*ListBillingAccountsResponse) GetBillingAccounts ¶
func (m *ListBillingAccountsResponse) GetBillingAccounts() []*BillingAccount
func (*ListBillingAccountsResponse) GetNextPageToken ¶
func (m *ListBillingAccountsResponse) GetNextPageToken() string
func (*ListBillingAccountsResponse) ProtoMessage ¶
func (*ListBillingAccountsResponse) ProtoMessage()
func (*ListBillingAccountsResponse) Reset ¶
func (m *ListBillingAccountsResponse) Reset()
func (*ListBillingAccountsResponse) String ¶
func (m *ListBillingAccountsResponse) String() string
type ListProjectBillingInfoRequest ¶
type ListProjectBillingInfoRequest struct {
// The resource name of the billing account associated with the projects that
// you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// Requested page size. The maximum page size is 100; this is also the
// default.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
// A token identifying a page of results to be returned. This should be a
// `next_page_token` value returned from a previous `ListProjectBillingInfo`
// call. If unspecified, the first page of results is returned.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}
Request message for `ListProjectBillingInfo`.
func (*ListProjectBillingInfoRequest) Descriptor ¶
func (*ListProjectBillingInfoRequest) Descriptor() ([]byte, []int)
func (*ListProjectBillingInfoRequest) GetName ¶
func (m *ListProjectBillingInfoRequest) GetName() string
func (*ListProjectBillingInfoRequest) GetPageSize ¶
func (m *ListProjectBillingInfoRequest) GetPageSize() int32
func (*ListProjectBillingInfoRequest) GetPageToken ¶
func (m *ListProjectBillingInfoRequest) GetPageToken() string
func (*ListProjectBillingInfoRequest) ProtoMessage ¶
func (*ListProjectBillingInfoRequest) ProtoMessage()
func (*ListProjectBillingInfoRequest) Reset ¶
func (m *ListProjectBillingInfoRequest) Reset()
func (*ListProjectBillingInfoRequest) String ¶
func (m *ListProjectBillingInfoRequest) String() string
type ListProjectBillingInfoResponse ¶
type ListProjectBillingInfoResponse struct {
// A list of `ProjectBillingInfo` resources representing the projects
// associated with the billing account.
ProjectBillingInfo []*ProjectBillingInfo `protobuf:"bytes,1,rep,name=project_billing_info,json=projectBillingInfo" json:"project_billing_info,omitempty"`
// A token to retrieve the next page of results. To retrieve the next page,
// call `ListProjectBillingInfo` again with the `page_token` field set to this
// value. This field is empty if there are no more results to retrieve.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}
Request message for `ListProjectBillingInfoResponse`.
func (*ListProjectBillingInfoResponse) Descriptor ¶
func (*ListProjectBillingInfoResponse) Descriptor() ([]byte, []int)
func (*ListProjectBillingInfoResponse) GetNextPageToken ¶
func (m *ListProjectBillingInfoResponse) GetNextPageToken() string
func (*ListProjectBillingInfoResponse) GetProjectBillingInfo ¶
func (m *ListProjectBillingInfoResponse) GetProjectBillingInfo() []*ProjectBillingInfo
func (*ListProjectBillingInfoResponse) ProtoMessage ¶
func (*ListProjectBillingInfoResponse) ProtoMessage()
func (*ListProjectBillingInfoResponse) Reset ¶
func (m *ListProjectBillingInfoResponse) Reset()
func (*ListProjectBillingInfoResponse) String ¶
func (m *ListProjectBillingInfoResponse) String() string
type ProjectBillingInfo ¶
type ProjectBillingInfo struct {
// The resource name for the `ProjectBillingInfo`; has the form
// `projects/{project_id}/billingInfo`. For example, the resource name for the
// billing information for project `tokyo-rain-123` would be
// `projects/tokyo-rain-123/billingInfo`. This field is read-only.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The ID of the project that this `ProjectBillingInfo` represents, such as
// `tokyo-rain-123`. This is a convenience field so that you don't need to
// parse the `name` field to obtain a project ID. This field is read-only.
ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
// The resource name of the billing account associated with the project, if
// any. For example, `billingAccounts/012345-567890-ABCDEF`.
BillingAccountName string `protobuf:"bytes,3,opt,name=billing_account_name,json=billingAccountName" json:"billing_account_name,omitempty"`
// True if the project is associated with an open billing account, to which
// usage on the project is charged. False if the project is associated with a
// closed billing account, or no billing account at all, and therefore cannot
// use paid services. This field is read-only.
BillingEnabled bool `protobuf:"varint,4,opt,name=billing_enabled,json=billingEnabled" json:"billing_enabled,omitempty"`
}
Encapsulation of billing information for a Cloud Console project. A project has at most one associated billing account at a time (but a billing account can be assigned to multiple projects).
func (*ProjectBillingInfo) Descriptor ¶
func (*ProjectBillingInfo) Descriptor() ([]byte, []int)
func (*ProjectBillingInfo) GetBillingAccountName ¶
func (m *ProjectBillingInfo) GetBillingAccountName() string
func (*ProjectBillingInfo) GetBillingEnabled ¶
func (m *ProjectBillingInfo) GetBillingEnabled() bool
func (*ProjectBillingInfo) GetName ¶
func (m *ProjectBillingInfo) GetName() string
func (*ProjectBillingInfo) GetProjectId ¶
func (m *ProjectBillingInfo) GetProjectId() string
func (*ProjectBillingInfo) ProtoMessage ¶
func (*ProjectBillingInfo) ProtoMessage()
func (*ProjectBillingInfo) Reset ¶
func (m *ProjectBillingInfo) Reset()
func (*ProjectBillingInfo) String ¶
func (m *ProjectBillingInfo) String() string
type UpdateProjectBillingInfoRequest ¶
type UpdateProjectBillingInfoRequest struct {
// The resource name of the project associated with the billing information
// that you want to update. For example, `projects/tokyo-rain-123`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The new billing information for the project. Read-only fields are ignored;
// thus, you may leave empty all fields except `billing_account_name`.
ProjectBillingInfo *ProjectBillingInfo `protobuf:"bytes,2,opt,name=project_billing_info,json=projectBillingInfo" json:"project_billing_info,omitempty"`
}
Request message for `UpdateProjectBillingInfo`.
func (*UpdateProjectBillingInfoRequest) Descriptor ¶
func (*UpdateProjectBillingInfoRequest) Descriptor() ([]byte, []int)
func (*UpdateProjectBillingInfoRequest) GetName ¶
func (m *UpdateProjectBillingInfoRequest) GetName() string
func (*UpdateProjectBillingInfoRequest) GetProjectBillingInfo ¶
func (m *UpdateProjectBillingInfoRequest) GetProjectBillingInfo() *ProjectBillingInfo
func (*UpdateProjectBillingInfoRequest) ProtoMessage ¶
func (*UpdateProjectBillingInfoRequest) ProtoMessage()
func (*UpdateProjectBillingInfoRequest) Reset ¶
func (m *UpdateProjectBillingInfoRequest) Reset()
func (*UpdateProjectBillingInfoRequest) String ¶
func (m *UpdateProjectBillingInfoRequest) String() string