Class LookupSubjectsRequest

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.authzed.api.v1.LookupSubjectsRequest
All Implemented Interfaces:
LookupSubjectsRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

public final class LookupSubjectsRequest extends com.google.protobuf.GeneratedMessage implements LookupSubjectsRequestOrBuilder
 LookupSubjectsRequest performs a lookup of all subjects of a particular
 kind for which the subject has the specified permission or the relation in
 which the subject exists, streaming back the IDs of those subjects.
 
Protobuf type authzed.api.v1.LookupSubjectsRequest
See Also:
  • Field Details

    • CONSISTENCY_FIELD_NUMBER

      public static final int CONSISTENCY_FIELD_NUMBER
      See Also:
    • RESOURCE_FIELD_NUMBER

      public static final int RESOURCE_FIELD_NUMBER
      See Also:
    • PERMISSION_FIELD_NUMBER

      public static final int PERMISSION_FIELD_NUMBER
      See Also:
    • SUBJECT_OBJECT_TYPE_FIELD_NUMBER

      public static final int SUBJECT_OBJECT_TYPE_FIELD_NUMBER
      See Also:
    • OPTIONAL_SUBJECT_RELATION_FIELD_NUMBER

      public static final int OPTIONAL_SUBJECT_RELATION_FIELD_NUMBER
      See Also:
    • CONTEXT_FIELD_NUMBER

      public static final int CONTEXT_FIELD_NUMBER
      See Also:
    • OPTIONAL_CONCRETE_LIMIT_FIELD_NUMBER

      public static final int OPTIONAL_CONCRETE_LIMIT_FIELD_NUMBER
      See Also:
    • OPTIONAL_CURSOR_FIELD_NUMBER

      public static final int OPTIONAL_CURSOR_FIELD_NUMBER
      See Also:
    • WILDCARD_OPTION_FIELD_NUMBER

      public static final int WILDCARD_OPTION_FIELD_NUMBER
      See Also:
  • 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
    • hasConsistency

      public boolean hasConsistency()
      .authzed.api.v1.Consistency consistency = 1;
      Specified by:
      hasConsistency in interface LookupSubjectsRequestOrBuilder
      Returns:
      Whether the consistency field is set.
    • getConsistency

      public Consistency getConsistency()
      .authzed.api.v1.Consistency consistency = 1;
      Specified by:
      getConsistency in interface LookupSubjectsRequestOrBuilder
      Returns:
      The consistency.
    • getConsistencyOrBuilder

      public ConsistencyOrBuilder getConsistencyOrBuilder()
      .authzed.api.v1.Consistency consistency = 1;
      Specified by:
      getConsistencyOrBuilder in interface LookupSubjectsRequestOrBuilder
    • hasResource

      public boolean hasResource()
       resource is the resource for which all matching subjects for the permission
       or relation will be returned.
       
      .authzed.api.v1.ObjectReference resource = 2 [(.validate.rules) = { ... }
      Specified by:
      hasResource in interface LookupSubjectsRequestOrBuilder
      Returns:
      Whether the resource field is set.
    • getResource

      public ObjectReference getResource()
       resource is the resource for which all matching subjects for the permission
       or relation will be returned.
       
      .authzed.api.v1.ObjectReference resource = 2 [(.validate.rules) = { ... }
      Specified by:
      getResource in interface LookupSubjectsRequestOrBuilder
      Returns:
      The resource.
    • getResourceOrBuilder

      public ObjectReferenceOrBuilder getResourceOrBuilder()
       resource is the resource for which all matching subjects for the permission
       or relation will be returned.
       
      .authzed.api.v1.ObjectReference resource = 2 [(.validate.rules) = { ... }
      Specified by:
      getResourceOrBuilder in interface LookupSubjectsRequestOrBuilder
    • getPermission

      public String getPermission()
       permission is the name of the permission (or relation) for which to find
       the subjects.
       
      string permission = 3 [(.validate.rules) = { ... }
      Specified by:
      getPermission in interface LookupSubjectsRequestOrBuilder
      Returns:
      The permission.
    • getPermissionBytes

      public com.google.protobuf.ByteString getPermissionBytes()
       permission is the name of the permission (or relation) for which to find
       the subjects.
       
      string permission = 3 [(.validate.rules) = { ... }
      Specified by:
      getPermissionBytes in interface LookupSubjectsRequestOrBuilder
      Returns:
      The bytes for permission.
    • getSubjectObjectType

      public String getSubjectObjectType()
       subject_object_type is the type of subject object for which the IDs will
       be returned.
       
      string subject_object_type = 4 [(.validate.rules) = { ... }
      Specified by:
      getSubjectObjectType in interface LookupSubjectsRequestOrBuilder
      Returns:
      The subjectObjectType.
    • getSubjectObjectTypeBytes

      public com.google.protobuf.ByteString getSubjectObjectTypeBytes()
       subject_object_type is the type of subject object for which the IDs will
       be returned.
       
      string subject_object_type = 4 [(.validate.rules) = { ... }
      Specified by:
      getSubjectObjectTypeBytes in interface LookupSubjectsRequestOrBuilder
      Returns:
      The bytes for subjectObjectType.
    • getOptionalSubjectRelation

      public String getOptionalSubjectRelation()
       optional_subject_relation is the optional relation for the subject.
       
      string optional_subject_relation = 5 [(.validate.rules) = { ... }
      Specified by:
      getOptionalSubjectRelation in interface LookupSubjectsRequestOrBuilder
      Returns:
      The optionalSubjectRelation.
    • getOptionalSubjectRelationBytes

      public com.google.protobuf.ByteString getOptionalSubjectRelationBytes()
       optional_subject_relation is the optional relation for the subject.
       
      string optional_subject_relation = 5 [(.validate.rules) = { ... }
      Specified by:
      getOptionalSubjectRelationBytes in interface LookupSubjectsRequestOrBuilder
      Returns:
      The bytes for optionalSubjectRelation.
    • hasContext

      public boolean hasContext()
       context consists of named values that are injected into the caveat evaluation context
       
      .google.protobuf.Struct context = 6 [(.validate.rules) = { ... }
      Specified by:
      hasContext in interface LookupSubjectsRequestOrBuilder
      Returns:
      Whether the context field is set.
    • getContext

      public com.google.protobuf.Struct getContext()
       context consists of named values that are injected into the caveat evaluation context
       
      .google.protobuf.Struct context = 6 [(.validate.rules) = { ... }
      Specified by:
      getContext in interface LookupSubjectsRequestOrBuilder
      Returns:
      The context.
    • getContextOrBuilder

      public com.google.protobuf.StructOrBuilder getContextOrBuilder()
       context consists of named values that are injected into the caveat evaluation context
       
      .google.protobuf.Struct context = 6 [(.validate.rules) = { ... }
      Specified by:
      getContextOrBuilder in interface LookupSubjectsRequestOrBuilder
    • getOptionalConcreteLimit

      public int getOptionalConcreteLimit()
       optional_concrete_limit, if non-zero, specifies the limit on the number of
       *concrete* (non-wildcard) subjects to return before the stream is closed on the
       server side. With the default value of zero, the stream will continue resolving
       concrete subjects until exhausted or the stream is closed due to the client or
       a network issue.
      
       NOTE: Wildcard subjects ("*") have special treatment when cursors and limits are used. Because
       wildcards can apply to *any* concrete subjects, if a wildcard subject is found within the dataset,
       a wildcard subject can be returned for *all* LookupSubjects calls, regardless of the cursor or
       limit.
      
       For example, if wildcards are requested, a wildcard subject exists, there is a specified limit
       of 10 concrete subjects, and at least 10 concrete subjects exist, the API will return 11 subjects
       in total: the 10 concrete + the wildcard
      
       Furthermore, if a wildcard has a set of exclusions generated by the dataset,
       the exclusions *will respect the cursor* and only a *partial* set of exclusions will be returned
       for each invocation of the API.
      
       ***IT IS UP TO THE CALLER IN THIS CASE TO COMBINE THE EXCLUSIONS IF DESIRED***
       
      uint32 optional_concrete_limit = 7 [(.validate.rules) = { ... }
      Specified by:
      getOptionalConcreteLimit in interface LookupSubjectsRequestOrBuilder
      Returns:
      The optionalConcreteLimit.
    • hasOptionalCursor

      public boolean hasOptionalCursor()
       optional_cursor, if specified, indicates the cursor after which results should resume being returned.
       The cursor can be found on the LookupSubjectsResponse object.
      
       NOTE: See above for notes about how cursors interact with wildcard subjects.
       
      .authzed.api.v1.Cursor optional_cursor = 8;
      Specified by:
      hasOptionalCursor in interface LookupSubjectsRequestOrBuilder
      Returns:
      Whether the optionalCursor field is set.
    • getOptionalCursor

      public Cursor getOptionalCursor()
       optional_cursor, if specified, indicates the cursor after which results should resume being returned.
       The cursor can be found on the LookupSubjectsResponse object.
      
       NOTE: See above for notes about how cursors interact with wildcard subjects.
       
      .authzed.api.v1.Cursor optional_cursor = 8;
      Specified by:
      getOptionalCursor in interface LookupSubjectsRequestOrBuilder
      Returns:
      The optionalCursor.
    • getOptionalCursorOrBuilder

      public CursorOrBuilder getOptionalCursorOrBuilder()
       optional_cursor, if specified, indicates the cursor after which results should resume being returned.
       The cursor can be found on the LookupSubjectsResponse object.
      
       NOTE: See above for notes about how cursors interact with wildcard subjects.
       
      .authzed.api.v1.Cursor optional_cursor = 8;
      Specified by:
      getOptionalCursorOrBuilder in interface LookupSubjectsRequestOrBuilder
    • getWildcardOptionValue

      public int getWildcardOptionValue()
       wildcard_option specifies whether wildcards should be returned by LookupSubjects.
       For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
       
      .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9;
      Specified by:
      getWildcardOptionValue in interface LookupSubjectsRequestOrBuilder
      Returns:
      The enum numeric value on the wire for wildcardOption.
    • getWildcardOption

      public LookupSubjectsRequest.WildcardOption getWildcardOption()
       wildcard_option specifies whether wildcards should be returned by LookupSubjects.
       For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
       
      .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9;
      Specified by:
      getWildcardOption in interface LookupSubjectsRequestOrBuilder
      Returns:
      The wildcardOption.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static LookupSubjectsRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LookupSubjectsRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LookupSubjectsRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LookupSubjectsRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LookupSubjectsRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LookupSubjectsRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LookupSubjectsRequest parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LookupSubjectsRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static LookupSubjectsRequest parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static LookupSubjectsRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LookupSubjectsRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LookupSubjectsRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public LookupSubjectsRequest.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static LookupSubjectsRequest.Builder newBuilder()
    • newBuilder

      public static LookupSubjectsRequest.Builder newBuilder(LookupSubjectsRequest prototype)
    • toBuilder

      public LookupSubjectsRequest.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected LookupSubjectsRequest.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static LookupSubjectsRequest getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<LookupSubjectsRequest> parser()
    • getParserForType

      public com.google.protobuf.Parser<LookupSubjectsRequest> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public LookupSubjectsRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder