Class Filter (2.31.0)

public final class Filter extends GeneratedMessageV3 implements FilterOrBuilder

A filter for a budget, limiting the scope of the cost to calculate.

Protobuf type google.cloud.billing.budgets.v1.Filter

Implements

FilterOrBuilder

Static Fields

CALENDAR_PERIOD_FIELD_NUMBER

public static final int CALENDAR_PERIOD_FIELD_NUMBER
Field Value
TypeDescription
int

CREDIT_TYPES_FIELD_NUMBER

public static final int CREDIT_TYPES_FIELD_NUMBER
Field Value
TypeDescription
int

CREDIT_TYPES_TREATMENT_FIELD_NUMBER

public static final int CREDIT_TYPES_TREATMENT_FIELD_NUMBER
Field Value
TypeDescription
int

CUSTOM_PERIOD_FIELD_NUMBER

public static final int CUSTOM_PERIOD_FIELD_NUMBER
Field Value
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

PROJECTS_FIELD_NUMBER

public static final int PROJECTS_FIELD_NUMBER
Field Value
TypeDescription
int

RESOURCE_ANCESTORS_FIELD_NUMBER

public static final int RESOURCE_ANCESTORS_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICES_FIELD_NUMBER

public static final int SERVICES_FIELD_NUMBER
Field Value
TypeDescription
int

SUBACCOUNTS_FIELD_NUMBER

public static final int SUBACCOUNTS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Filter getDefaultInstance()
Returns
TypeDescription
Filter

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Filter.Builder newBuilder()
Returns
TypeDescription
Filter.Builder

newBuilder(Filter prototype)

public static Filter.Builder newBuilder(Filter prototype)
Parameter
NameDescription
prototypeFilter
Returns
TypeDescription
Filter.Builder

parseDelimitedFrom(InputStream input)

public static Filter parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Filter
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Filter parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Filter
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Filter parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Filter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Filter parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Filter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Filter parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Filter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Filter parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Filter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Filter parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Filter
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Filter parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Filter
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Filter parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Filter
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Filter parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Filter
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Filter parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Filter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Filter parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Filter
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Filter> parser()
Returns
TypeDescription
Parser<Filter>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. If omitted, the report includes all labeled and unlabeled usage.

An object containing a single "key": value pair. Example: { "name": "wrench" }.

Currently, multiple entries or multiple values per entry are not allowed.

map<string, .google.protobuf.ListValue> labels = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCalendarPeriod()

public CalendarPeriod getCalendarPeriod()

Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget tracks usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it tracks usage from July 1 to September 30 when the current calendar month is July, August, September, so on.

.google.cloud.billing.budgets.v1.CalendarPeriod calendar_period = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
CalendarPeriod

The calendarPeriod.

getCalendarPeriodValue()

public int getCalendarPeriodValue()

Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget tracks usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it tracks usage from July 1 to September 30 when the current calendar month is July, August, September, so on.

.google.cloud.billing.budgets.v1.CalendarPeriod calendar_period = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The enum numeric value on the wire for calendarPeriod.

getCreditTypes(int index)

public String getCreditTypes(int index)

Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. See a list of acceptable credit type values.

If Filter.credit_types_treatment is not INCLUDE_SPECIFIED_CREDITS, this field must be empty.

repeated string credit_types = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The creditTypes at the given index.

getCreditTypesBytes(int index)

public ByteString getCreditTypesBytes(int index)

Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. See a list of acceptable credit type values.

If Filter.credit_types_treatment is not INCLUDE_SPECIFIED_CREDITS, this field must be empty.

repeated string credit_types = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the creditTypes at the given index.

getCreditTypesCount()

public int getCreditTypesCount()

Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. See a list of acceptable credit type values.

If Filter.credit_types_treatment is not INCLUDE_SPECIFIED_CREDITS, this field must be empty.

repeated string credit_types = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of creditTypes.

getCreditTypesList()

public ProtocolStringList getCreditTypesList()

Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. See a list of acceptable credit type values.

If Filter.credit_types_treatment is not INCLUDE_SPECIFIED_CREDITS, this field must be empty.

repeated string credit_types = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the creditTypes.

