Package com.google.cloud.billing.v1
Class BillingAccount.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<BillingAccount.Builder>
com.google.cloud.billing.v1.BillingAccount.Builder
- All Implemented Interfaces:
BillingAccountOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- BillingAccount
public static final class BillingAccount.Builder
extends com.google.protobuf.GeneratedMessage.Builder<BillingAccount.Builder>
implements BillingAccountOrBuilder
A billing account in the [Google Cloud Console](https://console.cloud.google.com/). You can assign a billing account to one or more projects.Protobuf type
google.cloud.billing.v1.BillingAccount-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Optional.The display name given to the billing account, such as `My Billing Account`.If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through.Output only.Output only.Output only.Optional.com.google.protobuf.ByteStringOptional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe display name given to the billing account, such as `My Billing Account`.com.google.protobuf.ByteStringThe display name given to the billing account, such as `My Billing Account`.If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through.com.google.protobuf.ByteStringIf this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through.getName()Output only.com.google.protobuf.ByteStringOutput only.booleangetOpen()Output only.Output only.com.google.protobuf.ByteStringOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(BillingAccount other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setCurrencyCode(String value) Optional.setCurrencyCodeBytes(com.google.protobuf.ByteString value) Optional.setDisplayName(String value) The display name given to the billing account, such as `My Billing Account`.setDisplayNameBytes(com.google.protobuf.ByteString value) The display name given to the billing account, such as `My Billing Account`.setMasterBillingAccount(String value) If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through.setMasterBillingAccountBytes(com.google.protobuf.ByteString value) If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through.Output only.setNameBytes(com.google.protobuf.ByteString value) Output only.setOpen(boolean value) Output only.Output only.setParentBytes(com.google.protobuf.ByteString value) Output only.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<BillingAccount.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<BillingAccount.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<BillingAccount.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<BillingAccount.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<BillingAccount.Builder>
-
mergeFrom
public BillingAccount.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<BillingAccount.Builder>- Throws:
IOException
-
getName
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 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }- Specified by:
getNamein interfaceBillingAccountOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()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 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }- Specified by:
getNameBytesin interfaceBillingAccountOrBuilder- Returns:
- The bytes for name.
-
setName
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 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
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 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setNameBytes
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 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getOpen
public boolean getOpen()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 are unable to use paid services.
bool open = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getOpenin interfaceBillingAccountOrBuilder- Returns:
- The open.
-
setOpen
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 are unable to use paid services.
bool open = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The open to set.- Returns:
- This builder for chaining.
-
clearOpen
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 are unable to use paid services.
bool open = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
getDisplayName
The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console.
string display_name = 3;- Specified by:
getDisplayNamein interfaceBillingAccountOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console.
string display_name = 3;- Specified by:
getDisplayNameBytesin interfaceBillingAccountOrBuilder- Returns:
- The bytes for displayName.
-
setDisplayName
The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console.
string display_name = 3;- Parameters:
value- The displayName to set.- Returns:
- This builder for chaining.
-
clearDisplayName
The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console.
string display_name = 3;- Returns:
- This builder for chaining.
-
setDisplayNameBytes
The display name given to the billing account, such as `My Billing Account`. This name is displayed in the Google Cloud Console.
string display_name = 3;- Parameters:
value- The bytes for displayName to set.- Returns:
- This builder for chaining.
-
getMasterBillingAccount
If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
string master_billing_account = 4;- Specified by:
getMasterBillingAccountin interfaceBillingAccountOrBuilder- Returns:
- The masterBillingAccount.
-
getMasterBillingAccountBytes
public com.google.protobuf.ByteString getMasterBillingAccountBytes()If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
string master_billing_account = 4;- Specified by:
getMasterBillingAccountBytesin interfaceBillingAccountOrBuilder- Returns:
- The bytes for masterBillingAccount.
-
setMasterBillingAccount
If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
string master_billing_account = 4;- Parameters:
value- The masterBillingAccount to set.- Returns:
- This builder for chaining.
-
clearMasterBillingAccount
If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
string master_billing_account = 4;- Returns:
- This builder for chaining.
-
setMasterBillingAccountBytes
If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.
string master_billing_account = 4;- Parameters:
value- The bytes for masterBillingAccount to set.- Returns:
- This builder for chaining.
-
getParent
Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF`string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getParentin interfaceBillingAccountOrBuilder- Returns:
- The parent.
-
getParentBytes
public com.google.protobuf.ByteString getParentBytes()Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF`string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getParentBytesin interfaceBillingAccountOrBuilder- Returns:
- The bytes for parent.
-
setParent
Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF`string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The parent to set.- Returns:
- This builder for chaining.
-
clearParent
Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF`string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setParentBytes
Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - `organizations/{organization_id}`, for example, `organizations/12345678` - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF`string parent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for parent to set.- Returns:
- This builder for chaining.
-
getCurrencyCode
Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account.
string currency_code = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCurrencyCodein interfaceBillingAccountOrBuilder- Returns:
- The currencyCode.
-
getCurrencyCodeBytes
public com.google.protobuf.ByteString getCurrencyCodeBytes()Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account.
string currency_code = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCurrencyCodeBytesin interfaceBillingAccountOrBuilder- Returns:
- The bytes for currencyCode.
-
setCurrencyCode
Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account.
string currency_code = 7 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The currencyCode to set.- Returns:
- This builder for chaining.
-
clearCurrencyCode
Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account.
string currency_code = 7 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setCurrencyCodeBytes
Optional. The currency in which the billing account is billed and charged, represented as an ISO 4217 code such as `USD`. Billing account currency is determined at the time of billing account creation and cannot be updated subsequently, so this field should not be set on update requests. In addition, a subaccount always matches the currency of its parent billing account, so this field should not be set on subaccount creation requests. Clients can read this field to determine the currency of an existing billing account.
string currency_code = 7 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for currencyCode to set.- Returns:
- This builder for chaining.
-