Class CostProjection (2.6.0)

public final class CostProjection extends GeneratedMessageV3 implements CostProjectionOrBuilder

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

Protobuf type google.cloud.recommender.v1beta1.CostProjection

Static Fields

COST_FIELD_NUMBER

public static final int COST_FIELD_NUMBER
Field Value
TypeDescription
int

DURATION_FIELD_NUMBER

public static final int DURATION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CostProjection getDefaultInstance()
Returns
TypeDescription
CostProjection

getDescriptor()

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

newBuilder()

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

newBuilder(CostProjection prototype)

public static CostProjection.Builder newBuilder(CostProjection prototype)
Parameter
NameDescription
prototypeCostProjection
Returns
TypeDescription
CostProjection.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getCost()

public Money getCost()

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
TypeDescription
com.google.type.Money

The cost.

getCostOrBuilder()

public MoneyOrBuilder getCostOrBuilder()

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
TypeDescription
com.google.type.MoneyOrBuilder

getDefaultInstanceForType()

public CostProjection getDefaultInstanceForType()
Returns
TypeDescription
CostProjection

getDuration()

public Duration getDuration()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
TypeDescription
Duration

The duration.

getDurationOrBuilder()

public DurationOrBuilder getDurationOrBuilder()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
TypeDescription
DurationOrBuilder

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasCost()

public boolean hasCost()

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
TypeDescription
boolean

Whether the cost field is set.

hasDuration()

public boolean hasDuration()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
TypeDescription
boolean

Whether the duration field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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