Class CostProjection.Builder (2.25.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CostProjection.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CostProjection.Builder
Overrides

build()

public CostProjection build()
Returns
TypeDescription
CostProjection

buildPartial()

public CostProjection buildPartial()
Returns
TypeDescription
CostProjection

clear()

public CostProjection.Builder clear()
Returns
TypeDescription
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
TypeDescription
CostProjection.Builder

clearDuration()

public CostProjection.Builder clearDuration()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
TypeDescription
CostProjection.Builder

clearField(Descriptors.FieldDescriptor field)

public CostProjection.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
CostProjection.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CostProjection.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
CostProjection.Builder
Overrides

clone()

public CostProjection.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
com.google.type.MoneyOrBuilder

getDefaultInstanceForType()

public CostProjection getDefaultInstanceForType()
Returns
TypeDescription
CostProjection

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDuration()

public Duration getDuration()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
TypeDescription
Duration

The duration.

getDurationBuilder()

public Duration.Builder getDurationBuilder()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
TypeDescription
Builder

getDurationOrBuilder()

public DurationOrBuilder getDurationOrBuilder()

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Returns
TypeDescription
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
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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valuecom.google.type.Money
Returns
TypeDescription
CostProjection.Builder

mergeDuration(Duration value)

public CostProjection.Builder mergeDuration(Duration value)

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
CostProjection.Builder

mergeFrom(CostProjection other)

public CostProjection.Builder mergeFrom(CostProjection other)
Parameter
NameDescription
otherCostProjection
Returns
TypeDescription
CostProjection.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CostProjection.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CostProjection.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CostProjection.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
CostProjection.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CostProjection.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuecom.google.type.Money
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.type.Money.Builder
Returns
TypeDescription
CostProjection.Builder

setDuration(Duration value)

public CostProjection.Builder setDuration(Duration value)

Duration for which this cost applies.

.google.protobuf.Duration duration = 2;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
CostProjection.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public CostProjection.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CostProjection.Builder
Overrides

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

public CostProjection.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CostProjection.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CostProjection.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CostProjection.Builder
Overrides