getCreditTypesTreatment()

public Filter.CreditTypesTreatment getCreditTypesTreatment()

Optional. If not set, default behavior is INCLUDE_ALL_CREDITS.

.google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment credit_types_treatment = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Filter.CreditTypesTreatment

The creditTypesTreatment.

getCreditTypesTreatmentValue()

public int getCreditTypesTreatmentValue()

Optional. If not set, default behavior is INCLUDE_ALL_CREDITS.

.google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment credit_types_treatment = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The enum numeric value on the wire for creditTypesTreatment.

getCustomPeriod()

public CustomPeriod getCustomPeriod()

Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.

.google.cloud.billing.budgets.v1.CustomPeriod custom_period = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
CustomPeriod

The customPeriod.

getCustomPeriodOrBuilder()

public CustomPeriodOrBuilder getCustomPeriodOrBuilder()

Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.

.google.cloud.billing.budgets.v1.CustomPeriod custom_period = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
CustomPeriodOrBuilder

getDefaultInstanceForType()

public Filter getDefaultInstanceForType()
Returns
TypeDescription
Filter

getLabels() (deprecated)

public Map<String,ListValue> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,ListValue>

getLabelsCount()

public int getLabelsCount()

Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. If omitted, the report includes all labeled and unlabeled usage.

An object containing a single "key": value pair. Example: { "name": "wrench" }.

Currently, multiple entries or multiple values per entry are not allowed.

map<string, .google.protobuf.ListValue> labels = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

getLabelsMap()

public Map<String,ListValue> getLabelsMap()

Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. If omitted, the report includes all labeled and unlabeled usage.

An object containing a single "key": value pair. Example: { "name": "wrench" }.

Currently, multiple entries or multiple values per entry are not allowed.

map<string, .google.protobuf.ListValue> labels = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Map<String,ListValue>

getLabelsOrDefault(String key, ListValue defaultValue)

public ListValue getLabelsOrDefault(String key, ListValue defaultValue)

Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. If omitted, the report includes all labeled and unlabeled usage.

An object containing a single "key": value pair. Example: { "name": "wrench" }.

Currently, multiple entries or multiple values per entry are not allowed.

map<string, .google.protobuf.ListValue> labels = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
keyString
defaultValueListValue
Returns
TypeDescription
ListValue

getLabelsOrThrow(String key)

public ListValue getLabelsOrThrow(String key)

Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. If omitted, the report includes all labeled and unlabeled usage.

An object containing a single "key": value pair. Example: { "name": "wrench" }.

Currently, multiple entries or multiple values per entry are not allowed.

map<string, .google.protobuf.ListValue> labels = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
ListValue

getParserForType()

public Parser<Filter> getParserForType()
Returns
TypeDescription
Parser<Filter>
Overrides

getProjects(int index)

public String getProjects(int index)

Optional. A set of projects of the form projects/{project}, specifying that usage from only this set of projects should be included in the budget. If omitted, the report includes all usage for the billing account, regardless of which project the usage occurred on.

repeated string projects = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The projects at the given index.

getProjectsBytes(int index)

public ByteString getProjectsBytes(int index)

Optional. A set of projects of the form projects/{project}, specifying that usage from only this set of projects should be included in the budget. If omitted, the report includes all usage for the billing account, regardless of which project the usage occurred on.

repeated string projects = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the projects at the given index.

getProjectsCount()

public int getProjectsCount()

Optional. A set of projects of the form projects/{project}, specifying that usage from only this set of projects should be included in the budget. If omitted, the report includes all usage for the billing account, regardless of which project the usage occurred on.

repeated string projects = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of projects.

getProjectsList()

public ProtocolStringList getProjectsList()

Optional. A set of projects of the form projects/{project}, specifying that usage from only this set of projects should be included in the budget. If omitted, the report includes all usage for the billing account, regardless of which project the usage occurred on.

repeated string projects = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the projects.

getResourceAncestors(int index)

public String getResourceAncestors(int index)

Optional. A set of folder and organization names of the form folders/{folderId} or organizations/{organizationId}, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the budget includes all usage that the billing account pays for. If the folder or organization contains projects that are paid for by a different Cloud Billing account, the budget doesn't apply to those projects.

repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The resourceAncestors at the given index.

getResourceAncestorsBytes(int index)

public ByteString getResourceAncestorsBytes(int index)

Optional. A set of folder and organization names of the form folders/{folderId} or organizations/{organizationId}, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the budget includes all usage that the billing account pays for. If the folder or organization contains projects that are paid for by a different Cloud Billing account, the budget doesn't apply to those projects.

repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the resourceAncestors at the given index.

getResourceAncestorsCount()

public int getResourceAncestorsCount()

Optional. A set of folder and organization names of the form folders/{folderId} or organizations/{organizationId}, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the budget includes all usage that the billing account pays for. If the folder or organization contains projects that are paid for by a different Cloud Billing account, the budget doesn't apply to those projects.

repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of resourceAncestors.

getResourceAncestorsList()

public ProtocolStringList getResourceAncestorsList()

Optional. A set of folder and organization names of the form folders/{folderId} or organizations/{organizationId}, specifying that usage from only this set of folders and organizations should be included in the budget. If omitted, the budget includes all usage that the billing account pays for. If the folder or organization contains projects that are paid for by a different Cloud Billing account, the budget doesn't apply to those projects.

repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the resourceAncestors.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getServices(int index)

public String getServices(int index)

Optional. A set of services of the form services/{service_id}, specifying that usage from only this set of services should be included in the budget. If omitted, the report includes usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.

repeated string services = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The services at the given index.

getServicesBytes(int index)

public ByteString getServicesBytes(int index)

Optional. A set of services of the form services/{service_id}, specifying that usage from only this set of services should be included in the budget. If omitted, the report includes usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.

repeated string services = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the services at the given index.

getServicesCount()

public int getServicesCount()

Optional. A set of services of the form services/{service_id}, specifying that usage from only this set of services should be included in the budget. If omitted, the report includes usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.

repeated string services = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of services.

getServicesList()

public ProtocolStringList getServicesList()

Optional. A set of services of the form services/{service_id}, specifying that usage from only this set of services should be included in the budget. If omitted, the report includes usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.

repeated string services = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the services.

getSubaccounts(int index)

public String getSubaccounts(int index)

Optional. A set of subaccounts of the form billingAccounts/{account_id}, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account is included. If the field is omitted, the report includes usage from the parent account and all subaccounts, if they exist.

repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The subaccounts at the given index.

getSubaccountsBytes(int index)

public ByteString getSubaccountsBytes(int index)

Optional. A set of subaccounts of the form billingAccounts/{account_id}, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account is included. If the field is omitted, the report includes usage from the parent account and all subaccounts, if they exist.

repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the subaccounts at the given index.

getSubaccountsCount()

public int getSubaccountsCount()

Optional. A set of subaccounts of the form billingAccounts/{account_id}, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account is included. If the field is omitted, the report includes usage from the parent account and all subaccounts, if they exist.

repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of subaccounts.

getSubaccountsList()

public ProtocolStringList getSubaccountsList()

Optional. A set of subaccounts of the form billingAccounts/{account_id}, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account is included. If the field is omitted, the report includes usage from the parent account and all subaccounts, if they exist.

repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the subaccounts.

getUsagePeriodCase()

public Filter.UsagePeriodCase getUsagePeriodCase()
Returns
TypeDescription
Filter.UsagePeriodCase

hasCalendarPeriod()

public boolean hasCalendarPeriod()

Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget tracks usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it tracks usage from July 1 to September 30 when the current calendar month is July, August, September, so on.

.google.cloud.billing.budgets.v1.CalendarPeriod calendar_period = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the calendarPeriod field is set.

hasCustomPeriod()

public boolean hasCustomPeriod()

Optional. Specifies to track usage from any start date (required) to any end date (optional). This time period is static, it does not recur.

.google.cloud.billing.budgets.v1.CustomPeriod custom_period = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the customPeriod field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Filter.Builder newBuilderForType()
Returns
TypeDescription
Filter.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Filter.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Filter.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Filter.Builder toBuilder()
Returns
TypeDescription
Filter.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException