Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ service CloudBilling {
// Lists the billing accounts that the current authenticated user has
// permission to
// [view](https://cloud.google.com/billing/docs/how-to/billing-access).
rpc ListBillingAccounts(ListBillingAccountsRequest) returns (ListBillingAccountsResponse) {
rpc ListBillingAccounts(ListBillingAccountsRequest)
returns (ListBillingAccountsResponse) {
option (google.api.http) = {
get: "/v1/billingAccounts"
};
Expand All @@ -64,7 +65,8 @@ service CloudBilling {
// IAM permission, which is typically given to the
// [administrator](https://cloud.google.com/billing/docs/how-to/billing-access)
// of the billing account.
rpc UpdateBillingAccount(UpdateBillingAccountRequest) returns (BillingAccount) {
rpc UpdateBillingAccount(UpdateBillingAccountRequest)
returns (BillingAccount) {
option (google.api.http) = {
patch: "/v1/{name=billingAccounts/*}"
body: "account"
Expand All @@ -87,7 +89,8 @@ service CloudBilling {
// [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
// This method will return an error if the parent account has not been
// provisioned as a reseller account.
rpc CreateBillingAccount(CreateBillingAccountRequest) returns (BillingAccount) {
rpc CreateBillingAccount(CreateBillingAccountRequest)
returns (BillingAccount) {
option (google.api.http) = {
post: "/v1/billingAccounts"
body: "billing_account"
Expand All @@ -99,7 +102,8 @@ service CloudBilling {
// authenticated user must have the `billing.resourceAssociations.list` IAM
// permission, which is often given to billing account
// [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
rpc ListProjectBillingInfo(ListProjectBillingInfoRequest) returns (ListProjectBillingInfoResponse) {
rpc ListProjectBillingInfo(ListProjectBillingInfoRequest)
returns (ListProjectBillingInfoResponse) {
option (google.api.http) = {
get: "/v1/{name=billingAccounts/*}/projects"
};
Expand All @@ -111,7 +115,8 @@ service CloudBilling {
// which can be granted by assigning the [Project
// Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles)
// role.
rpc GetProjectBillingInfo(GetProjectBillingInfoRequest) returns (ProjectBillingInfo) {
rpc GetProjectBillingInfo(GetProjectBillingInfoRequest)
returns (ProjectBillingInfo) {
option (google.api.http) = {
get: "/v1/{name=projects/*}/billingInfo"
};
Expand Down Expand Up @@ -149,7 +154,8 @@ service CloudBilling {
// 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.
rpc UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest) returns (ProjectBillingInfo) {
rpc UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest)
returns (ProjectBillingInfo) {
option (google.api.http) = {
put: "/v1/{name=projects/*}/billingInfo"
body: "project_billing_info"
Expand All @@ -161,7 +167,8 @@ service CloudBilling {
// The caller must have the `billing.accounts.getIamPolicy` permission on the
// account, which is often given to billing account
// [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
returns (google.iam.v1.Policy) {
option (google.api.http) = {
get: "/v1/{resource=billingAccounts/*}:getIamPolicy"
};
Expand All @@ -173,7 +180,8 @@ service CloudBilling {
// The caller must have the `billing.accounts.setIamPolicy` permission on the
// account, which is often given to billing account
// [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v1/{resource=billingAccounts/*}:setIamPolicy"
body: "*"
Expand All @@ -184,7 +192,8 @@ service CloudBilling {
// Tests the access control policy for a billing account. This method takes
// the resource and a set of permissions as input and returns the subset of
// the input permissions that the caller is allowed for that resource.
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
returns (google.iam.v1.TestIamPermissionsResponse) {
option (google.api.http) = {
post: "/v1/{resource=billingAccounts/*}:testIamPermissions"
body: "*"
Expand All @@ -197,8 +206,8 @@ service CloudBilling {
// [Google Cloud Console](https://console.cloud.google.com/). You can assign a
// billing account to one or more projects.
message BillingAccount {
// Output only. The resource name of the billing account. The resource name has the form
// `billingAccounts/{billing_account_id}`. For example,
// Output only. 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`.
string name = 1 [
Expand All @@ -208,9 +217,10 @@ message BillingAccount {
}
];

// Output only. 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.
// Output only. 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.
bool open = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// The display name given to the billing account, such as `My Billing
Expand Down Expand Up @@ -253,8 +263,8 @@ message ProjectBillingInfo {

// Request message for `GetBillingAccount`.
message GetBillingAccountRequest {
// Required. The resource name of the billing account to retrieve. For example,
// `billingAccounts/012345-567890-ABCDEF`.
// Required. The resource name of the billing account to retrieve. For
// example, `billingAccounts/012345-567890-ABCDEF`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -313,7 +323,8 @@ message UpdateBillingAccountRequest {
}
];

// Required. The billing account resource to replace the resource on the server.
// Required. The billing account resource to replace the resource on the
// server.
BillingAccount account = 2 [(google.api.field_behavior) = REQUIRED];

// The update mask applied to the resource.
Expand All @@ -323,8 +334,9 @@ message UpdateBillingAccountRequest {

// Request message for `ListProjectBillingInfo`.
message ListProjectBillingInfoRequest {
// Required. The resource name of the billing account associated with the projects that
// you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
// Required. The resource name of the billing account associated with the
// projects that you want to list. For example,
// `billingAccounts/012345-567890-ABCDEF`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -363,8 +375,9 @@ message GetProjectBillingInfoRequest {

// Request message for `UpdateProjectBillingInfo`.
message UpdateProjectBillingInfoRequest {
// Required. The resource name of the project associated with the billing information
// that you want to update. For example, `projects/tokyo-rain-123`.
// Required. The resource name of the project associated with the billing
// information that you want to update. For example,
// `projects/tokyo-rain-123`.
string name = 1 [(google.api.field_behavior) = REQUIRED];

// The new billing information for the project. Read-only fields are ignored;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ function main(name) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the billing account to retrieve. For example,
* `billingAccounts/012345-567890-ABCDEF`.
* Required. The resource name of the billing account to retrieve. For
* example, `billingAccounts/012345-567890-ABCDEF`.
*/
// const name = 'abc123'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ function main(name) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the billing account associated with the projects that
* you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
* Required. The resource name of the billing account associated with the
* projects that you want to list. For example,
* `billingAccounts/012345-567890-ABCDEF`.
*/
// const name = 'abc123'
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ function main(name, account) {
*/
// const name = 'abc123'
/**
* Required. The billing account resource to replace the resource on the server.
* Required. The billing account resource to replace the resource on the
* server.
*/
// const account = {}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ function main(name) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the project associated with the billing information
* that you want to update. For example, `projects/tokyo-rain-123`.
* Required. The resource name of the project associated with the billing
* information that you want to update. For example,
* `projects/tokyo-rain-123`.
*/
// const name = 'abc123'
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"segments": [
{
"start": 25,
"end": 63,
"end": 64,
"type": "FULL"
}
],
Expand Down Expand Up @@ -198,7 +198,7 @@
"segments": [
{
"start": 25,
"end": 67,
"end": 68,
"type": "FULL"
}
],
Expand Down Expand Up @@ -286,7 +286,7 @@
"segments": [
{
"start": 25,
"end": 59,
"end": 60,
"type": "FULL"
}
],
Expand Down
27 changes: 16 additions & 11 deletions packages/google-cloud-billing/src/v1/cloud_billing_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ export class CloudBillingClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The resource name of the billing account to retrieve. For example,
* `billingAccounts/012345-567890-ABCDEF`.
* Required. The resource name of the billing account to retrieve. For
* example, `billingAccounts/012345-567890-ABCDEF`.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
Expand Down Expand Up @@ -460,7 +460,8 @@ export class CloudBillingClient {
* @param {string} request.name
* Required. The name of the billing account resource to be updated.
* @param {google.cloud.billing.v1.BillingAccount} request.account
* Required. The billing account resource to replace the resource on the server.
* Required. The billing account resource to replace the resource on the
* server.
* @param {google.protobuf.FieldMask} request.updateMask
* The update mask applied to the resource.
* Only "display_name" is currently supported.
Expand Down Expand Up @@ -784,8 +785,9 @@ export class CloudBillingClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The resource name of the project associated with the billing information
* that you want to update. For example, `projects/tokyo-rain-123`.
* Required. The resource name of the project associated with the billing
* information that you want to update. For example,
* `projects/tokyo-rain-123`.
* @param {google.cloud.billing.v1.ProjectBillingInfo} request.projectBillingInfo
* The new billing information for the project. Read-only fields are ignored;
* thus, you can leave empty all fields except `billing_account_name`.
Expand Down Expand Up @@ -1376,8 +1378,9 @@ export class CloudBillingClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The resource name of the billing account associated with the projects that
* you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
* Required. The resource name of the billing account associated with the
* projects that you want to list. For example,
* `billingAccounts/012345-567890-ABCDEF`.
* @param {number} request.pageSize
* Requested page size. The maximum page size is 100; this is also the
* default.
Expand Down Expand Up @@ -1482,8 +1485,9 @@ export class CloudBillingClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The resource name of the billing account associated with the projects that
* you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
* Required. The resource name of the billing account associated with the
* projects that you want to list. For example,
* `billingAccounts/012345-567890-ABCDEF`.
* @param {number} request.pageSize
* Requested page size. The maximum page size is 100; this is also the
* default.
Expand Down Expand Up @@ -1532,8 +1536,9 @@ export class CloudBillingClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The resource name of the billing account associated with the projects that
* you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
* Required. The resource name of the billing account associated with the
* projects that you want to list. For example,
* `billingAccounts/012345-567890-ABCDEF`.
* @param {number} request.pageSize
* Requested page size. The maximum page size is 100; this is also the
* default.
Expand Down