public static final class Cost.Builder extends GeneratedMessageV3.Builder<Cost.Builder> implements CostOrBuilderCost for running a model deployment on a given instance type. Currently, only USD currency code is supported.
Protobuf type google.cloud.gkerecommender.v1.Cost
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Cost.BuilderImplements
CostOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Cost.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
build()
public Cost build()| Returns | |
|---|---|
| Type | Description |
Cost |
|
buildPartial()
public Cost buildPartial()| Returns | |
|---|---|
| Type | Description |
Cost |
|
clear()
public Cost.Builder clear()| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
clearCostPerMillionInputTokens()
public Cost.Builder clearCostPerMillionInputTokens()Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
.google.cloud.gkerecommender.v1.Amount cost_per_million_input_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
clearCostPerMillionOutputTokens()
public Cost.Builder clearCostPerMillionOutputTokens()Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
.google.cloud.gkerecommender.v1.Amount cost_per_million_output_tokens = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
clearField(Descriptors.FieldDescriptor field)
public Cost.Builder clearField(Descriptors.FieldDescriptor field)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
clearOneof(Descriptors.OneofDescriptor oneof)
public Cost.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
clearOutputInputCostRatio()
public Cost.Builder clearOutputInputCostRatio() Optional. The output-to-input cost ratio. This determines how the total GPU
cost is split between input and output tokens. If not provided, 4.0 is
used, assuming a 4:1 output:input cost ratio.
optional float output_input_cost_ratio = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
This builder for chaining. |
clearPricingModel()
public Cost.Builder clearPricingModel() Optional. The pricing model used to calculate the cost. Can be one of:
3-years-cud, 1-year-cud, on-demand, spot. If not provided, spot
will be used.
string pricing_model = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
This builder for chaining. |
clone()
public Cost.Builder clone()| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
getCostPerMillionInputTokens()
public Amount getCostPerMillionInputTokens()Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
.google.cloud.gkerecommender.v1.Amount cost_per_million_input_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Amount |
The costPerMillionInputTokens. |
getCostPerMillionInputTokensBuilder()
public Amount.Builder getCostPerMillionInputTokensBuilder()Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
.google.cloud.gkerecommender.v1.Amount cost_per_million_input_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Amount.Builder |
|
getCostPerMillionInputTokensOrBuilder()
public AmountOrBuilder getCostPerMillionInputTokensOrBuilder()Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
.google.cloud.gkerecommender.v1.Amount cost_per_million_input_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AmountOrBuilder |
|
getCostPerMillionOutputTokens()
public Amount getCostPerMillionOutputTokens()Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
.google.cloud.gkerecommender.v1.Amount cost_per_million_output_tokens = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Amount |
The costPerMillionOutputTokens. |
getCostPerMillionOutputTokensBuilder()
public Amount.Builder getCostPerMillionOutputTokensBuilder()Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
.google.cloud.gkerecommender.v1.Amount cost_per_million_output_tokens = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Amount.Builder |
|
getCostPerMillionOutputTokensOrBuilder()
public AmountOrBuilder getCostPerMillionOutputTokensOrBuilder()Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
.google.cloud.gkerecommender.v1.Amount cost_per_million_output_tokens = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AmountOrBuilder |
|
getDefaultInstanceForType()
public Cost getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Cost |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getOutputInputCostRatio()
public float getOutputInputCostRatio() Optional. The output-to-input cost ratio. This determines how the total GPU
cost is split between input and output tokens. If not provided, 4.0 is
used, assuming a 4:1 output:input cost ratio.
optional float output_input_cost_ratio = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
float |
The outputInputCostRatio. |
getPricingModel()
public String getPricingModel() Optional. The pricing model used to calculate the cost. Can be one of:
3-years-cud, 1-year-cud, on-demand, spot. If not provided, spot
will be used.
string pricing_model = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The pricingModel. |
getPricingModelBytes()
public ByteString getPricingModelBytes() Optional. The pricing model used to calculate the cost. Can be one of:
3-years-cud, 1-year-cud, on-demand, spot. If not provided, spot
will be used.
string pricing_model = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for pricingModel. |
hasCostPerMillionInputTokens()
public boolean hasCostPerMillionInputTokens()Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
.google.cloud.gkerecommender.v1.Amount cost_per_million_input_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the costPerMillionInputTokens field is set. |
hasCostPerMillionOutputTokens()
public boolean hasCostPerMillionOutputTokens()Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
.google.cloud.gkerecommender.v1.Amount cost_per_million_output_tokens = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the costPerMillionOutputTokens field is set. |
hasOutputInputCostRatio()
public boolean hasOutputInputCostRatio() Optional. The output-to-input cost ratio. This determines how the total GPU
cost is split between input and output tokens. If not provided, 4.0 is
used, assuming a 4:1 output:input cost ratio.
optional float output_input_cost_ratio = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the outputInputCostRatio field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeCostPerMillionInputTokens(Amount value)
public Cost.Builder mergeCostPerMillionInputTokens(Amount value)Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
.google.cloud.gkerecommender.v1.Amount cost_per_million_input_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Amount |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
mergeCostPerMillionOutputTokens(Amount value)
public Cost.Builder mergeCostPerMillionOutputTokens(Amount value)Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
.google.cloud.gkerecommender.v1.Amount cost_per_million_output_tokens = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Amount |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
mergeFrom(Cost other)
public Cost.Builder mergeFrom(Cost other)| Parameter | |
|---|---|
| Name | Description |
other |
Cost |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Cost.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Cost.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Cost.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
setCostPerMillionInputTokens(Amount value)
public Cost.Builder setCostPerMillionInputTokens(Amount value)Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
.google.cloud.gkerecommender.v1.Amount cost_per_million_input_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Amount |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
setCostPerMillionInputTokens(Amount.Builder builderForValue)
public Cost.Builder setCostPerMillionInputTokens(Amount.Builder builderForValue)Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
.google.cloud.gkerecommender.v1.Amount cost_per_million_input_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Amount.Builder |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
setCostPerMillionOutputTokens(Amount value)
public Cost.Builder setCostPerMillionOutputTokens(Amount value)Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
.google.cloud.gkerecommender.v1.Amount cost_per_million_output_tokens = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Amount |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
setCostPerMillionOutputTokens(Amount.Builder builderForValue)
public Cost.Builder setCostPerMillionOutputTokens(Amount.Builder builderForValue)Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
.google.cloud.gkerecommender.v1.Amount cost_per_million_output_tokens = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Amount.Builder |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
setField(Descriptors.FieldDescriptor field, Object value)
public Cost.Builder setField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
setOutputInputCostRatio(float value)
public Cost.Builder setOutputInputCostRatio(float value) Optional. The output-to-input cost ratio. This determines how the total GPU
cost is split between input and output tokens. If not provided, 4.0 is
used, assuming a 4:1 output:input cost ratio.
optional float output_input_cost_ratio = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
floatThe outputInputCostRatio to set. |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
This builder for chaining. |
setPricingModel(String value)
public Cost.Builder setPricingModel(String value) Optional. The pricing model used to calculate the cost. Can be one of:
3-years-cud, 1-year-cud, on-demand, spot. If not provided, spot
will be used.
string pricing_model = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe pricingModel to set. |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
This builder for chaining. |
setPricingModelBytes(ByteString value)
public Cost.Builder setPricingModelBytes(ByteString value) Optional. The pricing model used to calculate the cost. Can be one of:
3-years-cud, 1-year-cud, on-demand, spot. If not provided, spot
will be used.
string pricing_model = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for pricingModel to set. |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Cost.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|
setUnknownFields(UnknownFieldSet unknownFields)
public final Cost.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Cost.Builder |
|