Package com.authzed.api.v1
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
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.static enum
Protobuf enumauthzed.api.v1.LookupSubjectsRequest.WildcardOption
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,
BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParent
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessage
memoizedSize
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionboolean
.authzed.api.v1.Consistency consistency = 1;
.authzed.api.v1.Consistency consistency = 1;
com.google.protobuf.Struct
context consists of named values that are injected into the caveat evaluation contextcom.google.protobuf.StructOrBuilder
context consists of named values that are injected into the caveat evaluation contextstatic LookupSubjectsRequest
static final com.google.protobuf.Descriptors.Descriptor
int
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.optional_cursor, if specified, indicates the cursor after which results should resume being returned.optional_cursor, if specified, indicates the cursor after which results should resume being returned.optional_subject_relation is the optional relation for the subject.com.google.protobuf.ByteString
optional_subject_relation is the optional relation for the subject.com.google.protobuf.Parser<LookupSubjectsRequest>
permission is the name of the permission (or relation) for which to find the subjects.com.google.protobuf.ByteString
permission is the name of the permission (or relation) for which to find the subjects.resource is the resource for which all matching subjects for the permission or relation will be returned.resource is the resource for which all matching subjects for the permission or relation will be returned.int
subject_object_type is the type of subject object for which the IDs will be returned.com.google.protobuf.ByteString
subject_object_type is the type of subject object for which the IDs will be returned.wildcard_option specifies whether wildcards should be returned by LookupSubjects.int
wildcard_option specifies whether wildcards should be returned by LookupSubjects.boolean
.authzed.api.v1.Consistency consistency = 1;
boolean
context consists of named values that are injected into the caveat evaluation contextint
hashCode()
boolean
optional_cursor, if specified, indicates the cursor after which results should resume being returned.boolean
resource is the resource for which all matching subjects for the permission or relation will be returned.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
newBuilder
(LookupSubjectsRequest prototype) protected LookupSubjectsRequest.Builder
newBuilderForType
(com.google.protobuf.AbstractMessage.BuilderParent parent) static LookupSubjectsRequest
parseDelimitedFrom
(InputStream input) static LookupSubjectsRequest
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LookupSubjectsRequest
parseFrom
(byte[] data) static LookupSubjectsRequest
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LookupSubjectsRequest
parseFrom
(com.google.protobuf.ByteString data) static LookupSubjectsRequest
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LookupSubjectsRequest
parseFrom
(com.google.protobuf.CodedInputStream input) static LookupSubjectsRequest
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LookupSubjectsRequest
parseFrom
(InputStream input) static LookupSubjectsRequest
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LookupSubjectsRequest
parseFrom
(ByteBuffer data) static LookupSubjectsRequest
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<LookupSubjectsRequest>
parser()
void
writeTo
(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
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 classcom.google.protobuf.GeneratedMessage
-
hasConsistency
public boolean hasConsistency().authzed.api.v1.Consistency consistency = 1;
- Specified by:
hasConsistency
in interfaceLookupSubjectsRequestOrBuilder
- Returns:
- Whether the consistency field is set.
-
getConsistency
.authzed.api.v1.Consistency consistency = 1;
- Specified by:
getConsistency
in interfaceLookupSubjectsRequestOrBuilder
- Returns:
- The consistency.
-
getConsistencyOrBuilder
.authzed.api.v1.Consistency consistency = 1;
- Specified by:
getConsistencyOrBuilder
in interfaceLookupSubjectsRequestOrBuilder
-
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 interfaceLookupSubjectsRequestOrBuilder
- Returns:
- Whether the resource field is set.
-
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 interfaceLookupSubjectsRequestOrBuilder
- Returns:
- The resource.
-
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 interfaceLookupSubjectsRequestOrBuilder
-
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 interfaceLookupSubjectsRequestOrBuilder
- 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 interfaceLookupSubjectsRequestOrBuilder
- Returns:
- The bytes for permission.
-
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 interfaceLookupSubjectsRequestOrBuilder
- 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 interfaceLookupSubjectsRequestOrBuilder
- Returns:
- The bytes for subjectObjectType.
-
getOptionalSubjectRelation
optional_subject_relation is the optional relation for the subject.
string optional_subject_relation = 5 [(.validate.rules) = { ... }
- Specified by:
getOptionalSubjectRelation
in interfaceLookupSubjectsRequestOrBuilder
- 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 interfaceLookupSubjectsRequestOrBuilder
- 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 interfaceLookupSubjectsRequestOrBuilder
- 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 interfaceLookupSubjectsRequestOrBuilder
- 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 interfaceLookupSubjectsRequestOrBuilder
-
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 interfaceLookupSubjectsRequestOrBuilder
- 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 interfaceLookupSubjectsRequestOrBuilder
- Returns:
- Whether the optionalCursor field is set.
-
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 interfaceLookupSubjectsRequestOrBuilder
- Returns:
- The optionalCursor.
-
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 interfaceLookupSubjectsRequestOrBuilder
-
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 interfaceLookupSubjectsRequestOrBuilder
- Returns:
- The enum numeric value on the wire for 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 interfaceLookupSubjectsRequestOrBuilder
- Returns:
- The wildcardOption.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.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
- Throws:
IOException
-
parseFrom
public static LookupSubjectsRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected LookupSubjectsRequest.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForType
in classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-