Class CostProjection.Builder (2.57.0)

public static final class CostProjection.Builder extends GeneratedMessageV3.Builder<CostProjection.Builder> implements CostProjectionOrBuilder

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

Protobuf type google.cloud.recommender.v1beta1.CostProjection

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CostProjection.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CostProjection.Builder
Overrides

build()

public CostProjection build()
Returns
Type Description
CostProjection

buildPartial()

public CostProjection buildPartial()
Returns
Type Description
CostProjection

clear()

public CostProjection.Builder clear()
Returns
Type Description
CostProjection.Builder
Overrides

clearCost()

public CostProjection.Builder clearCost()

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
CostProjection.Builder

clearDuration()

public CostProjection.Builder clearDuration()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
Type Description
CostProjection.Builder

clearField(Descriptors.FieldDescriptor field)

public CostProjection.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CostProjection.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CostProjection.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CostProjection.Builder
Overrides

clone()

public CostProjection.Builder clone()
Returns
Type Description
CostProjection.Builder
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
Type Description
com.google.type.Money

The cost.

getCostBuilder()

public Money.Builder getCostBuilder()

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.Builder

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

getDefaultInstanceForType()

public CostProjection getDefaultInstanceForType()
Returns
Type Description
CostProjection

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDuration()

public Duration getDuration()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
Type Description
Duration

The duration.

getDurationBuilder()

public Duration.Builder getDurationBuilder()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
Type Description
Builder

getDurationOrBuilder()

public DurationOrBuilder getDurationOrBuilder()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
Type Description
DurationOrBuilder

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
Type Description
boolean

Whether the cost field is set.

hasDuration()

public boolean hasDuration()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
Type Description
boolean

Whether the duration field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCost(Money value)

public CostProjection.Builder mergeCost(Money value)

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;

Parameter
Name Description
value com.google.type.Money
Returns
Type Description
CostProjection.Builder

mergeDuration(Duration value)

public CostProjection.Builder mergeDuration(Duration value)

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Parameter
Name Description
value Duration
Returns
Type Description
CostProjection.Builder

mergeFrom(CostProjection other)

public CostProjection.Builder mergeFrom(CostProjection other)
Parameter
Name Description
other CostProjection
Returns
Type Description
CostProjection.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CostProjection.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CostProjection.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CostProjection.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CostProjection.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CostProjection.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CostProjection.Builder
Overrides

setCost(Money value)

public CostProjection.Builder setCost(Money value)

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;

Parameter
Name Description
value com.google.type.Money
Returns
Type Description
CostProjection.Builder

setCost(Money.Builder builderForValue)

public CostProjection.Builder setCost(Money.Builder builderForValue)

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;

Parameter
Name Description
builderForValue com.google.type.Money.Builder
Returns
Type Description
CostProjection.Builder

setDuration(Duration value)

public CostProjection.Builder setDuration(Duration value)

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Parameter
Name Description
value Duration
Returns
Type Description
CostProjection.Builder

setDuration(Duration.Builder builderForValue)

public CostProjection.Builder setDuration(Duration.Builder builderForValue)

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
CostProjection.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public CostProjection.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CostProjection.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CostProjection.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CostProjection.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CostProjection.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CostProjection.Builder
Overrides