Class Cost.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Cost.Builder>
com.google.cloud.gkerecommender.v1.Cost.Builder
- All Implemented Interfaces:
CostOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Cost
public static final class Cost.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Cost.Builder>
implements CostOrBuilder
Cost for running a model deployment on a given instance type. Currently, only USD currency code is supported.Protobuf type
google.cloud.gkerecommender.v1.Cost-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Optional.Optional.Optional.Optional.Optional.Optional.Optional.Optional.Optional.Optional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorfloatOptional.Optional.com.google.protobuf.ByteStringOptional.booleanOptional.booleanOptional.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanOptional.Optional.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.setCostPerMillionInputTokens(Amount.Builder builderForValue) Optional.Optional.setCostPerMillionOutputTokens(Amount.Builder builderForValue) Optional.setOutputInputCostRatio(float value) Optional.setPricingModel(String value) Optional.setPricingModelBytes(com.google.protobuf.ByteString value) Optional.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Cost.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Cost.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Cost.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Cost.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Cost.Builder>
-
mergeFrom
public Cost.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Cost.Builder>- Throws:
IOException
-
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];- Specified by:
hasCostPerMillionOutputTokensin interfaceCostOrBuilder- Returns:
- Whether the costPerMillionOutputTokens field is set.
-
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];- Specified by:
getCostPerMillionOutputTokensin interfaceCostOrBuilder- Returns:
- The costPerMillionOutputTokens.
-
setCostPerMillionOutputTokens
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]; -
setCostPerMillionOutputTokens
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]; -
mergeCostPerMillionOutputTokens
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]; -
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]; -
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]; -
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];- Specified by:
getCostPerMillionOutputTokensOrBuilderin interfaceCostOrBuilder
-
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];- Specified by:
hasCostPerMillionInputTokensin interfaceCostOrBuilder- Returns:
- Whether the costPerMillionInputTokens field is set.
-
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];- Specified by:
getCostPerMillionInputTokensin interfaceCostOrBuilder- Returns:
- The costPerMillionInputTokens.
-
setCostPerMillionInputTokens
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]; -
setCostPerMillionInputTokens
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]; -
mergeCostPerMillionInputTokens
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]; -
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]; -
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]; -
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];- Specified by:
getCostPerMillionInputTokensOrBuilderin interfaceCostOrBuilder
-
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];- Specified by:
getPricingModelin interfaceCostOrBuilder- Returns:
- The pricingModel.
-
getPricingModelBytes
public com.google.protobuf.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];- Specified by:
getPricingModelBytesin interfaceCostOrBuilder- Returns:
- The bytes for pricingModel.
-
setPricingModel
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];- Parameters:
value- The pricingModel to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setPricingModelBytes
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];- Parameters:
value- The bytes for pricingModel to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
hasOutputInputCostRatioin interfaceCostOrBuilder- Returns:
- Whether the outputInputCostRatio field is set.
-
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];- Specified by:
getOutputInputCostRatioin interfaceCostOrBuilder- Returns:
- The outputInputCostRatio.
-
setOutputInputCostRatio
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];- Parameters:
value- The outputInputCostRatio to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-