Class Service.GatewayBudgetPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>
org.mlflow.api.proto.Service.GatewayBudgetPolicy.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, Service.GatewayBudgetPolicyOrBuilder
Enclosing class:
Service.GatewayBudgetPolicy

public static final class Service.GatewayBudgetPolicy.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder> implements Service.GatewayBudgetPolicyOrBuilder
 Represents a budget policy for the AI Gateway
 
Protobuf type mlflow.GatewayBudgetPolicy
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.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.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.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.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Service.GatewayBudgetPolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>
    • setField

      public Service.GatewayBudgetPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>
    • clearField

      public Service.GatewayBudgetPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>
    • clearOneof

      public Service.GatewayBudgetPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>
    • setRepeatedField

      public Service.GatewayBudgetPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>
    • addRepeatedField

      public Service.GatewayBudgetPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>
    • mergeFrom

      public Service.GatewayBudgetPolicy.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<Service.GatewayBudgetPolicy.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>
    • mergeFrom

      public Service.GatewayBudgetPolicy.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<Service.GatewayBudgetPolicy.Builder>
      Throws:
      IOException
    • hasBudgetPolicyId

      public boolean hasBudgetPolicyId()
       Unique identifier for this budget policy
       
      optional string budget_policy_id = 1;
      Specified by:
      hasBudgetPolicyId in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the budgetPolicyId field is set.
    • getBudgetPolicyId

      public String getBudgetPolicyId()
       Unique identifier for this budget policy
       
      optional string budget_policy_id = 1;
      Specified by:
      getBudgetPolicyId in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The budgetPolicyId.
    • getBudgetPolicyIdBytes

      public com.google.protobuf.ByteString getBudgetPolicyIdBytes()
       Unique identifier for this budget policy
       
      optional string budget_policy_id = 1;
      Specified by:
      getBudgetPolicyIdBytes in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The bytes for budgetPolicyId.
    • setBudgetPolicyId

      public Service.GatewayBudgetPolicy.Builder setBudgetPolicyId(String value)
       Unique identifier for this budget policy
       
      optional string budget_policy_id = 1;
      Parameters:
      value - The budgetPolicyId to set.
      Returns:
      This builder for chaining.
    • clearBudgetPolicyId

      public Service.GatewayBudgetPolicy.Builder clearBudgetPolicyId()
       Unique identifier for this budget policy
       
      optional string budget_policy_id = 1;
      Returns:
      This builder for chaining.
    • setBudgetPolicyIdBytes

      public Service.GatewayBudgetPolicy.Builder setBudgetPolicyIdBytes(com.google.protobuf.ByteString value)
       Unique identifier for this budget policy
       
      optional string budget_policy_id = 1;
      Parameters:
      value - The bytes for budgetPolicyId to set.
      Returns:
      This builder for chaining.
    • hasBudgetUnit

      public boolean hasBudgetUnit()
       Budget measurement unit (e.g. USD)
       
      optional .mlflow.BudgetUnit budget_unit = 2;
      Specified by:
      hasBudgetUnit in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the budgetUnit field is set.
    • getBudgetUnit

      public Service.BudgetUnit getBudgetUnit()
       Budget measurement unit (e.g. USD)
       
      optional .mlflow.BudgetUnit budget_unit = 2;
      Specified by:
      getBudgetUnit in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The budgetUnit.
    • setBudgetUnit

       Budget measurement unit (e.g. USD)
       
      optional .mlflow.BudgetUnit budget_unit = 2;
      Parameters:
      value - The budgetUnit to set.
      Returns:
      This builder for chaining.
    • clearBudgetUnit

      public Service.GatewayBudgetPolicy.Builder clearBudgetUnit()
       Budget measurement unit (e.g. USD)
       
      optional .mlflow.BudgetUnit budget_unit = 2;
      Returns:
      This builder for chaining.
    • hasBudgetAmount

      public boolean hasBudgetAmount()
       Budget limit amount
       
      optional double budget_amount = 3;
      Specified by:
      hasBudgetAmount in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the budgetAmount field is set.
    • getBudgetAmount

      public double getBudgetAmount()
       Budget limit amount
       
      optional double budget_amount = 3;
      Specified by:
      getBudgetAmount in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The budgetAmount.
    • setBudgetAmount

      public Service.GatewayBudgetPolicy.Builder setBudgetAmount(double value)
       Budget limit amount
       
      optional double budget_amount = 3;
      Parameters:
      value - The budgetAmount to set.
      Returns:
      This builder for chaining.
    • clearBudgetAmount

      public Service.GatewayBudgetPolicy.Builder clearBudgetAmount()
       Budget limit amount
       
      optional double budget_amount = 3;
      Returns:
      This builder for chaining.
    • hasDuration

      public boolean hasDuration()
       Fixed time window (unit + length pair)
       
      optional .mlflow.BudgetDuration duration = 4;
      Specified by:
      hasDuration in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the duration field is set.
    • getDuration

      public Service.BudgetDuration getDuration()
       Fixed time window (unit + length pair)
       
      optional .mlflow.BudgetDuration duration = 4;
      Specified by:
      getDuration in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The duration.
    • setDuration

       Fixed time window (unit + length pair)
       
      optional .mlflow.BudgetDuration duration = 4;
    • setDuration

       Fixed time window (unit + length pair)
       
      optional .mlflow.BudgetDuration duration = 4;
    • mergeDuration

       Fixed time window (unit + length pair)
       
      optional .mlflow.BudgetDuration duration = 4;
    • clearDuration

      public Service.GatewayBudgetPolicy.Builder clearDuration()
       Fixed time window (unit + length pair)
       
      optional .mlflow.BudgetDuration duration = 4;
    • getDurationBuilder

      public Service.BudgetDuration.Builder getDurationBuilder()
       Fixed time window (unit + length pair)
       
      optional .mlflow.BudgetDuration duration = 4;
    • getDurationOrBuilder

      public Service.BudgetDurationOrBuilder getDurationOrBuilder()
       Fixed time window (unit + length pair)
       
      optional .mlflow.BudgetDuration duration = 4;
      Specified by:
      getDurationOrBuilder in interface Service.GatewayBudgetPolicyOrBuilder
    • hasTargetScope

      public boolean hasTargetScope()
       Scope of the budget (GLOBAL, WORKSPACE, or ENDPOINT)
       
      optional .mlflow.BudgetTargetScope target_scope = 5;
      Specified by:
      hasTargetScope in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the targetScope field is set.
    • getTargetScope

      public Service.BudgetTargetScope getTargetScope()
       Scope of the budget (GLOBAL, WORKSPACE, or ENDPOINT)
       
      optional .mlflow.BudgetTargetScope target_scope = 5;
      Specified by:
      getTargetScope in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The targetScope.
    • setTargetScope

       Scope of the budget (GLOBAL, WORKSPACE, or ENDPOINT)
       
      optional .mlflow.BudgetTargetScope target_scope = 5;
      Parameters:
      value - The targetScope to set.
      Returns:
      This builder for chaining.
    • clearTargetScope

      public Service.GatewayBudgetPolicy.Builder clearTargetScope()
       Scope of the budget (GLOBAL, WORKSPACE, or ENDPOINT)
       
      optional .mlflow.BudgetTargetScope target_scope = 5;
      Returns:
      This builder for chaining.
    • hasBudgetAction

      public boolean hasBudgetAction()
       Action when budget is exceeded
       
      optional .mlflow.BudgetAction budget_action = 6;
      Specified by:
      hasBudgetAction in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the budgetAction field is set.
    • getBudgetAction

      public Service.BudgetAction getBudgetAction()
       Action when budget is exceeded
       
      optional .mlflow.BudgetAction budget_action = 6;
      Specified by:
      getBudgetAction in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The budgetAction.
    • setBudgetAction

       Action when budget is exceeded
       
      optional .mlflow.BudgetAction budget_action = 6;
      Parameters:
      value - The budgetAction to set.
      Returns:
      This builder for chaining.
    • clearBudgetAction

      public Service.GatewayBudgetPolicy.Builder clearBudgetAction()
       Action when budget is exceeded
       
      optional .mlflow.BudgetAction budget_action = 6;
      Returns:
      This builder for chaining.
    • hasCreatedBy

      public boolean hasCreatedBy()
       User ID who created the policy
       
      optional string created_by = 7;
      Specified by:
      hasCreatedBy in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the createdBy field is set.
    • getCreatedBy

      public String getCreatedBy()
       User ID who created the policy
       
      optional string created_by = 7;
      Specified by:
      getCreatedBy in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The createdBy.
    • getCreatedByBytes

      public com.google.protobuf.ByteString getCreatedByBytes()
       User ID who created the policy
       
      optional string created_by = 7;
      Specified by:
      getCreatedByBytes in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The bytes for createdBy.
    • setCreatedBy

      public Service.GatewayBudgetPolicy.Builder setCreatedBy(String value)
       User ID who created the policy
       
      optional string created_by = 7;
      Parameters:
      value - The createdBy to set.
      Returns:
      This builder for chaining.
    • clearCreatedBy

      public Service.GatewayBudgetPolicy.Builder clearCreatedBy()
       User ID who created the policy
       
      optional string created_by = 7;
      Returns:
      This builder for chaining.
    • setCreatedByBytes

      public Service.GatewayBudgetPolicy.Builder setCreatedByBytes(com.google.protobuf.ByteString value)
       User ID who created the policy
       
      optional string created_by = 7;
      Parameters:
      value - The bytes for createdBy to set.
      Returns:
      This builder for chaining.
    • hasCreatedAt

      public boolean hasCreatedAt()
       Creation timestamp in milliseconds
       
      optional int64 created_at = 8;
      Specified by:
      hasCreatedAt in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the createdAt field is set.
    • getCreatedAt

      public long getCreatedAt()
       Creation timestamp in milliseconds
       
      optional int64 created_at = 8;
      Specified by:
      getCreatedAt in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The createdAt.
    • setCreatedAt

      public Service.GatewayBudgetPolicy.Builder setCreatedAt(long value)
       Creation timestamp in milliseconds
       
      optional int64 created_at = 8;
      Parameters:
      value - The createdAt to set.
      Returns:
      This builder for chaining.
    • clearCreatedAt

      public Service.GatewayBudgetPolicy.Builder clearCreatedAt()
       Creation timestamp in milliseconds
       
      optional int64 created_at = 8;
      Returns:
      This builder for chaining.
    • hasLastUpdatedBy

      public boolean hasLastUpdatedBy()
       User ID who last updated the policy
       
      optional string last_updated_by = 9;
      Specified by:
      hasLastUpdatedBy in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the lastUpdatedBy field is set.
    • getLastUpdatedBy

      public String getLastUpdatedBy()
       User ID who last updated the policy
       
      optional string last_updated_by = 9;
      Specified by:
      getLastUpdatedBy in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The lastUpdatedBy.
    • getLastUpdatedByBytes

      public com.google.protobuf.ByteString getLastUpdatedByBytes()
       User ID who last updated the policy
       
      optional string last_updated_by = 9;
      Specified by:
      getLastUpdatedByBytes in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The bytes for lastUpdatedBy.
    • setLastUpdatedBy

      public Service.GatewayBudgetPolicy.Builder setLastUpdatedBy(String value)
       User ID who last updated the policy
       
      optional string last_updated_by = 9;
      Parameters:
      value - The lastUpdatedBy to set.
      Returns:
      This builder for chaining.
    • clearLastUpdatedBy

      public Service.GatewayBudgetPolicy.Builder clearLastUpdatedBy()
       User ID who last updated the policy
       
      optional string last_updated_by = 9;
      Returns:
      This builder for chaining.
    • setLastUpdatedByBytes

      public Service.GatewayBudgetPolicy.Builder setLastUpdatedByBytes(com.google.protobuf.ByteString value)
       User ID who last updated the policy
       
      optional string last_updated_by = 9;
      Parameters:
      value - The bytes for lastUpdatedBy to set.
      Returns:
      This builder for chaining.
    • hasLastUpdatedAt

      public boolean hasLastUpdatedAt()
       Last update timestamp in milliseconds
       
      optional int64 last_updated_at = 10;
      Specified by:
      hasLastUpdatedAt in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the lastUpdatedAt field is set.
    • getLastUpdatedAt

      public long getLastUpdatedAt()
       Last update timestamp in milliseconds
       
      optional int64 last_updated_at = 10;
      Specified by:
      getLastUpdatedAt in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The lastUpdatedAt.
    • setLastUpdatedAt

      public Service.GatewayBudgetPolicy.Builder setLastUpdatedAt(long value)
       Last update timestamp in milliseconds
       
      optional int64 last_updated_at = 10;
      Parameters:
      value - The lastUpdatedAt to set.
      Returns:
      This builder for chaining.
    • clearLastUpdatedAt

      public Service.GatewayBudgetPolicy.Builder clearLastUpdatedAt()
       Last update timestamp in milliseconds
       
      optional int64 last_updated_at = 10;
      Returns:
      This builder for chaining.
    • hasTargetValue

      public boolean hasTargetValue()
       Target the policy applies to, interpreted per target_scope: a gateway endpoint ID
       for ENDPOINT scope. Required for that scope; unset for GLOBAL and WORKSPACE.
       
      optional string target_value = 11;
      Specified by:
      hasTargetValue in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      Whether the targetValue field is set.
    • getTargetValue

      public String getTargetValue()
       Target the policy applies to, interpreted per target_scope: a gateway endpoint ID
       for ENDPOINT scope. Required for that scope; unset for GLOBAL and WORKSPACE.
       
      optional string target_value = 11;
      Specified by:
      getTargetValue in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The targetValue.
    • getTargetValueBytes

      public com.google.protobuf.ByteString getTargetValueBytes()
       Target the policy applies to, interpreted per target_scope: a gateway endpoint ID
       for ENDPOINT scope. Required for that scope; unset for GLOBAL and WORKSPACE.
       
      optional string target_value = 11;
      Specified by:
      getTargetValueBytes in interface Service.GatewayBudgetPolicyOrBuilder
      Returns:
      The bytes for targetValue.
    • setTargetValue

      public Service.GatewayBudgetPolicy.Builder setTargetValue(String value)
       Target the policy applies to, interpreted per target_scope: a gateway endpoint ID
       for ENDPOINT scope. Required for that scope; unset for GLOBAL and WORKSPACE.
       
      optional string target_value = 11;
      Parameters:
      value - The targetValue to set.
      Returns:
      This builder for chaining.
    • clearTargetValue

      public Service.GatewayBudgetPolicy.Builder clearTargetValue()
       Target the policy applies to, interpreted per target_scope: a gateway endpoint ID
       for ENDPOINT scope. Required for that scope; unset for GLOBAL and WORKSPACE.
       
      optional string target_value = 11;
      Returns:
      This builder for chaining.
    • setTargetValueBytes

      public Service.GatewayBudgetPolicy.Builder setTargetValueBytes(com.google.protobuf.ByteString value)
       Target the policy applies to, interpreted per target_scope: a gateway endpoint ID
       for ENDPOINT scope. Required for that scope; unset for GLOBAL and WORKSPACE.
       
      optional string target_value = 11;
      Parameters:
      value - The bytes for targetValue to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Service.GatewayBudgetPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>
    • mergeUnknownFields

      public final Service.GatewayBudgetPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Service.GatewayBudgetPolicy.Builder>