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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Cost.Builder>
    • clear

      public Cost.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Cost.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Cost.Builder>
    • getDefaultInstanceForType

      public Cost getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Cost build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Cost buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Cost.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Cost.Builder>
    • mergeFrom

      public Cost.Builder mergeFrom(Cost other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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:
      hasCostPerMillionOutputTokens in interface CostOrBuilder
      Returns:
      Whether the costPerMillionOutputTokens field is set.
    • 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];
      Specified by:
      getCostPerMillionOutputTokens in interface CostOrBuilder
      Returns:
      The costPerMillionOutputTokens.
    • setCostPerMillionOutputTokens

      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];
    • setCostPerMillionOutputTokens

      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];
    • mergeCostPerMillionOutputTokens

      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];
    • 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];
    • 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];
    • 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];
      Specified by:
      getCostPerMillionOutputTokensOrBuilder in interface CostOrBuilder
    • 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:
      hasCostPerMillionInputTokens in interface CostOrBuilder
      Returns:
      Whether the costPerMillionInputTokens field is set.
    • 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];
      Specified by:
      getCostPerMillionInputTokens in interface CostOrBuilder
      Returns:
      The costPerMillionInputTokens.
    • setCostPerMillionInputTokens

      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];
    • setCostPerMillionInputTokens

      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];
    • mergeCostPerMillionInputTokens

      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];
    • 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];
    • 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];
    • 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];
      Specified by:
      getCostPerMillionInputTokensOrBuilder in interface CostOrBuilder
    • 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];
      Specified by:
      getPricingModel in interface CostOrBuilder
      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:
      getPricingModelBytes in interface CostOrBuilder
      Returns:
      The bytes for pricingModel.
    • setPricingModel

      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];
      Parameters:
      value - The pricingModel to set.
      Returns:
      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:
      This builder for chaining.
    • setPricingModelBytes

      public Cost.Builder setPricingModelBytes(com.google.protobuf.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];
      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:
      hasOutputInputCostRatio in interface CostOrBuilder
      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:
      getOutputInputCostRatio in interface CostOrBuilder
      Returns:
      The outputInputCostRatio.
    • setOutputInputCostRatio

      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];
      Parameters:
      value - The outputInputCostRatio to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.