Google Cloud Billing V1 Client - Class ProjectBillingInfo (1.7.5)

Reference documentation and code samples for the Google Cloud Billing V1 Client class ProjectBillingInfo.

Encapsulation of billing information for a Google 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).

Generated from protobuf message google.cloud.billing.v1.ProjectBillingInfo

Namespace

Google \ Cloud \ Billing \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. 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.

↳ project_id string

Output only. 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.

↳ billing_account_name string

The resource name of the billing account associated with the project, if any. For example, billingAccounts/012345-567890-ABCDEF.

↳ billing_enabled bool

Output only. 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.

getName

Output only. 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.

Returns
TypeDescription
string

setName

Output only. 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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getProjectId

Output only. 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.

Returns
TypeDescription
string

setProjectId

Output only. 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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getBillingAccountName

The resource name of the billing account associated with the project, if any. For example, billingAccounts/012345-567890-ABCDEF.

Returns
TypeDescription
string

setBillingAccountName

The resource name of the billing account associated with the project, if any. For example, billingAccounts/012345-567890-ABCDEF.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getBillingEnabled

Output only. 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.

Returns
TypeDescription
bool

setBillingEnabled

Output only. 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.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this