Class RelationshipFilter.Builder

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

public static final class RelationshipFilter.Builder extends com.google.protobuf.GeneratedMessage.Builder<RelationshipFilter.Builder> implements RelationshipFilterOrBuilder
 RelationshipFilter is a collection of filters which when applied to a
 relationship will return relationships that have exactly matching fields.

 All fields are optional and if left unspecified will not filter relationships,
 but at least one field must be specified.

 NOTE: The performance of the API will be affected by the selection of fields
 on which to filter. If a field is not indexed, the performance of the API
 can be significantly slower.
 
Protobuf type authzed.api.v1.RelationshipFilter
  • 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<RelationshipFilter.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<RelationshipFilter.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<RelationshipFilter.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

      public RelationshipFilter.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<RelationshipFilter.Builder>
      Throws:
      IOException
    • getResourceType

      public String getResourceType()
       resource_type is the *optional* resource type of the relationship.
       NOTE: It is not prefixed with "optional_" for legacy compatibility.
       
      string resource_type = 1 [(.validate.rules) = { ... }
      Specified by:
      getResourceType in interface RelationshipFilterOrBuilder
      Returns:
      The resourceType.
    • getResourceTypeBytes

      public com.google.protobuf.ByteString getResourceTypeBytes()
       resource_type is the *optional* resource type of the relationship.
       NOTE: It is not prefixed with "optional_" for legacy compatibility.
       
      string resource_type = 1 [(.validate.rules) = { ... }
      Specified by:
      getResourceTypeBytes in interface RelationshipFilterOrBuilder
      Returns:
      The bytes for resourceType.
    • setResourceType

      public RelationshipFilter.Builder setResourceType(String value)
       resource_type is the *optional* resource type of the relationship.
       NOTE: It is not prefixed with "optional_" for legacy compatibility.
       
      string resource_type = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The resourceType to set.
      Returns:
      This builder for chaining.
    • clearResourceType

      public RelationshipFilter.Builder clearResourceType()
       resource_type is the *optional* resource type of the relationship.
       NOTE: It is not prefixed with "optional_" for legacy compatibility.
       
      string resource_type = 1 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setResourceTypeBytes

      public RelationshipFilter.Builder setResourceTypeBytes(com.google.protobuf.ByteString value)
       resource_type is the *optional* resource type of the relationship.
       NOTE: It is not prefixed with "optional_" for legacy compatibility.
       
      string resource_type = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for resourceType to set.
      Returns:
      This builder for chaining.
    • getOptionalResourceId

      public String getOptionalResourceId()
       optional_resource_id is the *optional* resource ID of the relationship.
       If specified, optional_resource_id_prefix cannot be specified.
       
      string optional_resource_id = 2 [(.validate.rules) = { ... }
      Specified by:
      getOptionalResourceId in interface RelationshipFilterOrBuilder
      Returns:
      The optionalResourceId.
    • getOptionalResourceIdBytes

      public com.google.protobuf.ByteString getOptionalResourceIdBytes()
       optional_resource_id is the *optional* resource ID of the relationship.
       If specified, optional_resource_id_prefix cannot be specified.
       
      string optional_resource_id = 2 [(.validate.rules) = { ... }
      Specified by:
      getOptionalResourceIdBytes in interface RelationshipFilterOrBuilder
      Returns:
      The bytes for optionalResourceId.
    • setOptionalResourceId

      public RelationshipFilter.Builder setOptionalResourceId(String value)
       optional_resource_id is the *optional* resource ID of the relationship.
       If specified, optional_resource_id_prefix cannot be specified.
       
      string optional_resource_id = 2 [(.validate.rules) = { ... }
      Parameters:
      value - The optionalResourceId to set.
      Returns:
      This builder for chaining.
    • clearOptionalResourceId

      public RelationshipFilter.Builder clearOptionalResourceId()
       optional_resource_id is the *optional* resource ID of the relationship.
       If specified, optional_resource_id_prefix cannot be specified.
       
      string optional_resource_id = 2 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setOptionalResourceIdBytes

      public RelationshipFilter.Builder setOptionalResourceIdBytes(com.google.protobuf.ByteString value)
       optional_resource_id is the *optional* resource ID of the relationship.
       If specified, optional_resource_id_prefix cannot be specified.
       
      string optional_resource_id = 2 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for optionalResourceId to set.
      Returns:
      This builder for chaining.
    • getOptionalResourceIdPrefix

      public String getOptionalResourceIdPrefix()
       optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
       If specified, optional_resource_id cannot be specified.
       
      string optional_resource_id_prefix = 5 [(.validate.rules) = { ... }
      Specified by:
      getOptionalResourceIdPrefix in interface RelationshipFilterOrBuilder
      Returns:
      The optionalResourceIdPrefix.
    • getOptionalResourceIdPrefixBytes

      public com.google.protobuf.ByteString getOptionalResourceIdPrefixBytes()
       optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
       If specified, optional_resource_id cannot be specified.
       
      string optional_resource_id_prefix = 5 [(.validate.rules) = { ... }
      Specified by:
      getOptionalResourceIdPrefixBytes in interface RelationshipFilterOrBuilder
      Returns:
      The bytes for optionalResourceIdPrefix.
    • setOptionalResourceIdPrefix

      public RelationshipFilter.Builder setOptionalResourceIdPrefix(String value)
       optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
       If specified, optional_resource_id cannot be specified.
       
      string optional_resource_id_prefix = 5 [(.validate.rules) = { ... }
      Parameters:
      value - The optionalResourceIdPrefix to set.
      Returns:
      This builder for chaining.
    • clearOptionalResourceIdPrefix

      public RelationshipFilter.Builder clearOptionalResourceIdPrefix()
       optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
       If specified, optional_resource_id cannot be specified.
       
      string optional_resource_id_prefix = 5 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setOptionalResourceIdPrefixBytes

      public RelationshipFilter.Builder setOptionalResourceIdPrefixBytes(com.google.protobuf.ByteString value)
       optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
       If specified, optional_resource_id cannot be specified.
       
      string optional_resource_id_prefix = 5 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for optionalResourceIdPrefix to set.
      Returns:
      This builder for chaining.
    • getOptionalRelation

      public String getOptionalRelation()
       relation is the *optional* relation of the relationship.
       
      string optional_relation = 3 [(.validate.rules) = { ... }
      Specified by:
      getOptionalRelation in interface RelationshipFilterOrBuilder
      Returns:
      The optionalRelation.
    • getOptionalRelationBytes

      public com.google.protobuf.ByteString getOptionalRelationBytes()
       relation is the *optional* relation of the relationship.
       
      string optional_relation = 3 [(.validate.rules) = { ... }
      Specified by:
      getOptionalRelationBytes in interface RelationshipFilterOrBuilder
      Returns:
      The bytes for optionalRelation.
    • setOptionalRelation

      public RelationshipFilter.Builder setOptionalRelation(String value)
       relation is the *optional* relation of the relationship.
       
      string optional_relation = 3 [(.validate.rules) = { ... }
      Parameters:
      value - The optionalRelation to set.
      Returns:
      This builder for chaining.
    • clearOptionalRelation

      public RelationshipFilter.Builder clearOptionalRelation()
       relation is the *optional* relation of the relationship.
       
      string optional_relation = 3 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setOptionalRelationBytes

      public RelationshipFilter.Builder setOptionalRelationBytes(com.google.protobuf.ByteString value)
       relation is the *optional* relation of the relationship.
       
      string optional_relation = 3 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for optionalRelation to set.
      Returns:
      This builder for chaining.
    • hasOptionalSubjectFilter

      public boolean hasOptionalSubjectFilter()
       optional_subject_filter is the optional filter for the subjects of the relationships.
       
      .authzed.api.v1.SubjectFilter optional_subject_filter = 4;
      Specified by:
      hasOptionalSubjectFilter in interface RelationshipFilterOrBuilder
      Returns:
      Whether the optionalSubjectFilter field is set.
    • getOptionalSubjectFilter

      public SubjectFilter getOptionalSubjectFilter()
       optional_subject_filter is the optional filter for the subjects of the relationships.
       
      .authzed.api.v1.SubjectFilter optional_subject_filter = 4;
      Specified by:
      getOptionalSubjectFilter in interface RelationshipFilterOrBuilder
      Returns:
      The optionalSubjectFilter.
    • setOptionalSubjectFilter

      public RelationshipFilter.Builder setOptionalSubjectFilter(SubjectFilter value)
       optional_subject_filter is the optional filter for the subjects of the relationships.
       
      .authzed.api.v1.SubjectFilter optional_subject_filter = 4;
    • setOptionalSubjectFilter

      public RelationshipFilter.Builder setOptionalSubjectFilter(SubjectFilter.Builder builderForValue)
       optional_subject_filter is the optional filter for the subjects of the relationships.
       
      .authzed.api.v1.SubjectFilter optional_subject_filter = 4;
    • mergeOptionalSubjectFilter

      public RelationshipFilter.Builder mergeOptionalSubjectFilter(SubjectFilter value)
       optional_subject_filter is the optional filter for the subjects of the relationships.
       
      .authzed.api.v1.SubjectFilter optional_subject_filter = 4;
    • clearOptionalSubjectFilter

      public RelationshipFilter.Builder clearOptionalSubjectFilter()
       optional_subject_filter is the optional filter for the subjects of the relationships.
       
      .authzed.api.v1.SubjectFilter optional_subject_filter = 4;
    • getOptionalSubjectFilterBuilder

      public SubjectFilter.Builder getOptionalSubjectFilterBuilder()
       optional_subject_filter is the optional filter for the subjects of the relationships.
       
      .authzed.api.v1.SubjectFilter optional_subject_filter = 4;
    • getOptionalSubjectFilterOrBuilder

      public SubjectFilterOrBuilder getOptionalSubjectFilterOrBuilder()
       optional_subject_filter is the optional filter for the subjects of the relationships.
       
      .authzed.api.v1.SubjectFilter optional_subject_filter = 4;
      Specified by:
      getOptionalSubjectFilterOrBuilder in interface RelationshipFilterOrBuilder