Class Relationship.Builder

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

public static final class Relationship.Builder extends com.google.protobuf.GeneratedMessage.Builder<Relationship.Builder> implements RelationshipOrBuilder
 Relationship specifies how a resource relates to a subject. Relationships
 form the data for the graph over which all permissions questions are
 answered.
 
Protobuf type authzed.api.v1.Relationship
  • 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<Relationship.Builder>
    • clear

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

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

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

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

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

      public Relationship.Builder mergeFrom(Relationship other)
    • isInitialized

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

      public Relationship.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<Relationship.Builder>
      Throws:
      IOException
    • hasResource

      public boolean hasResource()
       resource is the resource to which the subject is related, in some manner
       
      .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... }
      Specified by:
      hasResource in interface RelationshipOrBuilder
      Returns:
      Whether the resource field is set.
    • getResource

      public ObjectReference getResource()
       resource is the resource to which the subject is related, in some manner
       
      .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... }
      Specified by:
      getResource in interface RelationshipOrBuilder
      Returns:
      The resource.
    • setResource

      public Relationship.Builder setResource(ObjectReference value)
       resource is the resource to which the subject is related, in some manner
       
      .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... }
    • setResource

      public Relationship.Builder setResource(ObjectReference.Builder builderForValue)
       resource is the resource to which the subject is related, in some manner
       
      .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... }
    • mergeResource

      public Relationship.Builder mergeResource(ObjectReference value)
       resource is the resource to which the subject is related, in some manner
       
      .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... }
    • clearResource

      public Relationship.Builder clearResource()
       resource is the resource to which the subject is related, in some manner
       
      .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... }
    • getResourceBuilder

      public ObjectReference.Builder getResourceBuilder()
       resource is the resource to which the subject is related, in some manner
       
      .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... }
    • getResourceOrBuilder

      public ObjectReferenceOrBuilder getResourceOrBuilder()
       resource is the resource to which the subject is related, in some manner
       
      .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... }
      Specified by:
      getResourceOrBuilder in interface RelationshipOrBuilder
    • getRelation

      public String getRelation()
       relation is how the resource and subject are related.
       
      string relation = 2 [(.validate.rules) = { ... }
      Specified by:
      getRelation in interface RelationshipOrBuilder
      Returns:
      The relation.
    • getRelationBytes

      public com.google.protobuf.ByteString getRelationBytes()
       relation is how the resource and subject are related.
       
      string relation = 2 [(.validate.rules) = { ... }
      Specified by:
      getRelationBytes in interface RelationshipOrBuilder
      Returns:
      The bytes for relation.
    • setRelation

      public Relationship.Builder setRelation(String value)
       relation is how the resource and subject are related.
       
      string relation = 2 [(.validate.rules) = { ... }
      Parameters:
      value - The relation to set.
      Returns:
      This builder for chaining.
    • clearRelation

      public Relationship.Builder clearRelation()
       relation is how the resource and subject are related.
       
      string relation = 2 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setRelationBytes

      public Relationship.Builder setRelationBytes(com.google.protobuf.ByteString value)
       relation is how the resource and subject are related.
       
      string relation = 2 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for relation to set.
      Returns:
      This builder for chaining.
    • hasSubject

      public boolean hasSubject()
       subject is the subject to which the resource is related, in some manner.
       
      .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... }
      Specified by:
      hasSubject in interface RelationshipOrBuilder
      Returns:
      Whether the subject field is set.
    • getSubject

      public SubjectReference getSubject()
       subject is the subject to which the resource is related, in some manner.
       
      .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... }
      Specified by:
      getSubject in interface RelationshipOrBuilder
      Returns:
      The subject.
    • setSubject

      public Relationship.Builder setSubject(SubjectReference value)
       subject is the subject to which the resource is related, in some manner.
       
      .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... }
    • setSubject

      public Relationship.Builder setSubject(SubjectReference.Builder builderForValue)
       subject is the subject to which the resource is related, in some manner.
       
      .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... }
    • mergeSubject

      public Relationship.Builder mergeSubject(SubjectReference value)
       subject is the subject to which the resource is related, in some manner.
       
      .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... }
    • clearSubject

      public Relationship.Builder clearSubject()
       subject is the subject to which the resource is related, in some manner.
       
      .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... }
    • getSubjectBuilder

      public SubjectReference.Builder getSubjectBuilder()
       subject is the subject to which the resource is related, in some manner.
       
      .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... }
    • getSubjectOrBuilder

      public SubjectReferenceOrBuilder getSubjectOrBuilder()
       subject is the subject to which the resource is related, in some manner.
       
      .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... }
      Specified by:
      getSubjectOrBuilder in interface RelationshipOrBuilder
    • hasOptionalCaveat

      public boolean hasOptionalCaveat()
       optional_caveat is a reference to a the caveat that must be enforced over the relationship
       
      .authzed.api.v1.ContextualizedCaveat optional_caveat = 4 [(.validate.rules) = { ... }
      Specified by:
      hasOptionalCaveat in interface RelationshipOrBuilder
      Returns:
      Whether the optionalCaveat field is set.
    • getOptionalCaveat

      public ContextualizedCaveat getOptionalCaveat()
       optional_caveat is a reference to a the caveat that must be enforced over the relationship
       
      .authzed.api.v1.ContextualizedCaveat optional_caveat = 4 [(.validate.rules) = { ... }
      Specified by:
      getOptionalCaveat in interface RelationshipOrBuilder
      Returns:
      The optionalCaveat.
    • setOptionalCaveat

      public Relationship.Builder setOptionalCaveat(ContextualizedCaveat value)
       optional_caveat is a reference to a the caveat that must be enforced over the relationship
       
      .authzed.api.v1.ContextualizedCaveat optional_caveat = 4 [(.validate.rules) = { ... }
    • setOptionalCaveat

      public Relationship.Builder setOptionalCaveat(ContextualizedCaveat.Builder builderForValue)
       optional_caveat is a reference to a the caveat that must be enforced over the relationship
       
      .authzed.api.v1.ContextualizedCaveat optional_caveat = 4 [(.validate.rules) = { ... }
    • mergeOptionalCaveat

      public Relationship.Builder mergeOptionalCaveat(ContextualizedCaveat value)
       optional_caveat is a reference to a the caveat that must be enforced over the relationship
       
      .authzed.api.v1.ContextualizedCaveat optional_caveat = 4 [(.validate.rules) = { ... }
    • clearOptionalCaveat

      public Relationship.Builder clearOptionalCaveat()
       optional_caveat is a reference to a the caveat that must be enforced over the relationship
       
      .authzed.api.v1.ContextualizedCaveat optional_caveat = 4 [(.validate.rules) = { ... }
    • getOptionalCaveatBuilder

      public ContextualizedCaveat.Builder getOptionalCaveatBuilder()
       optional_caveat is a reference to a the caveat that must be enforced over the relationship
       
      .authzed.api.v1.ContextualizedCaveat optional_caveat = 4 [(.validate.rules) = { ... }
    • getOptionalCaveatOrBuilder

      public ContextualizedCaveatOrBuilder getOptionalCaveatOrBuilder()
       optional_caveat is a reference to a the caveat that must be enforced over the relationship
       
      .authzed.api.v1.ContextualizedCaveat optional_caveat = 4 [(.validate.rules) = { ... }
      Specified by:
      getOptionalCaveatOrBuilder in interface RelationshipOrBuilder