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
Name
Description
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
Type
Description
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
Name
Description
var
string
Returns
Type
Description
$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
Type
Description
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
Name
Description
var
string
Returns
Type
Description
$this
getBillingAccountName
The resource name of the billing account associated with the project, if
any. For example, billingAccounts/012345-567890-ABCDEF.
Returns
Type
Description
string
setBillingAccountName
The resource name of the billing account associated with the project, if
any. For example, billingAccounts/012345-567890-ABCDEF.
Parameter
Name
Description
var
string
Returns
Type
Description
$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
Type
Description
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Billing V1 Client - Class ProjectBillingInfo (2.1.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.3 (latest)](/php/docs/reference/cloud-billing/latest/V1.ProjectBillingInfo)\n- [2.1.2](/php/docs/reference/cloud-billing/2.1.2/V1.ProjectBillingInfo)\n- [2.0.1](/php/docs/reference/cloud-billing/2.0.1/V1.ProjectBillingInfo)\n- [1.9.8](/php/docs/reference/cloud-billing/1.9.8/V1.ProjectBillingInfo)\n- [1.8.0](/php/docs/reference/cloud-billing/1.8.0/V1.ProjectBillingInfo)\n- [1.7.5](/php/docs/reference/cloud-billing/1.7.5/V1.ProjectBillingInfo)\n- [1.6.0](/php/docs/reference/cloud-billing/1.6.0/V1.ProjectBillingInfo)\n- [1.5.6](/php/docs/reference/cloud-billing/1.5.6/V1.ProjectBillingInfo) \nReference documentation and code samples for the Google Cloud Billing V1 Client class ProjectBillingInfo.\n\nEncapsulation of billing information for a Google Cloud Console project. A\nproject has at most one associated billing account at a time (but a billing\naccount can be assigned to multiple projects).\n\nGenerated from protobuf message `google.cloud.billing.v1.ProjectBillingInfo`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Billing \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOutput only. The resource name for the `ProjectBillingInfo`; has the form\n`projects/{project_id}/billingInfo`. For example, the resource name for the\nbilling information for project `tokyo-rain-123` would be\n`projects/tokyo-rain-123/billingInfo`.\n\n### setName\n\nOutput only. The resource name for the `ProjectBillingInfo`; has the form\n`projects/{project_id}/billingInfo`. For example, the resource name for the\nbilling information for project `tokyo-rain-123` would be\n`projects/tokyo-rain-123/billingInfo`.\n\n### getProjectId\n\nOutput only. The ID of the project that this `ProjectBillingInfo`\nrepresents, such as `tokyo-rain-123`. This is a convenience field so that\nyou don't need to parse the `name` field to obtain a project ID.\n\n### setProjectId\n\nOutput only. The ID of the project that this `ProjectBillingInfo`\nrepresents, such as `tokyo-rain-123`. This is a convenience field so that\nyou don't need to parse the `name` field to obtain a project ID.\n\n### getBillingAccountName\n\nThe resource name of the billing account associated with the project, if\nany. For example, `billingAccounts/012345-567890-ABCDEF`.\n\n### setBillingAccountName\n\nThe resource name of the billing account associated with the project, if\nany. For example, `billingAccounts/012345-567890-ABCDEF`.\n\n### getBillingEnabled\n\nOutput only. True if the project is associated with an open billing\naccount, to which usage on the project is charged. False if the project is\nassociated with a closed billing account, or no billing account at all, and\ntherefore cannot use paid services.\n\n### setBillingEnabled\n\nOutput only. True if the project is associated with an open billing\naccount, to which usage on the project is charged. False if the project is\nassociated with a closed billing account, or no billing account at all, and\ntherefore cannot use paid services."]]