Class Consistency.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Consistency.Builder>
com.authzed.api.v1.Consistency.Builder
All Implemented Interfaces:
ConsistencyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Consistency

public static final class Consistency.Builder extends com.google.protobuf.GeneratedMessage.Builder<Consistency.Builder> implements ConsistencyOrBuilder
 Consistency will define how a request is handled by the backend.
 By defining a consistency requirement, and a token at which those
 requirements should be applied, where applicable.
 
Protobuf type authzed.api.v1.Consistency
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    at_exact_snapshot indicates that all data used in the API call must be *at the given* snapshot in time; if the snapshot is no longer available, an error will be returned to the caller.
    at_least_as_fresh indicates that all data used in the API call must be *at least as fresh* as that found in the ZedToken; more recent data might be used if available or faster.
    fully_consistent indicates that all data used in the API call *must* be at the most recent snapshot found.
    minimize_latency indicates that the latency for the call should be minimized by having the system select the fastest snapshot available.
     
    at_exact_snapshot indicates that all data used in the API call must be *at the given* snapshot in time; if the snapshot is no longer available, an error will be returned to the caller.
    at_exact_snapshot indicates that all data used in the API call must be *at the given* snapshot in time; if the snapshot is no longer available, an error will be returned to the caller.
    at_exact_snapshot indicates that all data used in the API call must be *at the given* snapshot in time; if the snapshot is no longer available, an error will be returned to the caller.
    at_least_as_fresh indicates that all data used in the API call must be *at least as fresh* as that found in the ZedToken; more recent data might be used if available or faster.
    at_least_as_fresh indicates that all data used in the API call must be *at least as fresh* as that found in the ZedToken; more recent data might be used if available or faster.
    at_least_as_fresh indicates that all data used in the API call must be *at least as fresh* as that found in the ZedToken; more recent data might be used if available or faster.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    boolean
    fully_consistent indicates that all data used in the API call *must* be at the most recent snapshot found.
    boolean
    minimize_latency indicates that the latency for the call should be minimized by having the system select the fastest snapshot available.
     
    boolean
    at_exact_snapshot indicates that all data used in the API call must be *at the given* snapshot in time; if the snapshot is no longer available, an error will be returned to the caller.
    boolean
    at_least_as_fresh indicates that all data used in the API call must be *at least as fresh* as that found in the ZedToken; more recent data might be used if available or faster.
    boolean
    fully_consistent indicates that all data used in the API call *must* be at the most recent snapshot found.
    boolean
    minimize_latency indicates that the latency for the call should be minimized by having the system select the fastest snapshot available.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    at_exact_snapshot indicates that all data used in the API call must be *at the given* snapshot in time; if the snapshot is no longer available, an error will be returned to the caller.
    at_least_as_fresh indicates that all data used in the API call must be *at least as fresh* as that found in the ZedToken; more recent data might be used if available or faster.
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    at_exact_snapshot indicates that all data used in the API call must be *at the given* snapshot in time; if the snapshot is no longer available, an error will be returned to the caller.
    at_exact_snapshot indicates that all data used in the API call must be *at the given* snapshot in time; if the snapshot is no longer available, an error will be returned to the caller.
    at_least_as_fresh indicates that all data used in the API call must be *at least as fresh* as that found in the ZedToken; more recent data might be used if available or faster.
    at_least_as_fresh indicates that all data used in the API call must be *at least as fresh* as that found in the ZedToken; more recent data might be used if available or faster.
    setFullyConsistent(boolean value)
    fully_consistent indicates that all data used in the API call *must* be at the most recent snapshot found.
    setMinimizeLatency(boolean value)
    minimize_latency indicates that the latency for the call should be minimized by having the system select the fastest snapshot available.

    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, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Consistency.Builder>
    • clear

      public Consistency.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<Consistency.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<Consistency.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public Consistency.Builder mergeFrom(Consistency other)
    • isInitialized

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

      public Consistency.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<Consistency.Builder>
      Throws:
      IOException
    • getRequirementCase

      public Consistency.RequirementCase getRequirementCase()
      Specified by:
      getRequirementCase in interface ConsistencyOrBuilder
    • clearRequirement

      public Consistency.Builder clearRequirement()
    • hasMinimizeLatency

      public boolean hasMinimizeLatency()
       minimize_latency indicates that the latency for the call should be
       minimized by having the system select the fastest snapshot available.
       
      bool minimize_latency = 1 [(.validate.rules) = { ... }
      Specified by:
      hasMinimizeLatency in interface ConsistencyOrBuilder
      Returns:
      Whether the minimizeLatency field is set.
    • getMinimizeLatency

      public boolean getMinimizeLatency()
       minimize_latency indicates that the latency for the call should be
       minimized by having the system select the fastest snapshot available.
       
      bool minimize_latency = 1 [(.validate.rules) = { ... }
      Specified by:
      getMinimizeLatency in interface ConsistencyOrBuilder
      Returns:
      The minimizeLatency.
    • setMinimizeLatency

      public Consistency.Builder setMinimizeLatency(boolean value)
       minimize_latency indicates that the latency for the call should be
       minimized by having the system select the fastest snapshot available.
       
      bool minimize_latency = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The minimizeLatency to set.
      Returns:
      This builder for chaining.
    • clearMinimizeLatency

      public Consistency.Builder clearMinimizeLatency()
       minimize_latency indicates that the latency for the call should be
       minimized by having the system select the fastest snapshot available.
       
      bool minimize_latency = 1 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • hasAtLeastAsFresh

      public boolean hasAtLeastAsFresh()
       at_least_as_fresh indicates that all data used in the API call must be
       *at least as fresh* as that found in the ZedToken; more recent data might
       be used if available or faster.
       
      .authzed.api.v1.ZedToken at_least_as_fresh = 2;
      Specified by:
      hasAtLeastAsFresh in interface ConsistencyOrBuilder
      Returns:
      Whether the atLeastAsFresh field is set.
    • getAtLeastAsFresh

      public ZedToken getAtLeastAsFresh()
       at_least_as_fresh indicates that all data used in the API call must be
       *at least as fresh* as that found in the ZedToken; more recent data might
       be used if available or faster.
       
      .authzed.api.v1.ZedToken at_least_as_fresh = 2;
      Specified by:
      getAtLeastAsFresh in interface ConsistencyOrBuilder
      Returns:
      The atLeastAsFresh.
    • setAtLeastAsFresh

      public Consistency.Builder setAtLeastAsFresh(ZedToken value)
       at_least_as_fresh indicates that all data used in the API call must be
       *at least as fresh* as that found in the ZedToken; more recent data might
       be used if available or faster.
       
      .authzed.api.v1.ZedToken at_least_as_fresh = 2;
    • setAtLeastAsFresh

      public Consistency.Builder setAtLeastAsFresh(ZedToken.Builder builderForValue)
       at_least_as_fresh indicates that all data used in the API call must be
       *at least as fresh* as that found in the ZedToken; more recent data might
       be used if available or faster.
       
      .authzed.api.v1.ZedToken at_least_as_fresh = 2;
    • mergeAtLeastAsFresh

      public Consistency.Builder mergeAtLeastAsFresh(ZedToken value)
       at_least_as_fresh indicates that all data used in the API call must be
       *at least as fresh* as that found in the ZedToken; more recent data might
       be used if available or faster.
       
      .authzed.api.v1.ZedToken at_least_as_fresh = 2;
    • clearAtLeastAsFresh

      public Consistency.Builder clearAtLeastAsFresh()
       at_least_as_fresh indicates that all data used in the API call must be
       *at least as fresh* as that found in the ZedToken; more recent data might
       be used if available or faster.
       
      .authzed.api.v1.ZedToken at_least_as_fresh = 2;
    • getAtLeastAsFreshBuilder

      public ZedToken.Builder getAtLeastAsFreshBuilder()
       at_least_as_fresh indicates that all data used in the API call must be
       *at least as fresh* as that found in the ZedToken; more recent data might
       be used if available or faster.
       
      .authzed.api.v1.ZedToken at_least_as_fresh = 2;
    • getAtLeastAsFreshOrBuilder

      public ZedTokenOrBuilder getAtLeastAsFreshOrBuilder()
       at_least_as_fresh indicates that all data used in the API call must be
       *at least as fresh* as that found in the ZedToken; more recent data might
       be used if available or faster.
       
      .authzed.api.v1.ZedToken at_least_as_fresh = 2;
      Specified by:
      getAtLeastAsFreshOrBuilder in interface ConsistencyOrBuilder
    • hasAtExactSnapshot

      public boolean hasAtExactSnapshot()
       at_exact_snapshot indicates that all data used in the API call must be
       *at the given* snapshot in time; if the snapshot is no longer available,
       an error will be returned to the caller.
       
      .authzed.api.v1.ZedToken at_exact_snapshot = 3;
      Specified by:
      hasAtExactSnapshot in interface ConsistencyOrBuilder
      Returns:
      Whether the atExactSnapshot field is set.
    • getAtExactSnapshot

      public ZedToken getAtExactSnapshot()
       at_exact_snapshot indicates that all data used in the API call must be
       *at the given* snapshot in time; if the snapshot is no longer available,
       an error will be returned to the caller.
       
      .authzed.api.v1.ZedToken at_exact_snapshot = 3;
      Specified by:
      getAtExactSnapshot in interface ConsistencyOrBuilder
      Returns:
      The atExactSnapshot.
    • setAtExactSnapshot

      public Consistency.Builder setAtExactSnapshot(ZedToken value)
       at_exact_snapshot indicates that all data used in the API call must be
       *at the given* snapshot in time; if the snapshot is no longer available,
       an error will be returned to the caller.
       
      .authzed.api.v1.ZedToken at_exact_snapshot = 3;
    • setAtExactSnapshot

      public Consistency.Builder setAtExactSnapshot(ZedToken.Builder builderForValue)
       at_exact_snapshot indicates that all data used in the API call must be
       *at the given* snapshot in time; if the snapshot is no longer available,
       an error will be returned to the caller.
       
      .authzed.api.v1.ZedToken at_exact_snapshot = 3;
    • mergeAtExactSnapshot

      public Consistency.Builder mergeAtExactSnapshot(ZedToken value)
       at_exact_snapshot indicates that all data used in the API call must be
       *at the given* snapshot in time; if the snapshot is no longer available,
       an error will be returned to the caller.
       
      .authzed.api.v1.ZedToken at_exact_snapshot = 3;
    • clearAtExactSnapshot

      public Consistency.Builder clearAtExactSnapshot()
       at_exact_snapshot indicates that all data used in the API call must be
       *at the given* snapshot in time; if the snapshot is no longer available,
       an error will be returned to the caller.
       
      .authzed.api.v1.ZedToken at_exact_snapshot = 3;
    • getAtExactSnapshotBuilder

      public ZedToken.Builder getAtExactSnapshotBuilder()
       at_exact_snapshot indicates that all data used in the API call must be
       *at the given* snapshot in time; if the snapshot is no longer available,
       an error will be returned to the caller.
       
      .authzed.api.v1.ZedToken at_exact_snapshot = 3;
    • getAtExactSnapshotOrBuilder

      public ZedTokenOrBuilder getAtExactSnapshotOrBuilder()
       at_exact_snapshot indicates that all data used in the API call must be
       *at the given* snapshot in time; if the snapshot is no longer available,
       an error will be returned to the caller.
       
      .authzed.api.v1.ZedToken at_exact_snapshot = 3;
      Specified by:
      getAtExactSnapshotOrBuilder in interface ConsistencyOrBuilder
    • hasFullyConsistent

      public boolean hasFullyConsistent()
       fully_consistent indicates that all data used in the API call *must* be
       at the most recent snapshot found.
      
       NOTE: using this method can be *quite slow*, so unless there is a need to
       do so, it is recommended to use `at_least_as_fresh` with a stored
       ZedToken.
       
      bool fully_consistent = 4 [(.validate.rules) = { ... }
      Specified by:
      hasFullyConsistent in interface ConsistencyOrBuilder
      Returns:
      Whether the fullyConsistent field is set.
    • getFullyConsistent

      public boolean getFullyConsistent()
       fully_consistent indicates that all data used in the API call *must* be
       at the most recent snapshot found.
      
       NOTE: using this method can be *quite slow*, so unless there is a need to
       do so, it is recommended to use `at_least_as_fresh` with a stored
       ZedToken.
       
      bool fully_consistent = 4 [(.validate.rules) = { ... }
      Specified by:
      getFullyConsistent in interface ConsistencyOrBuilder
      Returns:
      The fullyConsistent.
    • setFullyConsistent

      public Consistency.Builder setFullyConsistent(boolean value)
       fully_consistent indicates that all data used in the API call *must* be
       at the most recent snapshot found.
      
       NOTE: using this method can be *quite slow*, so unless there is a need to
       do so, it is recommended to use `at_least_as_fresh` with a stored
       ZedToken.
       
      bool fully_consistent = 4 [(.validate.rules) = { ... }
      Parameters:
      value - The fullyConsistent to set.
      Returns:
      This builder for chaining.
    • clearFullyConsistent

      public Consistency.Builder clearFullyConsistent()
       fully_consistent indicates that all data used in the API call *must* be
       at the most recent snapshot found.
      
       NOTE: using this method can be *quite slow*, so unless there is a need to
       do so, it is recommended to use `at_least_as_fresh` with a stored
       ZedToken.
       
      bool fully_consistent = 4 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.