Class CostProjection (2.80.0)

publicfinalclass CostProjectionextendsGeneratedMessageV3implementsCostProjectionOrBuilder

Contains metadata about how much money a recommendation can save or incur.

Protobuf type google.cloud.recommender.v1.CostProjection

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

COST_FIELD_NUMBER

publicstaticfinalintCOST_FIELD_NUMBER
Field Value
Type Description
int

COST_IN_LOCAL_CURRENCY_FIELD_NUMBER

publicstaticfinalintCOST_IN_LOCAL_CURRENCY_FIELD_NUMBER
Field Value
Type Description
int

DURATION_FIELD_NUMBER

publicstaticfinalintDURATION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticCostProjectiongetDefaultInstance()
Returns
Type Description
CostProjection

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticCostProjection.BuildernewBuilder()
Returns
Type Description
CostProjection.Builder

newBuilder(CostProjection prototype)

publicstaticCostProjection.BuildernewBuilder(CostProjectionprototype)
Parameter
Name Description
prototype CostProjection
Returns
Type Description
CostProjection.Builder

parseDelimitedFrom(InputStream input)

publicstaticCostProjectionparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
CostProjection
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCostProjectionparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CostProjection
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticCostProjectionparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
CostProjection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticCostProjectionparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CostProjection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticCostProjectionparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
CostProjection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticCostProjectionparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CostProjection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticCostProjectionparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CostProjection
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCostProjectionparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CostProjection
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticCostProjectionparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
CostProjection
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCostProjectionparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CostProjection
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticCostProjectionparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CostProjection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticCostProjectionparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CostProjection
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<CostProjection>parser()
Returns
Type Description
Parser<CostProjection>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCost()

publicMoneygetCost()

An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.

A user's permissions may affect whether the cost is computed using list prices or custom contract prices.

.google.type.Money cost = 1;

Returns
Type Description
com.google.type.Money

The cost.

getCostInLocalCurrency()

publicMoneygetCostInLocalCurrency()

The approximate cost savings in the billing account's local currency.

.google.type.Money cost_in_local_currency = 3;

Returns
Type Description
com.google.type.Money

The costInLocalCurrency.

getCostInLocalCurrencyOrBuilder()

publicMoneyOrBuildergetCostInLocalCurrencyOrBuilder()

The approximate cost savings in the billing account's local currency.

.google.type.Money cost_in_local_currency = 3;

Returns
Type Description
com.google.type.MoneyOrBuilder

getCostOrBuilder()

publicMoneyOrBuildergetCostOrBuilder()

An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.

A user's permissions may affect whether the cost is computed using list prices or custom contract prices.

.google.type.Money cost = 1;

Returns
Type Description
com.google.type.MoneyOrBuilder

getDefaultInstanceForType()

publicCostProjectiongetDefaultInstanceForType()
Returns
Type Description
CostProjection

getDuration()

publicDurationgetDuration()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
Type Description
Duration

The duration.

getDurationOrBuilder()

publicDurationOrBuildergetDurationOrBuilder()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
Type Description
DurationOrBuilder

getParserForType()

publicParser<CostProjection>getParserForType()
Returns
Type Description
Parser<CostProjection>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

hasCost()

publicbooleanhasCost()

An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.

A user's permissions may affect whether the cost is computed using list prices or custom contract prices.

.google.type.Money cost = 1;

Returns
Type Description
boolean

Whether the cost field is set.

hasCostInLocalCurrency()

publicbooleanhasCostInLocalCurrency()

The approximate cost savings in the billing account's local currency.

.google.type.Money cost_in_local_currency = 3;

Returns
Type Description
boolean

Whether the costInLocalCurrency field is set.

hasDuration()

publicbooleanhasDuration()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
Type Description
boolean

Whether the duration field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicCostProjection.BuildernewBuilderForType()
Returns
Type Description
CostProjection.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedCostProjection.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CostProjection.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicCostProjection.BuildertoBuilder()
Returns
Type Description
CostProjection.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.