Class protos.google.cloud.billing.budgets.v1beta1.Budget (4.2.2)

Represents a Budget.

Package

@google-cloud/billing-budgets

Constructors

(constructor)(properties)

constructor(properties?: google.cloud.billing.budgets.v1beta1.IBudget);

Constructs a new Budget.

Parameter
NameDescription
properties IBudget

Properties to set

Properties

allUpdatesRule

public allUpdatesRule?: (google.cloud.billing.budgets.v1beta1.IAllUpdatesRule|null);

Budget allUpdatesRule.

amount

public amount?: (google.cloud.billing.budgets.v1beta1.IBudgetAmount|null);

Budget amount.

budgetFilter

public budgetFilter?: (google.cloud.billing.budgets.v1beta1.IFilter|null);

Budget budgetFilter.

displayName

public displayName: string;

Budget displayName.

etag

public etag: string;

Budget etag.

name

public name: string;

Budget name.

thresholdRules

public thresholdRules: google.cloud.billing.budgets.v1beta1.IThresholdRule[];

Budget thresholdRules.

Methods

create(properties)

public static create(properties?: google.cloud.billing.budgets.v1beta1.IBudget): google.cloud.billing.budgets.v1beta1.Budget;

Creates a new Budget instance using the specified properties.

Parameter
NameDescription
properties IBudget

Properties to set

Returns
TypeDescription
google.cloud.billing.budgets.v1beta1.Budget

Budget instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.budgets.v1beta1.Budget;

Decodes a Budget message from the specified reader or buffer.

Parameters
NameDescription
reader ($protobuf.Reader|Uint8Array)

Reader or buffer to decode from

length number

Message length if known beforehand

Returns
TypeDescription
google.cloud.billing.budgets.v1beta1.Budget

Budget

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.budgets.v1beta1.Budget;

Decodes a Budget message from the specified reader or buffer, length delimited.

Parameter
NameDescription
reader ($protobuf.Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
google.cloud.billing.budgets.v1beta1.Budget

Budget

encode(message, writer)

public static encode(message: google.cloud.billing.budgets.v1beta1.IBudget, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified Budget message. Does not implicitly messages.

Parameters
NameDescription
message IBudget

Budget message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

encodeDelimited(message, writer)

public static encodeDelimited(message: google.cloud.billing.budgets.v1beta1.IBudget, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified Budget message, length delimited. Does not implicitly messages.

Parameters
NameDescription
message IBudget

Budget message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

fromObject(object)

public static fromObject(object: { [k: string]: any }): google.cloud.billing.budgets.v1beta1.Budget;

Creates a Budget message from a plain object. Also converts values to their respective internal types.

Parameter
NameDescription
object { [k: string]: any }

Plain object

Returns
TypeDescription
google.cloud.billing.budgets.v1beta1.Budget

Budget

getTypeUrl(typeUrlPrefix)

public static getTypeUrl(typeUrlPrefix?: string): string;

Gets the default type url for Budget

Parameter
NameDescription
typeUrlPrefix string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns
TypeDescription
string

The default type url

toJSON()

public toJSON(): { [k: string]: any };

Converts this Budget to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.cloud.billing.budgets.v1beta1.Budget, options?: $protobuf.IConversionOptions): { [k: string]: any };

Creates a plain object from a Budget message. Also converts values to other types if specified.

Parameters
NameDescription
message google.cloud.billing.budgets.v1beta1.Budget

Budget

options $protobuf.IConversionOptions

Conversion options

Returns
TypeDescription
{ [k: string]: any }

Plain object

verify(message)

public static verify(message: { [k: string]: any }): (string|null);

Verifies a Budget message.

Parameter
NameDescription
message { [k: string]: any }

Plain object to verify

Returns
TypeDescription
(string|null)

null if valid, otherwise the reason why it is not