Class WatchRequest.Builder

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

public static final class WatchRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<WatchRequest.Builder> implements WatchRequestOrBuilder
 WatchRequest specifies the object definitions for which we want to start
 watching mutations, and an optional start snapshot for when to start
 watching.
 
Protobuf type authzed.api.v1.WatchRequest
  • 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<WatchRequest.Builder>
    • clear

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

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

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

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

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

      public WatchRequest.Builder mergeFrom(WatchRequest other)
    • isInitialized

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

      public WatchRequest.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<WatchRequest.Builder>
      Throws:
      IOException
    • getOptionalObjectTypesList

      public com.google.protobuf.ProtocolStringList getOptionalObjectTypesList()
       optional_object_types is a filter of resource object types to watch for changes.
       If specified, only changes to the specified object types will be returned and
       optional_relationship_filters cannot be used.
       
      repeated string optional_object_types = 1 [(.validate.rules) = { ... }
      Specified by:
      getOptionalObjectTypesList in interface WatchRequestOrBuilder
      Returns:
      A list containing the optionalObjectTypes.
    • getOptionalObjectTypesCount

      public int getOptionalObjectTypesCount()
       optional_object_types is a filter of resource object types to watch for changes.
       If specified, only changes to the specified object types will be returned and
       optional_relationship_filters cannot be used.
       
      repeated string optional_object_types = 1 [(.validate.rules) = { ... }
      Specified by:
      getOptionalObjectTypesCount in interface WatchRequestOrBuilder
      Returns:
      The count of optionalObjectTypes.
    • getOptionalObjectTypes

      public String getOptionalObjectTypes(int index)
       optional_object_types is a filter of resource object types to watch for changes.
       If specified, only changes to the specified object types will be returned and
       optional_relationship_filters cannot be used.
       
      repeated string optional_object_types = 1 [(.validate.rules) = { ... }
      Specified by:
      getOptionalObjectTypes in interface WatchRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The optionalObjectTypes at the given index.
    • getOptionalObjectTypesBytes

      public com.google.protobuf.ByteString getOptionalObjectTypesBytes(int index)
       optional_object_types is a filter of resource object types to watch for changes.
       If specified, only changes to the specified object types will be returned and
       optional_relationship_filters cannot be used.
       
      repeated string optional_object_types = 1 [(.validate.rules) = { ... }
      Specified by:
      getOptionalObjectTypesBytes in interface WatchRequestOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the optionalObjectTypes at the given index.
    • setOptionalObjectTypes

      public WatchRequest.Builder setOptionalObjectTypes(int index, String value)
       optional_object_types is a filter of resource object types to watch for changes.
       If specified, only changes to the specified object types will be returned and
       optional_relationship_filters cannot be used.
       
      repeated string optional_object_types = 1 [(.validate.rules) = { ... }
      Parameters:
      index - The index to set the value at.
      value - The optionalObjectTypes to set.
      Returns:
      This builder for chaining.
    • addOptionalObjectTypes

      public WatchRequest.Builder addOptionalObjectTypes(String value)
       optional_object_types is a filter of resource object types to watch for changes.
       If specified, only changes to the specified object types will be returned and
       optional_relationship_filters cannot be used.
       
      repeated string optional_object_types = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The optionalObjectTypes to add.
      Returns:
      This builder for chaining.
    • addAllOptionalObjectTypes

      public WatchRequest.Builder addAllOptionalObjectTypes(Iterable<String> values)
       optional_object_types is a filter of resource object types to watch for changes.
       If specified, only changes to the specified object types will be returned and
       optional_relationship_filters cannot be used.
       
      repeated string optional_object_types = 1 [(.validate.rules) = { ... }
      Parameters:
      values - The optionalObjectTypes to add.
      Returns:
      This builder for chaining.
    • clearOptionalObjectTypes

      public WatchRequest.Builder clearOptionalObjectTypes()
       optional_object_types is a filter of resource object types to watch for changes.
       If specified, only changes to the specified object types will be returned and
       optional_relationship_filters cannot be used.
       
      repeated string optional_object_types = 1 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • addOptionalObjectTypesBytes

      public WatchRequest.Builder addOptionalObjectTypesBytes(com.google.protobuf.ByteString value)
       optional_object_types is a filter of resource object types to watch for changes.
       If specified, only changes to the specified object types will be returned and
       optional_relationship_filters cannot be used.
       
      repeated string optional_object_types = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes of the optionalObjectTypes to add.
      Returns:
      This builder for chaining.
    • hasOptionalStartCursor

      public boolean hasOptionalStartCursor()
       optional_start_cursor is the ZedToken holding the point-in-time at
       which to start watching for changes.
       If not specified, the watch will begin at the current head revision
       of the datastore, returning any updates that occur after the caller
       makes the request.
       Note that if this cursor references a point-in-time containing data
       that has been garbage collected, an error will be returned.
       
      .authzed.api.v1.ZedToken optional_start_cursor = 2;
      Specified by:
      hasOptionalStartCursor in interface WatchRequestOrBuilder
      Returns:
      Whether the optionalStartCursor field is set.
    • getOptionalStartCursor

      public ZedToken getOptionalStartCursor()
       optional_start_cursor is the ZedToken holding the point-in-time at
       which to start watching for changes.
       If not specified, the watch will begin at the current head revision
       of the datastore, returning any updates that occur after the caller
       makes the request.
       Note that if this cursor references a point-in-time containing data
       that has been garbage collected, an error will be returned.
       
      .authzed.api.v1.ZedToken optional_start_cursor = 2;
      Specified by:
      getOptionalStartCursor in interface WatchRequestOrBuilder
      Returns:
      The optionalStartCursor.
    • setOptionalStartCursor

      public WatchRequest.Builder setOptionalStartCursor(ZedToken value)
       optional_start_cursor is the ZedToken holding the point-in-time at
       which to start watching for changes.
       If not specified, the watch will begin at the current head revision
       of the datastore, returning any updates that occur after the caller
       makes the request.
       Note that if this cursor references a point-in-time containing data
       that has been garbage collected, an error will be returned.
       
      .authzed.api.v1.ZedToken optional_start_cursor = 2;
    • setOptionalStartCursor

      public WatchRequest.Builder setOptionalStartCursor(ZedToken.Builder builderForValue)
       optional_start_cursor is the ZedToken holding the point-in-time at
       which to start watching for changes.
       If not specified, the watch will begin at the current head revision
       of the datastore, returning any updates that occur after the caller
       makes the request.
       Note that if this cursor references a point-in-time containing data
       that has been garbage collected, an error will be returned.
       
      .authzed.api.v1.ZedToken optional_start_cursor = 2;
    • mergeOptionalStartCursor

      public WatchRequest.Builder mergeOptionalStartCursor(ZedToken value)
       optional_start_cursor is the ZedToken holding the point-in-time at
       which to start watching for changes.
       If not specified, the watch will begin at the current head revision
       of the datastore, returning any updates that occur after the caller
       makes the request.
       Note that if this cursor references a point-in-time containing data
       that has been garbage collected, an error will be returned.
       
      .authzed.api.v1.ZedToken optional_start_cursor = 2;
    • clearOptionalStartCursor

      public WatchRequest.Builder clearOptionalStartCursor()
       optional_start_cursor is the ZedToken holding the point-in-time at
       which to start watching for changes.
       If not specified, the watch will begin at the current head revision
       of the datastore, returning any updates that occur after the caller
       makes the request.
       Note that if this cursor references a point-in-time containing data
       that has been garbage collected, an error will be returned.
       
      .authzed.api.v1.ZedToken optional_start_cursor = 2;
    • getOptionalStartCursorBuilder

      public ZedToken.Builder getOptionalStartCursorBuilder()
       optional_start_cursor is the ZedToken holding the point-in-time at
       which to start watching for changes.
       If not specified, the watch will begin at the current head revision
       of the datastore, returning any updates that occur after the caller
       makes the request.
       Note that if this cursor references a point-in-time containing data
       that has been garbage collected, an error will be returned.
       
      .authzed.api.v1.ZedToken optional_start_cursor = 2;
    • getOptionalStartCursorOrBuilder

      public ZedTokenOrBuilder getOptionalStartCursorOrBuilder()
       optional_start_cursor is the ZedToken holding the point-in-time at
       which to start watching for changes.
       If not specified, the watch will begin at the current head revision
       of the datastore, returning any updates that occur after the caller
       makes the request.
       Note that if this cursor references a point-in-time containing data
       that has been garbage collected, an error will be returned.
       
      .authzed.api.v1.ZedToken optional_start_cursor = 2;
      Specified by:
      getOptionalStartCursorOrBuilder in interface WatchRequestOrBuilder
    • getOptionalRelationshipFiltersList

      public List<RelationshipFilter> getOptionalRelationshipFiltersList()
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
      Specified by:
      getOptionalRelationshipFiltersList in interface WatchRequestOrBuilder
    • getOptionalRelationshipFiltersCount

      public int getOptionalRelationshipFiltersCount()
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
      Specified by:
      getOptionalRelationshipFiltersCount in interface WatchRequestOrBuilder
    • getOptionalRelationshipFilters

      public RelationshipFilter getOptionalRelationshipFilters(int index)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
      Specified by:
      getOptionalRelationshipFilters in interface WatchRequestOrBuilder
    • setOptionalRelationshipFilters

      public WatchRequest.Builder setOptionalRelationshipFilters(int index, RelationshipFilter value)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • setOptionalRelationshipFilters

      public WatchRequest.Builder setOptionalRelationshipFilters(int index, RelationshipFilter.Builder builderForValue)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • addOptionalRelationshipFilters

      public WatchRequest.Builder addOptionalRelationshipFilters(RelationshipFilter value)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • addOptionalRelationshipFilters

      public WatchRequest.Builder addOptionalRelationshipFilters(int index, RelationshipFilter value)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • addOptionalRelationshipFilters

      public WatchRequest.Builder addOptionalRelationshipFilters(RelationshipFilter.Builder builderForValue)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • addOptionalRelationshipFilters

      public WatchRequest.Builder addOptionalRelationshipFilters(int index, RelationshipFilter.Builder builderForValue)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • addAllOptionalRelationshipFilters

      public WatchRequest.Builder addAllOptionalRelationshipFilters(Iterable<? extends RelationshipFilter> values)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • clearOptionalRelationshipFilters

      public WatchRequest.Builder clearOptionalRelationshipFilters()
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • removeOptionalRelationshipFilters

      public WatchRequest.Builder removeOptionalRelationshipFilters(int index)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • getOptionalRelationshipFiltersBuilder

      public RelationshipFilter.Builder getOptionalRelationshipFiltersBuilder(int index)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • getOptionalRelationshipFiltersOrBuilder

      public RelationshipFilterOrBuilder getOptionalRelationshipFiltersOrBuilder(int index)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
      Specified by:
      getOptionalRelationshipFiltersOrBuilder in interface WatchRequestOrBuilder
    • getOptionalRelationshipFiltersOrBuilderList

      public List<? extends RelationshipFilterOrBuilder> getOptionalRelationshipFiltersOrBuilderList()
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
      Specified by:
      getOptionalRelationshipFiltersOrBuilderList in interface WatchRequestOrBuilder
    • addOptionalRelationshipFiltersBuilder

      public RelationshipFilter.Builder addOptionalRelationshipFiltersBuilder()
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • addOptionalRelationshipFiltersBuilder

      public RelationshipFilter.Builder addOptionalRelationshipFiltersBuilder(int index)
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;
    • getOptionalRelationshipFiltersBuilderList

      public List<RelationshipFilter.Builder> getOptionalRelationshipFiltersBuilderList()
       optional_relationship_filters, if specified, indicates the
       filter(s) to apply to each relationship to be returned by watch.
       The relationship will be returned as long as at least one filter matches,
       this allows clients to match relationships on multiple filters on a single watch call.
       If specified, optional_object_types cannot be used.
       
      repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3;