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.v1.CostProjection
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CostProjection.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public CostProjection build()
Returns
buildPartial()
public CostProjection buildPartial()
Returns
clear()
public CostProjection.Builder clear()
Returns
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
clearDuration()
public CostProjection.Builder clearDuration()
Duration for which this cost applies.
.google.protobuf.Duration duration = 2;
Returns
clearField(Descriptors.FieldDescriptor field)
public CostProjection.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public CostProjection.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public CostProjection.Builder clone()
Returns
Overrides
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
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getDuration()
public Duration getDuration()
Duration for which this cost applies.
.google.protobuf.Duration duration = 2;
Returns
getDurationBuilder()
public Duration.Builder getDurationBuilder()
Duration for which this cost applies.
.google.protobuf.Duration duration = 2;
Returns
getDurationOrBuilder()
public DurationOrBuilder getDurationOrBuilder()
Duration for which this cost applies.
.google.protobuf.Duration duration = 2;
Returns
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
Overrides
isInitialized()
public final boolean isInitialized()
Returns
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
mergeDuration(Duration value)
public CostProjection.Builder mergeDuration(Duration value)
Duration for which this cost applies.
.google.protobuf.Duration duration = 2;
Parameter
Returns
mergeFrom(CostProjection other)
public CostProjection.Builder mergeFrom(CostProjection other)
Parameter
Returns
public CostProjection.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public CostProjection.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CostProjection.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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
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
setDuration(Duration value)
public CostProjection.Builder setDuration(Duration value)
Duration for which this cost applies.
.google.protobuf.Duration duration = 2;
Parameter
Returns
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
setField(Descriptors.FieldDescriptor field, Object value)
public CostProjection.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CostProjection.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final CostProjection.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides