1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691
|
// Code generated by protoc-gen-go.
// source: google.golang.org/genproto/googleapis/cloud/billing/v1/cloud_billing.proto
// DO NOT EDIT!
/*
Package google_cloud_billing_v1 is a generated protocol buffer package.
It is generated from these files:
google.golang.org/genproto/googleapis/cloud/billing/v1/cloud_billing.proto
It has these top-level messages:
BillingAccount
ProjectBillingInfo
GetBillingAccountRequest
ListBillingAccountsRequest
ListBillingAccountsResponse
ListProjectBillingInfoRequest
ListProjectBillingInfoResponse
GetProjectBillingInfoRequest
UpdateProjectBillingInfoRequest
*/
package google_cloud_billing_v1
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/serviceconfig"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// A billing account in [Google Cloud
// Console](https://console.cloud.google.com/). You can assign a billing account
// to one or more projects.
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"`
}
func (m *BillingAccount) Reset() { *m = BillingAccount{} }
func (m *BillingAccount) String() string { return proto.CompactTextString(m) }
func (*BillingAccount) ProtoMessage() {}
func (*BillingAccount) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *BillingAccount) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *BillingAccount) GetOpen() bool {
if m != nil {
return m.Open
}
return false
}
func (m *BillingAccount) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
// 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).
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"`
}
func (m *ProjectBillingInfo) Reset() { *m = ProjectBillingInfo{} }
func (m *ProjectBillingInfo) String() string { return proto.CompactTextString(m) }
func (*ProjectBillingInfo) ProtoMessage() {}
func (*ProjectBillingInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *ProjectBillingInfo) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ProjectBillingInfo) GetProjectId() string {
if m != nil {
return m.ProjectId
}
return ""
}
func (m *ProjectBillingInfo) GetBillingAccountName() string {
if m != nil {
return m.BillingAccountName
}
return ""
}
func (m *ProjectBillingInfo) GetBillingEnabled() bool {
if m != nil {
return m.BillingEnabled
}
return false
}
// Request message for `GetBillingAccount`.
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"`
}
func (m *GetBillingAccountRequest) Reset() { *m = GetBillingAccountRequest{} }
func (m *GetBillingAccountRequest) String() string { return proto.CompactTextString(m) }
func (*GetBillingAccountRequest) ProtoMessage() {}
func (*GetBillingAccountRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *GetBillingAccountRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// Request message for `ListBillingAccounts`.
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"`
}
func (m *ListBillingAccountsRequest) Reset() { *m = ListBillingAccountsRequest{} }
func (m *ListBillingAccountsRequest) String() string { return proto.CompactTextString(m) }
func (*ListBillingAccountsRequest) ProtoMessage() {}
func (*ListBillingAccountsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *ListBillingAccountsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListBillingAccountsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// Response message for `ListBillingAccounts`.
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"`
}
func (m *ListBillingAccountsResponse) Reset() { *m = ListBillingAccountsResponse{} }
func (m *ListBillingAccountsResponse) String() string { return proto.CompactTextString(m) }
func (*ListBillingAccountsResponse) ProtoMessage() {}
func (*ListBillingAccountsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *ListBillingAccountsResponse) GetBillingAccounts() []*BillingAccount {
if m != nil {
return m.BillingAccounts
}
return nil
}
func (m *ListBillingAccountsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// Request message for `ListProjectBillingInfo`.
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"`
}
func (m *ListProjectBillingInfoRequest) Reset() { *m = ListProjectBillingInfoRequest{} }
func (m *ListProjectBillingInfoRequest) String() string { return proto.CompactTextString(m) }
func (*ListProjectBillingInfoRequest) ProtoMessage() {}
func (*ListProjectBillingInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *ListProjectBillingInfoRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ListProjectBillingInfoRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListProjectBillingInfoRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// Request message for `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"`
}
func (m *ListProjectBillingInfoResponse) Reset() { *m = ListProjectBillingInfoResponse{} }
func (m *ListProjectBillingInfoResponse) String() string { return proto.CompactTextString(m) }
func (*ListProjectBillingInfoResponse) ProtoMessage() {}
func (*ListProjectBillingInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *ListProjectBillingInfoResponse) GetProjectBillingInfo() []*ProjectBillingInfo {
if m != nil {
return m.ProjectBillingInfo
}
return nil
}
func (m *ListProjectBillingInfoResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// Request message for `GetProjectBillingInfo`.
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"`
}
func (m *GetProjectBillingInfoRequest) Reset() { *m = GetProjectBillingInfoRequest{} }
func (m *GetProjectBillingInfoRequest) String() string { return proto.CompactTextString(m) }
func (*GetProjectBillingInfoRequest) ProtoMessage() {}
func (*GetProjectBillingInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *GetProjectBillingInfoRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// Request message for `UpdateProjectBillingInfo`.
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"`
}
func (m *UpdateProjectBillingInfoRequest) Reset() { *m = UpdateProjectBillingInfoRequest{} }
func (m *UpdateProjectBillingInfoRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateProjectBillingInfoRequest) ProtoMessage() {}
func (*UpdateProjectBillingInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *UpdateProjectBillingInfoRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *UpdateProjectBillingInfoRequest) GetProjectBillingInfo() *ProjectBillingInfo {
if m != nil {
return m.ProjectBillingInfo
}
return nil
}
func init() {
proto.RegisterType((*BillingAccount)(nil), "google.cloud.billing.v1.BillingAccount")
proto.RegisterType((*ProjectBillingInfo)(nil), "google.cloud.billing.v1.ProjectBillingInfo")
proto.RegisterType((*GetBillingAccountRequest)(nil), "google.cloud.billing.v1.GetBillingAccountRequest")
proto.RegisterType((*ListBillingAccountsRequest)(nil), "google.cloud.billing.v1.ListBillingAccountsRequest")
proto.RegisterType((*ListBillingAccountsResponse)(nil), "google.cloud.billing.v1.ListBillingAccountsResponse")
proto.RegisterType((*ListProjectBillingInfoRequest)(nil), "google.cloud.billing.v1.ListProjectBillingInfoRequest")
proto.RegisterType((*ListProjectBillingInfoResponse)(nil), "google.cloud.billing.v1.ListProjectBillingInfoResponse")
proto.RegisterType((*GetProjectBillingInfoRequest)(nil), "google.cloud.billing.v1.GetProjectBillingInfoRequest")
proto.RegisterType((*UpdateProjectBillingInfoRequest)(nil), "google.cloud.billing.v1.UpdateProjectBillingInfoRequest")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for CloudBilling service
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)
}
type cloudBillingClient struct {
cc *grpc.ClientConn
}
func NewCloudBillingClient(cc *grpc.ClientConn) CloudBillingClient {
return &cloudBillingClient{cc}
}
func (c *cloudBillingClient) GetBillingAccount(ctx context.Context, in *GetBillingAccountRequest, opts ...grpc.CallOption) (*BillingAccount, error) {
out := new(BillingAccount)
err := grpc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/GetBillingAccount", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cloudBillingClient) ListBillingAccounts(ctx context.Context, in *ListBillingAccountsRequest, opts ...grpc.CallOption) (*ListBillingAccountsResponse, error) {
out := new(ListBillingAccountsResponse)
err := grpc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/ListBillingAccounts", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cloudBillingClient) ListProjectBillingInfo(ctx context.Context, in *ListProjectBillingInfoRequest, opts ...grpc.CallOption) (*ListProjectBillingInfoResponse, error) {
out := new(ListProjectBillingInfoResponse)
err := grpc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/ListProjectBillingInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cloudBillingClient) GetProjectBillingInfo(ctx context.Context, in *GetProjectBillingInfoRequest, opts ...grpc.CallOption) (*ProjectBillingInfo, error) {
out := new(ProjectBillingInfo)
err := grpc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/GetProjectBillingInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cloudBillingClient) UpdateProjectBillingInfo(ctx context.Context, in *UpdateProjectBillingInfoRequest, opts ...grpc.CallOption) (*ProjectBillingInfo, error) {
out := new(ProjectBillingInfo)
err := grpc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/UpdateProjectBillingInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for CloudBilling service
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)
}
func RegisterCloudBillingServer(s *grpc.Server, srv CloudBillingServer) {
s.RegisterService(&_CloudBilling_serviceDesc, srv)
}
func _CloudBilling_GetBillingAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBillingAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CloudBillingServer).GetBillingAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.billing.v1.CloudBilling/GetBillingAccount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CloudBillingServer).GetBillingAccount(ctx, req.(*GetBillingAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CloudBilling_ListBillingAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListBillingAccountsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CloudBillingServer).ListBillingAccounts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.billing.v1.CloudBilling/ListBillingAccounts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CloudBillingServer).ListBillingAccounts(ctx, req.(*ListBillingAccountsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CloudBilling_ListProjectBillingInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListProjectBillingInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CloudBillingServer).ListProjectBillingInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.billing.v1.CloudBilling/ListProjectBillingInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CloudBillingServer).ListProjectBillingInfo(ctx, req.(*ListProjectBillingInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CloudBilling_GetProjectBillingInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetProjectBillingInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CloudBillingServer).GetProjectBillingInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.billing.v1.CloudBilling/GetProjectBillingInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CloudBillingServer).GetProjectBillingInfo(ctx, req.(*GetProjectBillingInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CloudBilling_UpdateProjectBillingInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateProjectBillingInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CloudBillingServer).UpdateProjectBillingInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.billing.v1.CloudBilling/UpdateProjectBillingInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CloudBillingServer).UpdateProjectBillingInfo(ctx, req.(*UpdateProjectBillingInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
var _CloudBilling_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.billing.v1.CloudBilling",
HandlerType: (*CloudBillingServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetBillingAccount",
Handler: _CloudBilling_GetBillingAccount_Handler,
},
{
MethodName: "ListBillingAccounts",
Handler: _CloudBilling_ListBillingAccounts_Handler,
},
{
MethodName: "ListProjectBillingInfo",
Handler: _CloudBilling_ListProjectBillingInfo_Handler,
},
{
MethodName: "GetProjectBillingInfo",
Handler: _CloudBilling_GetProjectBillingInfo_Handler,
},
{
MethodName: "UpdateProjectBillingInfo",
Handler: _CloudBilling_UpdateProjectBillingInfo_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google.golang.org/genproto/googleapis/cloud/billing/v1/cloud_billing.proto",
}
func init() {
proto.RegisterFile("google.golang.org/genproto/googleapis/cloud/billing/v1/cloud_billing.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 670 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x55, 0xdf, 0x4e, 0xd4, 0x4e,
0x14, 0xce, 0x00, 0x3f, 0xc2, 0x1e, 0xf8, 0x81, 0x0c, 0xa0, 0x9b, 0x5d, 0x40, 0xa8, 0x7f, 0x40,
0x8d, 0xad, 0x2c, 0xfe, 0x4f, 0x8c, 0x11, 0x63, 0x08, 0xc6, 0x98, 0xcd, 0xaa, 0x89, 0x89, 0x31,
0x9b, 0xd9, 0xee, 0xd0, 0x8c, 0x96, 0x99, 0xba, 0x53, 0x88, 0x62, 0xbc, 0xf1, 0x15, 0xd4, 0x0b,
0x2f, 0xbc, 0xf1, 0x42, 0x5f, 0xc1, 0x6b, 0x5f, 0xc1, 0x57, 0xf0, 0xde, 0x57, 0x30, 0x33, 0x9d,
0x2a, 0xdb, 0xed, 0x2c, 0xdb, 0x78, 0xd7, 0x7c, 0x33, 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