All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.authzed.api.v1.Core Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: authzed/api/v1/core.proto

package com.authzed.api.v1;

public final class Core {
  private Core() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface RelationshipOrBuilder extends
      // @@protoc_insertion_point(interface_extends:authzed.api.v1.Relationship)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * resource is the resource to which the subject is related, in some manner
     * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } * @return Whether the resource field is set. */ boolean hasResource(); /** *
     * resource is the resource to which the subject is related, in some manner
     * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } * @return The resource. */ com.authzed.api.v1.Core.ObjectReference getResource(); /** *
     * resource is the resource to which the subject is related, in some manner
     * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } */ com.authzed.api.v1.Core.ObjectReferenceOrBuilder getResourceOrBuilder(); /** *
     * relation is how the resource and subject are related.
     * 
* * string relation = 2 [(.validate.rules) = { ... } * @return The relation. */ java.lang.String getRelation(); /** *
     * relation is how the resource and subject are related.
     * 
* * string relation = 2 [(.validate.rules) = { ... } * @return The bytes for relation. */ com.google.protobuf.ByteString getRelationBytes(); /** *
     * subject is the subject to which the resource is related, in some manner.
     * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } * @return Whether the subject field is set. */ boolean hasSubject(); /** *
     * subject is the subject to which the resource is related, in some manner.
     * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } * @return The subject. */ com.authzed.api.v1.Core.SubjectReference getSubject(); /** *
     * subject is the subject to which the resource is related, in some manner.
     * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } */ com.authzed.api.v1.Core.SubjectReferenceOrBuilder getSubjectOrBuilder(); /** *
     * 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) = { ... } * @return Whether the optionalCaveat field is set. */ 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) = { ... } * @return The optionalCaveat. */ com.authzed.api.v1.Core.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) = { ... } */ com.authzed.api.v1.Core.ContextualizedCaveatOrBuilder getOptionalCaveatOrBuilder(); } /** *
   * 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 {@code authzed.api.v1.Relationship} */ public static final class Relationship extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authzed.api.v1.Relationship) RelationshipOrBuilder { private static final long serialVersionUID = 0L; // Use Relationship.newBuilder() to construct. private Relationship(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Relationship() { relation_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Relationship(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_Relationship_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_Relationship_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.Relationship.class, com.authzed.api.v1.Core.Relationship.Builder.class); } public static final int RESOURCE_FIELD_NUMBER = 1; private com.authzed.api.v1.Core.ObjectReference resource_; /** *
     * resource is the resource to which the subject is related, in some manner
     * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } * @return Whether the resource field is set. */ @java.lang.Override public boolean hasResource() { return resource_ != null; } /** *
     * resource is the resource to which the subject is related, in some manner
     * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } * @return The resource. */ @java.lang.Override public com.authzed.api.v1.Core.ObjectReference getResource() { return resource_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : resource_; } /** *
     * resource is the resource to which the subject is related, in some manner
     * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } */ @java.lang.Override public com.authzed.api.v1.Core.ObjectReferenceOrBuilder getResourceOrBuilder() { return resource_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : resource_; } public static final int RELATION_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object relation_ = ""; /** *
     * relation is how the resource and subject are related.
     * 
* * string relation = 2 [(.validate.rules) = { ... } * @return The relation. */ @java.lang.Override public java.lang.String getRelation() { java.lang.Object ref = relation_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); relation_ = s; return s; } } /** *
     * relation is how the resource and subject are related.
     * 
* * string relation = 2 [(.validate.rules) = { ... } * @return The bytes for relation. */ @java.lang.Override public com.google.protobuf.ByteString getRelationBytes() { java.lang.Object ref = relation_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); relation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SUBJECT_FIELD_NUMBER = 3; private com.authzed.api.v1.Core.SubjectReference subject_; /** *
     * subject is the subject to which the resource is related, in some manner.
     * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } * @return Whether the subject field is set. */ @java.lang.Override public boolean hasSubject() { return subject_ != null; } /** *
     * subject is the subject to which the resource is related, in some manner.
     * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } * @return The subject. */ @java.lang.Override public com.authzed.api.v1.Core.SubjectReference getSubject() { return subject_ == null ? com.authzed.api.v1.Core.SubjectReference.getDefaultInstance() : subject_; } /** *
     * subject is the subject to which the resource is related, in some manner.
     * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } */ @java.lang.Override public com.authzed.api.v1.Core.SubjectReferenceOrBuilder getSubjectOrBuilder() { return subject_ == null ? com.authzed.api.v1.Core.SubjectReference.getDefaultInstance() : subject_; } public static final int OPTIONAL_CAVEAT_FIELD_NUMBER = 4; private com.authzed.api.v1.Core.ContextualizedCaveat optionalCaveat_; /** *
     * 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) = { ... } * @return Whether the optionalCaveat field is set. */ @java.lang.Override public boolean hasOptionalCaveat() { return optionalCaveat_ != null; } /** *
     * 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) = { ... } * @return The optionalCaveat. */ @java.lang.Override public com.authzed.api.v1.Core.ContextualizedCaveat getOptionalCaveat() { return optionalCaveat_ == null ? com.authzed.api.v1.Core.ContextualizedCaveat.getDefaultInstance() : optionalCaveat_; } /** *
     * 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) = { ... } */ @java.lang.Override public com.authzed.api.v1.Core.ContextualizedCaveatOrBuilder getOptionalCaveatOrBuilder() { return optionalCaveat_ == null ? com.authzed.api.v1.Core.ContextualizedCaveat.getDefaultInstance() : optionalCaveat_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (resource_ != null) { output.writeMessage(1, getResource()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, relation_); } if (subject_ != null) { output.writeMessage(3, getSubject()); } if (optionalCaveat_ != null) { output.writeMessage(4, getOptionalCaveat()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (resource_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getResource()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, relation_); } if (subject_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getSubject()); } if (optionalCaveat_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getOptionalCaveat()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.authzed.api.v1.Core.Relationship)) { return super.equals(obj); } com.authzed.api.v1.Core.Relationship other = (com.authzed.api.v1.Core.Relationship) obj; if (hasResource() != other.hasResource()) return false; if (hasResource()) { if (!getResource() .equals(other.getResource())) return false; } if (!getRelation() .equals(other.getRelation())) return false; if (hasSubject() != other.hasSubject()) return false; if (hasSubject()) { if (!getSubject() .equals(other.getSubject())) return false; } if (hasOptionalCaveat() != other.hasOptionalCaveat()) return false; if (hasOptionalCaveat()) { if (!getOptionalCaveat() .equals(other.getOptionalCaveat())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasResource()) { hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); } hash = (37 * hash) + RELATION_FIELD_NUMBER; hash = (53 * hash) + getRelation().hashCode(); if (hasSubject()) { hash = (37 * hash) + SUBJECT_FIELD_NUMBER; hash = (53 * hash) + getSubject().hashCode(); } if (hasOptionalCaveat()) { hash = (37 * hash) + OPTIONAL_CAVEAT_FIELD_NUMBER; hash = (53 * hash) + getOptionalCaveat().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.authzed.api.v1.Core.Relationship parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.Relationship parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.Relationship parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.Relationship parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.Relationship parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.Relationship parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.Relationship parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.Relationship parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.Relationship parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.Relationship parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.Relationship parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.Relationship parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.authzed.api.v1.Core.Relationship prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * 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 {@code authzed.api.v1.Relationship} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authzed.api.v1.Relationship) com.authzed.api.v1.Core.RelationshipOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_Relationship_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_Relationship_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.Relationship.class, com.authzed.api.v1.Core.Relationship.Builder.class); } // Construct using com.authzed.api.v1.Core.Relationship.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; resource_ = null; if (resourceBuilder_ != null) { resourceBuilder_.dispose(); resourceBuilder_ = null; } relation_ = ""; subject_ = null; if (subjectBuilder_ != null) { subjectBuilder_.dispose(); subjectBuilder_ = null; } optionalCaveat_ = null; if (optionalCaveatBuilder_ != null) { optionalCaveatBuilder_.dispose(); optionalCaveatBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_Relationship_descriptor; } @java.lang.Override public com.authzed.api.v1.Core.Relationship getDefaultInstanceForType() { return com.authzed.api.v1.Core.Relationship.getDefaultInstance(); } @java.lang.Override public com.authzed.api.v1.Core.Relationship build() { com.authzed.api.v1.Core.Relationship result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.authzed.api.v1.Core.Relationship buildPartial() { com.authzed.api.v1.Core.Relationship result = new com.authzed.api.v1.Core.Relationship(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.authzed.api.v1.Core.Relationship result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.resource_ = resourceBuilder_ == null ? resource_ : resourceBuilder_.build(); } if (((from_bitField0_ & 0x00000002) != 0)) { result.relation_ = relation_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.subject_ = subjectBuilder_ == null ? subject_ : subjectBuilder_.build(); } if (((from_bitField0_ & 0x00000008) != 0)) { result.optionalCaveat_ = optionalCaveatBuilder_ == null ? optionalCaveat_ : optionalCaveatBuilder_.build(); } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.authzed.api.v1.Core.Relationship) { return mergeFrom((com.authzed.api.v1.Core.Relationship)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.authzed.api.v1.Core.Relationship other) { if (other == com.authzed.api.v1.Core.Relationship.getDefaultInstance()) return this; if (other.hasResource()) { mergeResource(other.getResource()); } if (!other.getRelation().isEmpty()) { relation_ = other.relation_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasSubject()) { mergeSubject(other.getSubject()); } if (other.hasOptionalCaveat()) { mergeOptionalCaveat(other.getOptionalCaveat()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getResourceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { relation_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( getSubjectFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( getOptionalCaveatFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.authzed.api.v1.Core.ObjectReference resource_; private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ObjectReference, com.authzed.api.v1.Core.ObjectReference.Builder, com.authzed.api.v1.Core.ObjectReferenceOrBuilder> resourceBuilder_; /** *
       * resource is the resource to which the subject is related, in some manner
       * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } * @return Whether the resource field is set. */ public boolean hasResource() { return ((bitField0_ & 0x00000001) != 0); } /** *
       * resource is the resource to which the subject is related, in some manner
       * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } * @return The resource. */ public com.authzed.api.v1.Core.ObjectReference getResource() { if (resourceBuilder_ == null) { return resource_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : resource_; } else { return resourceBuilder_.getMessage(); } } /** *
       * resource is the resource to which the subject is related, in some manner
       * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } */ public Builder setResource(com.authzed.api.v1.Core.ObjectReference value) { if (resourceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resource_ = value; } else { resourceBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * resource is the resource to which the subject is related, in some manner
       * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } */ public Builder setResource( com.authzed.api.v1.Core.ObjectReference.Builder builderForValue) { if (resourceBuilder_ == null) { resource_ = builderForValue.build(); } else { resourceBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * resource is the resource to which the subject is related, in some manner
       * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } */ public Builder mergeResource(com.authzed.api.v1.Core.ObjectReference value) { if (resourceBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && resource_ != null && resource_ != com.authzed.api.v1.Core.ObjectReference.getDefaultInstance()) { getResourceBuilder().mergeFrom(value); } else { resource_ = value; } } else { resourceBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * resource is the resource to which the subject is related, in some manner
       * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } */ public Builder clearResource() { bitField0_ = (bitField0_ & ~0x00000001); resource_ = null; if (resourceBuilder_ != null) { resourceBuilder_.dispose(); resourceBuilder_ = null; } onChanged(); return this; } /** *
       * resource is the resource to which the subject is related, in some manner
       * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.ObjectReference.Builder getResourceBuilder() { bitField0_ |= 0x00000001; onChanged(); return getResourceFieldBuilder().getBuilder(); } /** *
       * resource is the resource to which the subject is related, in some manner
       * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.ObjectReferenceOrBuilder getResourceOrBuilder() { if (resourceBuilder_ != null) { return resourceBuilder_.getMessageOrBuilder(); } else { return resource_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : resource_; } } /** *
       * resource is the resource to which the subject is related, in some manner
       * 
* * .authzed.api.v1.ObjectReference resource = 1 [(.validate.rules) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ObjectReference, com.authzed.api.v1.Core.ObjectReference.Builder, com.authzed.api.v1.Core.ObjectReferenceOrBuilder> getResourceFieldBuilder() { if (resourceBuilder_ == null) { resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ObjectReference, com.authzed.api.v1.Core.ObjectReference.Builder, com.authzed.api.v1.Core.ObjectReferenceOrBuilder>( getResource(), getParentForChildren(), isClean()); resource_ = null; } return resourceBuilder_; } private java.lang.Object relation_ = ""; /** *
       * relation is how the resource and subject are related.
       * 
* * string relation = 2 [(.validate.rules) = { ... } * @return The relation. */ public java.lang.String getRelation() { java.lang.Object ref = relation_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); relation_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * relation is how the resource and subject are related.
       * 
* * string relation = 2 [(.validate.rules) = { ... } * @return The bytes for relation. */ public com.google.protobuf.ByteString getRelationBytes() { java.lang.Object ref = relation_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); relation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * relation is how the resource and subject are related.
       * 
* * string relation = 2 [(.validate.rules) = { ... } * @param value The relation to set. * @return This builder for chaining. */ public Builder setRelation( java.lang.String value) { if (value == null) { throw new NullPointerException(); } relation_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       * relation is how the resource and subject are related.
       * 
* * string relation = 2 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearRelation() { relation_ = getDefaultInstance().getRelation(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
       * relation is how the resource and subject are related.
       * 
* * string relation = 2 [(.validate.rules) = { ... } * @param value The bytes for relation to set. * @return This builder for chaining. */ public Builder setRelationBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); relation_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private com.authzed.api.v1.Core.SubjectReference subject_; private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.SubjectReference, com.authzed.api.v1.Core.SubjectReference.Builder, com.authzed.api.v1.Core.SubjectReferenceOrBuilder> subjectBuilder_; /** *
       * subject is the subject to which the resource is related, in some manner.
       * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } * @return Whether the subject field is set. */ public boolean hasSubject() { return ((bitField0_ & 0x00000004) != 0); } /** *
       * subject is the subject to which the resource is related, in some manner.
       * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } * @return The subject. */ public com.authzed.api.v1.Core.SubjectReference getSubject() { if (subjectBuilder_ == null) { return subject_ == null ? com.authzed.api.v1.Core.SubjectReference.getDefaultInstance() : subject_; } else { return subjectBuilder_.getMessage(); } } /** *
       * subject is the subject to which the resource is related, in some manner.
       * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } */ public Builder setSubject(com.authzed.api.v1.Core.SubjectReference value) { if (subjectBuilder_ == null) { if (value == null) { throw new NullPointerException(); } subject_ = value; } else { subjectBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
       * subject is the subject to which the resource is related, in some manner.
       * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } */ public Builder setSubject( com.authzed.api.v1.Core.SubjectReference.Builder builderForValue) { if (subjectBuilder_ == null) { subject_ = builderForValue.build(); } else { subjectBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
       * subject is the subject to which the resource is related, in some manner.
       * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } */ public Builder mergeSubject(com.authzed.api.v1.Core.SubjectReference value) { if (subjectBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && subject_ != null && subject_ != com.authzed.api.v1.Core.SubjectReference.getDefaultInstance()) { getSubjectBuilder().mergeFrom(value); } else { subject_ = value; } } else { subjectBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
       * subject is the subject to which the resource is related, in some manner.
       * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } */ public Builder clearSubject() { bitField0_ = (bitField0_ & ~0x00000004); subject_ = null; if (subjectBuilder_ != null) { subjectBuilder_.dispose(); subjectBuilder_ = null; } onChanged(); return this; } /** *
       * subject is the subject to which the resource is related, in some manner.
       * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.SubjectReference.Builder getSubjectBuilder() { bitField0_ |= 0x00000004; onChanged(); return getSubjectFieldBuilder().getBuilder(); } /** *
       * subject is the subject to which the resource is related, in some manner.
       * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.SubjectReferenceOrBuilder getSubjectOrBuilder() { if (subjectBuilder_ != null) { return subjectBuilder_.getMessageOrBuilder(); } else { return subject_ == null ? com.authzed.api.v1.Core.SubjectReference.getDefaultInstance() : subject_; } } /** *
       * subject is the subject to which the resource is related, in some manner.
       * 
* * .authzed.api.v1.SubjectReference subject = 3 [(.validate.rules) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.SubjectReference, com.authzed.api.v1.Core.SubjectReference.Builder, com.authzed.api.v1.Core.SubjectReferenceOrBuilder> getSubjectFieldBuilder() { if (subjectBuilder_ == null) { subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.SubjectReference, com.authzed.api.v1.Core.SubjectReference.Builder, com.authzed.api.v1.Core.SubjectReferenceOrBuilder>( getSubject(), getParentForChildren(), isClean()); subject_ = null; } return subjectBuilder_; } private com.authzed.api.v1.Core.ContextualizedCaveat optionalCaveat_; private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ContextualizedCaveat, com.authzed.api.v1.Core.ContextualizedCaveat.Builder, com.authzed.api.v1.Core.ContextualizedCaveatOrBuilder> optionalCaveatBuilder_; /** *
       * 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) = { ... } * @return Whether the optionalCaveat field is set. */ public boolean hasOptionalCaveat() { return ((bitField0_ & 0x00000008) != 0); } /** *
       * 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) = { ... } * @return The optionalCaveat. */ public com.authzed.api.v1.Core.ContextualizedCaveat getOptionalCaveat() { if (optionalCaveatBuilder_ == null) { return optionalCaveat_ == null ? com.authzed.api.v1.Core.ContextualizedCaveat.getDefaultInstance() : optionalCaveat_; } else { return optionalCaveatBuilder_.getMessage(); } } /** *
       * 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) = { ... } */ public Builder setOptionalCaveat(com.authzed.api.v1.Core.ContextualizedCaveat value) { if (optionalCaveatBuilder_ == null) { if (value == null) { throw new NullPointerException(); } optionalCaveat_ = value; } else { optionalCaveatBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * 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) = { ... } */ public Builder setOptionalCaveat( com.authzed.api.v1.Core.ContextualizedCaveat.Builder builderForValue) { if (optionalCaveatBuilder_ == null) { optionalCaveat_ = builderForValue.build(); } else { optionalCaveatBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * 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) = { ... } */ public Builder mergeOptionalCaveat(com.authzed.api.v1.Core.ContextualizedCaveat value) { if (optionalCaveatBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && optionalCaveat_ != null && optionalCaveat_ != com.authzed.api.v1.Core.ContextualizedCaveat.getDefaultInstance()) { getOptionalCaveatBuilder().mergeFrom(value); } else { optionalCaveat_ = value; } } else { optionalCaveatBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * 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) = { ... } */ public Builder clearOptionalCaveat() { bitField0_ = (bitField0_ & ~0x00000008); optionalCaveat_ = null; if (optionalCaveatBuilder_ != null) { optionalCaveatBuilder_.dispose(); optionalCaveatBuilder_ = null; } onChanged(); return this; } /** *
       * 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) = { ... } */ public com.authzed.api.v1.Core.ContextualizedCaveat.Builder getOptionalCaveatBuilder() { bitField0_ |= 0x00000008; onChanged(); return getOptionalCaveatFieldBuilder().getBuilder(); } /** *
       * 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) = { ... } */ public com.authzed.api.v1.Core.ContextualizedCaveatOrBuilder getOptionalCaveatOrBuilder() { if (optionalCaveatBuilder_ != null) { return optionalCaveatBuilder_.getMessageOrBuilder(); } else { return optionalCaveat_ == null ? com.authzed.api.v1.Core.ContextualizedCaveat.getDefaultInstance() : optionalCaveat_; } } /** *
       * 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) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ContextualizedCaveat, com.authzed.api.v1.Core.ContextualizedCaveat.Builder, com.authzed.api.v1.Core.ContextualizedCaveatOrBuilder> getOptionalCaveatFieldBuilder() { if (optionalCaveatBuilder_ == null) { optionalCaveatBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ContextualizedCaveat, com.authzed.api.v1.Core.ContextualizedCaveat.Builder, com.authzed.api.v1.Core.ContextualizedCaveatOrBuilder>( getOptionalCaveat(), getParentForChildren(), isClean()); optionalCaveat_ = null; } return optionalCaveatBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authzed.api.v1.Relationship) } // @@protoc_insertion_point(class_scope:authzed.api.v1.Relationship) private static final com.authzed.api.v1.Core.Relationship DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.authzed.api.v1.Core.Relationship(); } public static com.authzed.api.v1.Core.Relationship getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Relationship parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.authzed.api.v1.Core.Relationship getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ContextualizedCaveatOrBuilder extends // @@protoc_insertion_point(interface_extends:authzed.api.v1.ContextualizedCaveat) com.google.protobuf.MessageOrBuilder { /** *
     ** caveat_name is the name of the caveat expression to use, as defined in the schema *
     * 
* * string caveat_name = 1 [(.validate.rules) = { ... } * @return The caveatName. */ java.lang.String getCaveatName(); /** *
     ** caveat_name is the name of the caveat expression to use, as defined in the schema *
     * 
* * string caveat_name = 1 [(.validate.rules) = { ... } * @return The bytes for caveatName. */ com.google.protobuf.ByteString getCaveatNameBytes(); /** *
     ** context consists of any named values that are defined at write time for the caveat expression *
     * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } * @return Whether the context field is set. */ boolean hasContext(); /** *
     ** context consists of any named values that are defined at write time for the caveat expression *
     * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } * @return The context. */ com.google.protobuf.Struct getContext(); /** *
     ** context consists of any named values that are defined at write time for the caveat expression *
     * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } */ com.google.protobuf.StructOrBuilder getContextOrBuilder(); } /** *
   **
   * ContextualizedCaveat represents a reference to a caveat to be used by caveated relationships.
   * The context consists of key-value pairs that will be injected at evaluation time.
   * The keys must match the arguments defined on the caveat in the schema.
   * 
* * Protobuf type {@code authzed.api.v1.ContextualizedCaveat} */ public static final class ContextualizedCaveat extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authzed.api.v1.ContextualizedCaveat) ContextualizedCaveatOrBuilder { private static final long serialVersionUID = 0L; // Use ContextualizedCaveat.newBuilder() to construct. private ContextualizedCaveat(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ContextualizedCaveat() { caveatName_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ContextualizedCaveat(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ContextualizedCaveat_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ContextualizedCaveat_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.ContextualizedCaveat.class, com.authzed.api.v1.Core.ContextualizedCaveat.Builder.class); } public static final int CAVEAT_NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object caveatName_ = ""; /** *
     ** caveat_name is the name of the caveat expression to use, as defined in the schema *
     * 
* * string caveat_name = 1 [(.validate.rules) = { ... } * @return The caveatName. */ @java.lang.Override public java.lang.String getCaveatName() { java.lang.Object ref = caveatName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); caveatName_ = s; return s; } } /** *
     ** caveat_name is the name of the caveat expression to use, as defined in the schema *
     * 
* * string caveat_name = 1 [(.validate.rules) = { ... } * @return The bytes for caveatName. */ @java.lang.Override public com.google.protobuf.ByteString getCaveatNameBytes() { java.lang.Object ref = caveatName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); caveatName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONTEXT_FIELD_NUMBER = 2; private com.google.protobuf.Struct context_; /** *
     ** context consists of any named values that are defined at write time for the caveat expression *
     * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } * @return Whether the context field is set. */ @java.lang.Override public boolean hasContext() { return context_ != null; } /** *
     ** context consists of any named values that are defined at write time for the caveat expression *
     * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } * @return The context. */ @java.lang.Override public com.google.protobuf.Struct getContext() { return context_ == null ? com.google.protobuf.Struct.getDefaultInstance() : context_; } /** *
     ** context consists of any named values that are defined at write time for the caveat expression *
     * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } */ @java.lang.Override public com.google.protobuf.StructOrBuilder getContextOrBuilder() { return context_ == null ? com.google.protobuf.Struct.getDefaultInstance() : context_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(caveatName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, caveatName_); } if (context_ != null) { output.writeMessage(2, getContext()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(caveatName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, caveatName_); } if (context_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getContext()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.authzed.api.v1.Core.ContextualizedCaveat)) { return super.equals(obj); } com.authzed.api.v1.Core.ContextualizedCaveat other = (com.authzed.api.v1.Core.ContextualizedCaveat) obj; if (!getCaveatName() .equals(other.getCaveatName())) return false; if (hasContext() != other.hasContext()) return false; if (hasContext()) { if (!getContext() .equals(other.getContext())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CAVEAT_NAME_FIELD_NUMBER; hash = (53 * hash) + getCaveatName().hashCode(); if (hasContext()) { hash = (37 * hash) + CONTEXT_FIELD_NUMBER; hash = (53 * hash) + getContext().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.authzed.api.v1.Core.ContextualizedCaveat parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.ContextualizedCaveat parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.authzed.api.v1.Core.ContextualizedCaveat prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     **
     * ContextualizedCaveat represents a reference to a caveat to be used by caveated relationships.
     * The context consists of key-value pairs that will be injected at evaluation time.
     * The keys must match the arguments defined on the caveat in the schema.
     * 
* * Protobuf type {@code authzed.api.v1.ContextualizedCaveat} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authzed.api.v1.ContextualizedCaveat) com.authzed.api.v1.Core.ContextualizedCaveatOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ContextualizedCaveat_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ContextualizedCaveat_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.ContextualizedCaveat.class, com.authzed.api.v1.Core.ContextualizedCaveat.Builder.class); } // Construct using com.authzed.api.v1.Core.ContextualizedCaveat.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; caveatName_ = ""; context_ = null; if (contextBuilder_ != null) { contextBuilder_.dispose(); contextBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ContextualizedCaveat_descriptor; } @java.lang.Override public com.authzed.api.v1.Core.ContextualizedCaveat getDefaultInstanceForType() { return com.authzed.api.v1.Core.ContextualizedCaveat.getDefaultInstance(); } @java.lang.Override public com.authzed.api.v1.Core.ContextualizedCaveat build() { com.authzed.api.v1.Core.ContextualizedCaveat result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.authzed.api.v1.Core.ContextualizedCaveat buildPartial() { com.authzed.api.v1.Core.ContextualizedCaveat result = new com.authzed.api.v1.Core.ContextualizedCaveat(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.authzed.api.v1.Core.ContextualizedCaveat result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.caveatName_ = caveatName_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.context_ = contextBuilder_ == null ? context_ : contextBuilder_.build(); } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.authzed.api.v1.Core.ContextualizedCaveat) { return mergeFrom((com.authzed.api.v1.Core.ContextualizedCaveat)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.authzed.api.v1.Core.ContextualizedCaveat other) { if (other == com.authzed.api.v1.Core.ContextualizedCaveat.getDefaultInstance()) return this; if (!other.getCaveatName().isEmpty()) { caveatName_ = other.caveatName_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasContext()) { mergeContext(other.getContext()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { caveatName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getContextFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object caveatName_ = ""; /** *
       ** caveat_name is the name of the caveat expression to use, as defined in the schema *
       * 
* * string caveat_name = 1 [(.validate.rules) = { ... } * @return The caveatName. */ public java.lang.String getCaveatName() { java.lang.Object ref = caveatName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); caveatName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       ** caveat_name is the name of the caveat expression to use, as defined in the schema *
       * 
* * string caveat_name = 1 [(.validate.rules) = { ... } * @return The bytes for caveatName. */ public com.google.protobuf.ByteString getCaveatNameBytes() { java.lang.Object ref = caveatName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); caveatName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       ** caveat_name is the name of the caveat expression to use, as defined in the schema *
       * 
* * string caveat_name = 1 [(.validate.rules) = { ... } * @param value The caveatName to set. * @return This builder for chaining. */ public Builder setCaveatName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } caveatName_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       ** caveat_name is the name of the caveat expression to use, as defined in the schema *
       * 
* * string caveat_name = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearCaveatName() { caveatName_ = getDefaultInstance().getCaveatName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
       ** caveat_name is the name of the caveat expression to use, as defined in the schema *
       * 
* * string caveat_name = 1 [(.validate.rules) = { ... } * @param value The bytes for caveatName to set. * @return This builder for chaining. */ public Builder setCaveatNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); caveatName_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.protobuf.Struct context_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> contextBuilder_; /** *
       ** context consists of any named values that are defined at write time for the caveat expression *
       * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } * @return Whether the context field is set. */ public boolean hasContext() { return ((bitField0_ & 0x00000002) != 0); } /** *
       ** context consists of any named values that are defined at write time for the caveat expression *
       * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } * @return The context. */ public com.google.protobuf.Struct getContext() { if (contextBuilder_ == null) { return context_ == null ? com.google.protobuf.Struct.getDefaultInstance() : context_; } else { return contextBuilder_.getMessage(); } } /** *
       ** context consists of any named values that are defined at write time for the caveat expression *
       * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } */ public Builder setContext(com.google.protobuf.Struct value) { if (contextBuilder_ == null) { if (value == null) { throw new NullPointerException(); } context_ = value; } else { contextBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       ** context consists of any named values that are defined at write time for the caveat expression *
       * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } */ public Builder setContext( com.google.protobuf.Struct.Builder builderForValue) { if (contextBuilder_ == null) { context_ = builderForValue.build(); } else { contextBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       ** context consists of any named values that are defined at write time for the caveat expression *
       * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } */ public Builder mergeContext(com.google.protobuf.Struct value) { if (contextBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && context_ != null && context_ != com.google.protobuf.Struct.getDefaultInstance()) { getContextBuilder().mergeFrom(value); } else { context_ = value; } } else { contextBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       ** context consists of any named values that are defined at write time for the caveat expression *
       * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } */ public Builder clearContext() { bitField0_ = (bitField0_ & ~0x00000002); context_ = null; if (contextBuilder_ != null) { contextBuilder_.dispose(); contextBuilder_ = null; } onChanged(); return this; } /** *
       ** context consists of any named values that are defined at write time for the caveat expression *
       * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } */ public com.google.protobuf.Struct.Builder getContextBuilder() { bitField0_ |= 0x00000002; onChanged(); return getContextFieldBuilder().getBuilder(); } /** *
       ** context consists of any named values that are defined at write time for the caveat expression *
       * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } */ public com.google.protobuf.StructOrBuilder getContextOrBuilder() { if (contextBuilder_ != null) { return contextBuilder_.getMessageOrBuilder(); } else { return context_ == null ? com.google.protobuf.Struct.getDefaultInstance() : context_; } } /** *
       ** context consists of any named values that are defined at write time for the caveat expression *
       * 
* * .google.protobuf.Struct context = 2 [(.validate.rules) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getContextFieldBuilder() { if (contextBuilder_ == null) { contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getContext(), getParentForChildren(), isClean()); context_ = null; } return contextBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authzed.api.v1.ContextualizedCaveat) } // @@protoc_insertion_point(class_scope:authzed.api.v1.ContextualizedCaveat) private static final com.authzed.api.v1.Core.ContextualizedCaveat DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.authzed.api.v1.Core.ContextualizedCaveat(); } public static com.authzed.api.v1.Core.ContextualizedCaveat getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ContextualizedCaveat parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.authzed.api.v1.Core.ContextualizedCaveat getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface SubjectReferenceOrBuilder extends // @@protoc_insertion_point(interface_extends:authzed.api.v1.SubjectReference) com.google.protobuf.MessageOrBuilder { /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } * @return Whether the object field is set. */ boolean hasObject(); /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } * @return The object. */ com.authzed.api.v1.Core.ObjectReference getObject(); /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } */ com.authzed.api.v1.Core.ObjectReferenceOrBuilder getObjectOrBuilder(); /** * string optional_relation = 2 [(.validate.rules) = { ... } * @return The optionalRelation. */ java.lang.String getOptionalRelation(); /** * string optional_relation = 2 [(.validate.rules) = { ... } * @return The bytes for optionalRelation. */ com.google.protobuf.ByteString getOptionalRelationBytes(); } /** *
   * SubjectReference is used for referring to the subject portion of a
   * Relationship. The relation component is optional and is used for defining a
   * sub-relation on the subject, e.g. group:123#members
   * 
* * Protobuf type {@code authzed.api.v1.SubjectReference} */ public static final class SubjectReference extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authzed.api.v1.SubjectReference) SubjectReferenceOrBuilder { private static final long serialVersionUID = 0L; // Use SubjectReference.newBuilder() to construct. private SubjectReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SubjectReference() { optionalRelation_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new SubjectReference(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_SubjectReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_SubjectReference_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.SubjectReference.class, com.authzed.api.v1.Core.SubjectReference.Builder.class); } public static final int OBJECT_FIELD_NUMBER = 1; private com.authzed.api.v1.Core.ObjectReference object_; /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } * @return Whether the object field is set. */ @java.lang.Override public boolean hasObject() { return object_ != null; } /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } * @return The object. */ @java.lang.Override public com.authzed.api.v1.Core.ObjectReference getObject() { return object_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : object_; } /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } */ @java.lang.Override public com.authzed.api.v1.Core.ObjectReferenceOrBuilder getObjectOrBuilder() { return object_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : object_; } public static final int OPTIONAL_RELATION_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object optionalRelation_ = ""; /** * string optional_relation = 2 [(.validate.rules) = { ... } * @return The optionalRelation. */ @java.lang.Override public java.lang.String getOptionalRelation() { java.lang.Object ref = optionalRelation_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); optionalRelation_ = s; return s; } } /** * string optional_relation = 2 [(.validate.rules) = { ... } * @return The bytes for optionalRelation. */ @java.lang.Override public com.google.protobuf.ByteString getOptionalRelationBytes() { java.lang.Object ref = optionalRelation_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); optionalRelation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (object_ != null) { output.writeMessage(1, getObject()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalRelation_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, optionalRelation_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (object_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getObject()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalRelation_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, optionalRelation_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.authzed.api.v1.Core.SubjectReference)) { return super.equals(obj); } com.authzed.api.v1.Core.SubjectReference other = (com.authzed.api.v1.Core.SubjectReference) obj; if (hasObject() != other.hasObject()) return false; if (hasObject()) { if (!getObject() .equals(other.getObject())) return false; } if (!getOptionalRelation() .equals(other.getOptionalRelation())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasObject()) { hash = (37 * hash) + OBJECT_FIELD_NUMBER; hash = (53 * hash) + getObject().hashCode(); } hash = (37 * hash) + OPTIONAL_RELATION_FIELD_NUMBER; hash = (53 * hash) + getOptionalRelation().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.authzed.api.v1.Core.SubjectReference parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.SubjectReference parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.SubjectReference parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.SubjectReference parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.SubjectReference parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.SubjectReference parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.SubjectReference parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.SubjectReference parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.SubjectReference parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.SubjectReference parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.SubjectReference parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.SubjectReference parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.authzed.api.v1.Core.SubjectReference prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * SubjectReference is used for referring to the subject portion of a
     * Relationship. The relation component is optional and is used for defining a
     * sub-relation on the subject, e.g. group:123#members
     * 
* * Protobuf type {@code authzed.api.v1.SubjectReference} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authzed.api.v1.SubjectReference) com.authzed.api.v1.Core.SubjectReferenceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_SubjectReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_SubjectReference_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.SubjectReference.class, com.authzed.api.v1.Core.SubjectReference.Builder.class); } // Construct using com.authzed.api.v1.Core.SubjectReference.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; object_ = null; if (objectBuilder_ != null) { objectBuilder_.dispose(); objectBuilder_ = null; } optionalRelation_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_SubjectReference_descriptor; } @java.lang.Override public com.authzed.api.v1.Core.SubjectReference getDefaultInstanceForType() { return com.authzed.api.v1.Core.SubjectReference.getDefaultInstance(); } @java.lang.Override public com.authzed.api.v1.Core.SubjectReference build() { com.authzed.api.v1.Core.SubjectReference result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.authzed.api.v1.Core.SubjectReference buildPartial() { com.authzed.api.v1.Core.SubjectReference result = new com.authzed.api.v1.Core.SubjectReference(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.authzed.api.v1.Core.SubjectReference result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.object_ = objectBuilder_ == null ? object_ : objectBuilder_.build(); } if (((from_bitField0_ & 0x00000002) != 0)) { result.optionalRelation_ = optionalRelation_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.authzed.api.v1.Core.SubjectReference) { return mergeFrom((com.authzed.api.v1.Core.SubjectReference)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.authzed.api.v1.Core.SubjectReference other) { if (other == com.authzed.api.v1.Core.SubjectReference.getDefaultInstance()) return this; if (other.hasObject()) { mergeObject(other.getObject()); } if (!other.getOptionalRelation().isEmpty()) { optionalRelation_ = other.optionalRelation_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getObjectFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { optionalRelation_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.authzed.api.v1.Core.ObjectReference object_; private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ObjectReference, com.authzed.api.v1.Core.ObjectReference.Builder, com.authzed.api.v1.Core.ObjectReferenceOrBuilder> objectBuilder_; /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } * @return Whether the object field is set. */ public boolean hasObject() { return ((bitField0_ & 0x00000001) != 0); } /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } * @return The object. */ public com.authzed.api.v1.Core.ObjectReference getObject() { if (objectBuilder_ == null) { return object_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : object_; } else { return objectBuilder_.getMessage(); } } /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } */ public Builder setObject(com.authzed.api.v1.Core.ObjectReference value) { if (objectBuilder_ == null) { if (value == null) { throw new NullPointerException(); } object_ = value; } else { objectBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } */ public Builder setObject( com.authzed.api.v1.Core.ObjectReference.Builder builderForValue) { if (objectBuilder_ == null) { object_ = builderForValue.build(); } else { objectBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } */ public Builder mergeObject(com.authzed.api.v1.Core.ObjectReference value) { if (objectBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && object_ != null && object_ != com.authzed.api.v1.Core.ObjectReference.getDefaultInstance()) { getObjectBuilder().mergeFrom(value); } else { object_ = value; } } else { objectBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } */ public Builder clearObject() { bitField0_ = (bitField0_ & ~0x00000001); object_ = null; if (objectBuilder_ != null) { objectBuilder_.dispose(); objectBuilder_ = null; } onChanged(); return this; } /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.ObjectReference.Builder getObjectBuilder() { bitField0_ |= 0x00000001; onChanged(); return getObjectFieldBuilder().getBuilder(); } /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.ObjectReferenceOrBuilder getObjectOrBuilder() { if (objectBuilder_ != null) { return objectBuilder_.getMessageOrBuilder(); } else { return object_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : object_; } } /** * .authzed.api.v1.ObjectReference object = 1 [(.validate.rules) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ObjectReference, com.authzed.api.v1.Core.ObjectReference.Builder, com.authzed.api.v1.Core.ObjectReferenceOrBuilder> getObjectFieldBuilder() { if (objectBuilder_ == null) { objectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ObjectReference, com.authzed.api.v1.Core.ObjectReference.Builder, com.authzed.api.v1.Core.ObjectReferenceOrBuilder>( getObject(), getParentForChildren(), isClean()); object_ = null; } return objectBuilder_; } private java.lang.Object optionalRelation_ = ""; /** * string optional_relation = 2 [(.validate.rules) = { ... } * @return The optionalRelation. */ public java.lang.String getOptionalRelation() { java.lang.Object ref = optionalRelation_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); optionalRelation_ = s; return s; } else { return (java.lang.String) ref; } } /** * string optional_relation = 2 [(.validate.rules) = { ... } * @return The bytes for optionalRelation. */ public com.google.protobuf.ByteString getOptionalRelationBytes() { java.lang.Object ref = optionalRelation_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); optionalRelation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string optional_relation = 2 [(.validate.rules) = { ... } * @param value The optionalRelation to set. * @return This builder for chaining. */ public Builder setOptionalRelation( java.lang.String value) { if (value == null) { throw new NullPointerException(); } optionalRelation_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * string optional_relation = 2 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearOptionalRelation() { optionalRelation_ = getDefaultInstance().getOptionalRelation(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * string optional_relation = 2 [(.validate.rules) = { ... } * @param value The bytes for optionalRelation to set. * @return This builder for chaining. */ public Builder setOptionalRelationBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); optionalRelation_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authzed.api.v1.SubjectReference) } // @@protoc_insertion_point(class_scope:authzed.api.v1.SubjectReference) private static final com.authzed.api.v1.Core.SubjectReference DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.authzed.api.v1.Core.SubjectReference(); } public static com.authzed.api.v1.Core.SubjectReference getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SubjectReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.authzed.api.v1.Core.SubjectReference getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ObjectReferenceOrBuilder extends // @@protoc_insertion_point(interface_extends:authzed.api.v1.ObjectReference) com.google.protobuf.MessageOrBuilder { /** * string object_type = 1 [(.validate.rules) = { ... } * @return The objectType. */ java.lang.String getObjectType(); /** * string object_type = 1 [(.validate.rules) = { ... } * @return The bytes for objectType. */ com.google.protobuf.ByteString getObjectTypeBytes(); /** * string object_id = 2 [(.validate.rules) = { ... } * @return The objectId. */ java.lang.String getObjectId(); /** * string object_id = 2 [(.validate.rules) = { ... } * @return The bytes for objectId. */ com.google.protobuf.ByteString getObjectIdBytes(); } /** *
   * ObjectReference is used to refer to a specific object in the system.
   * 
* * Protobuf type {@code authzed.api.v1.ObjectReference} */ public static final class ObjectReference extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authzed.api.v1.ObjectReference) ObjectReferenceOrBuilder { private static final long serialVersionUID = 0L; // Use ObjectReference.newBuilder() to construct. private ObjectReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ObjectReference() { objectType_ = ""; objectId_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ObjectReference(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ObjectReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ObjectReference_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.ObjectReference.class, com.authzed.api.v1.Core.ObjectReference.Builder.class); } public static final int OBJECT_TYPE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object objectType_ = ""; /** * string object_type = 1 [(.validate.rules) = { ... } * @return The objectType. */ @java.lang.Override public java.lang.String getObjectType() { java.lang.Object ref = objectType_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); objectType_ = s; return s; } } /** * string object_type = 1 [(.validate.rules) = { ... } * @return The bytes for objectType. */ @java.lang.Override public com.google.protobuf.ByteString getObjectTypeBytes() { java.lang.Object ref = objectType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); objectType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int OBJECT_ID_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object objectId_ = ""; /** * string object_id = 2 [(.validate.rules) = { ... } * @return The objectId. */ @java.lang.Override public java.lang.String getObjectId() { java.lang.Object ref = objectId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); objectId_ = s; return s; } } /** * string object_id = 2 [(.validate.rules) = { ... } * @return The bytes for objectId. */ @java.lang.Override public com.google.protobuf.ByteString getObjectIdBytes() { java.lang.Object ref = objectId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); objectId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectId_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.authzed.api.v1.Core.ObjectReference)) { return super.equals(obj); } com.authzed.api.v1.Core.ObjectReference other = (com.authzed.api.v1.Core.ObjectReference) obj; if (!getObjectType() .equals(other.getObjectType())) return false; if (!getObjectId() .equals(other.getObjectId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + OBJECT_TYPE_FIELD_NUMBER; hash = (53 * hash) + getObjectType().hashCode(); hash = (37 * hash) + OBJECT_ID_FIELD_NUMBER; hash = (53 * hash) + getObjectId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.authzed.api.v1.Core.ObjectReference parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.ObjectReference parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.ObjectReference parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.ObjectReference parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.ObjectReference parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.ObjectReference parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.ObjectReference parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.ObjectReference parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.ObjectReference parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.ObjectReference parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.ObjectReference parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.ObjectReference parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.authzed.api.v1.Core.ObjectReference prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * ObjectReference is used to refer to a specific object in the system.
     * 
* * Protobuf type {@code authzed.api.v1.ObjectReference} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authzed.api.v1.ObjectReference) com.authzed.api.v1.Core.ObjectReferenceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ObjectReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ObjectReference_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.ObjectReference.class, com.authzed.api.v1.Core.ObjectReference.Builder.class); } // Construct using com.authzed.api.v1.Core.ObjectReference.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; objectType_ = ""; objectId_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ObjectReference_descriptor; } @java.lang.Override public com.authzed.api.v1.Core.ObjectReference getDefaultInstanceForType() { return com.authzed.api.v1.Core.ObjectReference.getDefaultInstance(); } @java.lang.Override public com.authzed.api.v1.Core.ObjectReference build() { com.authzed.api.v1.Core.ObjectReference result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.authzed.api.v1.Core.ObjectReference buildPartial() { com.authzed.api.v1.Core.ObjectReference result = new com.authzed.api.v1.Core.ObjectReference(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.authzed.api.v1.Core.ObjectReference result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.objectType_ = objectType_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.objectId_ = objectId_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.authzed.api.v1.Core.ObjectReference) { return mergeFrom((com.authzed.api.v1.Core.ObjectReference)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.authzed.api.v1.Core.ObjectReference other) { if (other == com.authzed.api.v1.Core.ObjectReference.getDefaultInstance()) return this; if (!other.getObjectType().isEmpty()) { objectType_ = other.objectType_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getObjectId().isEmpty()) { objectId_ = other.objectId_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { objectType_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { objectId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object objectType_ = ""; /** * string object_type = 1 [(.validate.rules) = { ... } * @return The objectType. */ public java.lang.String getObjectType() { java.lang.Object ref = objectType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); objectType_ = s; return s; } else { return (java.lang.String) ref; } } /** * string object_type = 1 [(.validate.rules) = { ... } * @return The bytes for objectType. */ public com.google.protobuf.ByteString getObjectTypeBytes() { java.lang.Object ref = objectType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); objectType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string object_type = 1 [(.validate.rules) = { ... } * @param value The objectType to set. * @return This builder for chaining. */ public Builder setObjectType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } objectType_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * string object_type = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearObjectType() { objectType_ = getDefaultInstance().getObjectType(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string object_type = 1 [(.validate.rules) = { ... } * @param value The bytes for objectType to set. * @return This builder for chaining. */ public Builder setObjectTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); objectType_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object objectId_ = ""; /** * string object_id = 2 [(.validate.rules) = { ... } * @return The objectId. */ public java.lang.String getObjectId() { java.lang.Object ref = objectId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); objectId_ = s; return s; } else { return (java.lang.String) ref; } } /** * string object_id = 2 [(.validate.rules) = { ... } * @return The bytes for objectId. */ public com.google.protobuf.ByteString getObjectIdBytes() { java.lang.Object ref = objectId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); objectId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string object_id = 2 [(.validate.rules) = { ... } * @param value The objectId to set. * @return This builder for chaining. */ public Builder setObjectId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } objectId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * string object_id = 2 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearObjectId() { objectId_ = getDefaultInstance().getObjectId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * string object_id = 2 [(.validate.rules) = { ... } * @param value The bytes for objectId to set. * @return This builder for chaining. */ public Builder setObjectIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); objectId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authzed.api.v1.ObjectReference) } // @@protoc_insertion_point(class_scope:authzed.api.v1.ObjectReference) private static final com.authzed.api.v1.Core.ObjectReference DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.authzed.api.v1.Core.ObjectReference(); } public static com.authzed.api.v1.Core.ObjectReference getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ObjectReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.authzed.api.v1.Core.ObjectReference getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ZedTokenOrBuilder extends // @@protoc_insertion_point(interface_extends:authzed.api.v1.ZedToken) com.google.protobuf.MessageOrBuilder { /** * string token = 1 [(.validate.rules) = { ... } * @return The token. */ java.lang.String getToken(); /** * string token = 1 [(.validate.rules) = { ... } * @return The bytes for token. */ com.google.protobuf.ByteString getTokenBytes(); } /** *
   * ZedToken is used to provide causality metadata between Write and Check
   * requests.
   * See the authzed.api.v1.Consistency message for more information.
   * 
* * Protobuf type {@code authzed.api.v1.ZedToken} */ public static final class ZedToken extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authzed.api.v1.ZedToken) ZedTokenOrBuilder { private static final long serialVersionUID = 0L; // Use ZedToken.newBuilder() to construct. private ZedToken(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ZedToken() { token_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ZedToken(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ZedToken_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ZedToken_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.ZedToken.class, com.authzed.api.v1.Core.ZedToken.Builder.class); } public static final int TOKEN_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object token_ = ""; /** * string token = 1 [(.validate.rules) = { ... } * @return The token. */ @java.lang.Override public java.lang.String getToken() { java.lang.Object ref = token_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); token_ = s; return s; } } /** * string token = 1 [(.validate.rules) = { ... } * @return The bytes for token. */ @java.lang.Override public com.google.protobuf.ByteString getTokenBytes() { java.lang.Object ref = token_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); token_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.authzed.api.v1.Core.ZedToken)) { return super.equals(obj); } com.authzed.api.v1.Core.ZedToken other = (com.authzed.api.v1.Core.ZedToken) obj; if (!getToken() .equals(other.getToken())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TOKEN_FIELD_NUMBER; hash = (53 * hash) + getToken().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.authzed.api.v1.Core.ZedToken parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.ZedToken parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.ZedToken parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.ZedToken parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.ZedToken parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.ZedToken parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.ZedToken parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.ZedToken parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.ZedToken parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.ZedToken parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.ZedToken parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.ZedToken parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.authzed.api.v1.Core.ZedToken prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * ZedToken is used to provide causality metadata between Write and Check
     * requests.
     * See the authzed.api.v1.Consistency message for more information.
     * 
* * Protobuf type {@code authzed.api.v1.ZedToken} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authzed.api.v1.ZedToken) com.authzed.api.v1.Core.ZedTokenOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ZedToken_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ZedToken_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.ZedToken.class, com.authzed.api.v1.Core.ZedToken.Builder.class); } // Construct using com.authzed.api.v1.Core.ZedToken.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; token_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_ZedToken_descriptor; } @java.lang.Override public com.authzed.api.v1.Core.ZedToken getDefaultInstanceForType() { return com.authzed.api.v1.Core.ZedToken.getDefaultInstance(); } @java.lang.Override public com.authzed.api.v1.Core.ZedToken build() { com.authzed.api.v1.Core.ZedToken result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.authzed.api.v1.Core.ZedToken buildPartial() { com.authzed.api.v1.Core.ZedToken result = new com.authzed.api.v1.Core.ZedToken(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.authzed.api.v1.Core.ZedToken result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.token_ = token_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.authzed.api.v1.Core.ZedToken) { return mergeFrom((com.authzed.api.v1.Core.ZedToken)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.authzed.api.v1.Core.ZedToken other) { if (other == com.authzed.api.v1.Core.ZedToken.getDefaultInstance()) return this; if (!other.getToken().isEmpty()) { token_ = other.token_; bitField0_ |= 0x00000001; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { token_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object token_ = ""; /** * string token = 1 [(.validate.rules) = { ... } * @return The token. */ public java.lang.String getToken() { java.lang.Object ref = token_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); token_ = s; return s; } else { return (java.lang.String) ref; } } /** * string token = 1 [(.validate.rules) = { ... } * @return The bytes for token. */ public com.google.protobuf.ByteString getTokenBytes() { java.lang.Object ref = token_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); token_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string token = 1 [(.validate.rules) = { ... } * @param value The token to set. * @return This builder for chaining. */ public Builder setToken( java.lang.String value) { if (value == null) { throw new NullPointerException(); } token_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * string token = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearToken() { token_ = getDefaultInstance().getToken(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string token = 1 [(.validate.rules) = { ... } * @param value The bytes for token to set. * @return This builder for chaining. */ public Builder setTokenBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); token_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authzed.api.v1.ZedToken) } // @@protoc_insertion_point(class_scope:authzed.api.v1.ZedToken) private static final com.authzed.api.v1.Core.ZedToken DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.authzed.api.v1.Core.ZedToken(); } public static com.authzed.api.v1.Core.ZedToken getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ZedToken parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.authzed.api.v1.Core.ZedToken getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface RelationshipUpdateOrBuilder extends // @@protoc_insertion_point(interface_extends:authzed.api.v1.RelationshipUpdate) com.google.protobuf.MessageOrBuilder { /** * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for operation. */ int getOperationValue(); /** * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [(.validate.rules) = { ... } * @return The operation. */ com.authzed.api.v1.Core.RelationshipUpdate.Operation getOperation(); /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } * @return Whether the relationship field is set. */ boolean hasRelationship(); /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } * @return The relationship. */ com.authzed.api.v1.Core.Relationship getRelationship(); /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } */ com.authzed.api.v1.Core.RelationshipOrBuilder getRelationshipOrBuilder(); } /** *
   * RelationshipUpdate is used for mutating a single relationship within the
   * service.
   * CREATE will create the relationship only if it doesn't exist, and error
   * otherwise.
   * TOUCH will upsert the relationship, and will not error if it
   * already exists.
   * DELETE will delete the relationship. If the relationship does not exist,
   * this operation will no-op.
   * 
* * Protobuf type {@code authzed.api.v1.RelationshipUpdate} */ public static final class RelationshipUpdate extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authzed.api.v1.RelationshipUpdate) RelationshipUpdateOrBuilder { private static final long serialVersionUID = 0L; // Use RelationshipUpdate.newBuilder() to construct. private RelationshipUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RelationshipUpdate() { operation_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RelationshipUpdate(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_RelationshipUpdate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_RelationshipUpdate_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.RelationshipUpdate.class, com.authzed.api.v1.Core.RelationshipUpdate.Builder.class); } /** * Protobuf enum {@code authzed.api.v1.RelationshipUpdate.Operation} */ public enum Operation implements com.google.protobuf.ProtocolMessageEnum { /** * OPERATION_UNSPECIFIED = 0; */ OPERATION_UNSPECIFIED(0), /** * OPERATION_CREATE = 1; */ OPERATION_CREATE(1), /** * OPERATION_TOUCH = 2; */ OPERATION_TOUCH(2), /** * OPERATION_DELETE = 3; */ OPERATION_DELETE(3), UNRECOGNIZED(-1), ; /** * OPERATION_UNSPECIFIED = 0; */ public static final int OPERATION_UNSPECIFIED_VALUE = 0; /** * OPERATION_CREATE = 1; */ public static final int OPERATION_CREATE_VALUE = 1; /** * OPERATION_TOUCH = 2; */ public static final int OPERATION_TOUCH_VALUE = 2; /** * OPERATION_DELETE = 3; */ public static final int OPERATION_DELETE_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Operation valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Operation forNumber(int value) { switch (value) { case 0: return OPERATION_UNSPECIFIED; case 1: return OPERATION_CREATE; case 2: return OPERATION_TOUCH; case 3: return OPERATION_DELETE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Operation> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Operation findValueByNumber(int number) { return Operation.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.authzed.api.v1.Core.RelationshipUpdate.getDescriptor().getEnumTypes().get(0); } private static final Operation[] VALUES = values(); public static Operation valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Operation(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:authzed.api.v1.RelationshipUpdate.Operation) } public static final int OPERATION_FIELD_NUMBER = 1; private int operation_ = 0; /** * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for operation. */ @java.lang.Override public int getOperationValue() { return operation_; } /** * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [(.validate.rules) = { ... } * @return The operation. */ @java.lang.Override public com.authzed.api.v1.Core.RelationshipUpdate.Operation getOperation() { com.authzed.api.v1.Core.RelationshipUpdate.Operation result = com.authzed.api.v1.Core.RelationshipUpdate.Operation.forNumber(operation_); return result == null ? com.authzed.api.v1.Core.RelationshipUpdate.Operation.UNRECOGNIZED : result; } public static final int RELATIONSHIP_FIELD_NUMBER = 2; private com.authzed.api.v1.Core.Relationship relationship_; /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } * @return Whether the relationship field is set. */ @java.lang.Override public boolean hasRelationship() { return relationship_ != null; } /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } * @return The relationship. */ @java.lang.Override public com.authzed.api.v1.Core.Relationship getRelationship() { return relationship_ == null ? com.authzed.api.v1.Core.Relationship.getDefaultInstance() : relationship_; } /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } */ @java.lang.Override public com.authzed.api.v1.Core.RelationshipOrBuilder getRelationshipOrBuilder() { return relationship_ == null ? com.authzed.api.v1.Core.Relationship.getDefaultInstance() : relationship_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (operation_ != com.authzed.api.v1.Core.RelationshipUpdate.Operation.OPERATION_UNSPECIFIED.getNumber()) { output.writeEnum(1, operation_); } if (relationship_ != null) { output.writeMessage(2, getRelationship()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (operation_ != com.authzed.api.v1.Core.RelationshipUpdate.Operation.OPERATION_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, operation_); } if (relationship_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getRelationship()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.authzed.api.v1.Core.RelationshipUpdate)) { return super.equals(obj); } com.authzed.api.v1.Core.RelationshipUpdate other = (com.authzed.api.v1.Core.RelationshipUpdate) obj; if (operation_ != other.operation_) return false; if (hasRelationship() != other.hasRelationship()) return false; if (hasRelationship()) { if (!getRelationship() .equals(other.getRelationship())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + OPERATION_FIELD_NUMBER; hash = (53 * hash) + operation_; if (hasRelationship()) { hash = (37 * hash) + RELATIONSHIP_FIELD_NUMBER; hash = (53 * hash) + getRelationship().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.authzed.api.v1.Core.RelationshipUpdate parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.RelationshipUpdate parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.RelationshipUpdate parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.RelationshipUpdate parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.RelationshipUpdate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.RelationshipUpdate parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.RelationshipUpdate parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.RelationshipUpdate parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.RelationshipUpdate parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.RelationshipUpdate parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.RelationshipUpdate parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.RelationshipUpdate parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.authzed.api.v1.Core.RelationshipUpdate prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * RelationshipUpdate is used for mutating a single relationship within the
     * service.
     * CREATE will create the relationship only if it doesn't exist, and error
     * otherwise.
     * TOUCH will upsert the relationship, and will not error if it
     * already exists.
     * DELETE will delete the relationship. If the relationship does not exist,
     * this operation will no-op.
     * 
* * Protobuf type {@code authzed.api.v1.RelationshipUpdate} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authzed.api.v1.RelationshipUpdate) com.authzed.api.v1.Core.RelationshipUpdateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_RelationshipUpdate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_RelationshipUpdate_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.RelationshipUpdate.class, com.authzed.api.v1.Core.RelationshipUpdate.Builder.class); } // Construct using com.authzed.api.v1.Core.RelationshipUpdate.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; operation_ = 0; relationship_ = null; if (relationshipBuilder_ != null) { relationshipBuilder_.dispose(); relationshipBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_RelationshipUpdate_descriptor; } @java.lang.Override public com.authzed.api.v1.Core.RelationshipUpdate getDefaultInstanceForType() { return com.authzed.api.v1.Core.RelationshipUpdate.getDefaultInstance(); } @java.lang.Override public com.authzed.api.v1.Core.RelationshipUpdate build() { com.authzed.api.v1.Core.RelationshipUpdate result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.authzed.api.v1.Core.RelationshipUpdate buildPartial() { com.authzed.api.v1.Core.RelationshipUpdate result = new com.authzed.api.v1.Core.RelationshipUpdate(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.authzed.api.v1.Core.RelationshipUpdate result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.operation_ = operation_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.relationship_ = relationshipBuilder_ == null ? relationship_ : relationshipBuilder_.build(); } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.authzed.api.v1.Core.RelationshipUpdate) { return mergeFrom((com.authzed.api.v1.Core.RelationshipUpdate)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.authzed.api.v1.Core.RelationshipUpdate other) { if (other == com.authzed.api.v1.Core.RelationshipUpdate.getDefaultInstance()) return this; if (other.operation_ != 0) { setOperationValue(other.getOperationValue()); } if (other.hasRelationship()) { mergeRelationship(other.getRelationship()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { operation_ = input.readEnum(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage( getRelationshipFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private int operation_ = 0; /** * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for operation. */ @java.lang.Override public int getOperationValue() { return operation_; } /** * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [(.validate.rules) = { ... } * @param value The enum numeric value on the wire for operation to set. * @return This builder for chaining. */ public Builder setOperationValue(int value) { operation_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [(.validate.rules) = { ... } * @return The operation. */ @java.lang.Override public com.authzed.api.v1.Core.RelationshipUpdate.Operation getOperation() { com.authzed.api.v1.Core.RelationshipUpdate.Operation result = com.authzed.api.v1.Core.RelationshipUpdate.Operation.forNumber(operation_); return result == null ? com.authzed.api.v1.Core.RelationshipUpdate.Operation.UNRECOGNIZED : result; } /** * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [(.validate.rules) = { ... } * @param value The operation to set. * @return This builder for chaining. */ public Builder setOperation(com.authzed.api.v1.Core.RelationshipUpdate.Operation value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; operation_ = value.getNumber(); onChanged(); return this; } /** * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearOperation() { bitField0_ = (bitField0_ & ~0x00000001); operation_ = 0; onChanged(); return this; } private com.authzed.api.v1.Core.Relationship relationship_; private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.Relationship, com.authzed.api.v1.Core.Relationship.Builder, com.authzed.api.v1.Core.RelationshipOrBuilder> relationshipBuilder_; /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } * @return Whether the relationship field is set. */ public boolean hasRelationship() { return ((bitField0_ & 0x00000002) != 0); } /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } * @return The relationship. */ public com.authzed.api.v1.Core.Relationship getRelationship() { if (relationshipBuilder_ == null) { return relationship_ == null ? com.authzed.api.v1.Core.Relationship.getDefaultInstance() : relationship_; } else { return relationshipBuilder_.getMessage(); } } /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } */ public Builder setRelationship(com.authzed.api.v1.Core.Relationship value) { if (relationshipBuilder_ == null) { if (value == null) { throw new NullPointerException(); } relationship_ = value; } else { relationshipBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } */ public Builder setRelationship( com.authzed.api.v1.Core.Relationship.Builder builderForValue) { if (relationshipBuilder_ == null) { relationship_ = builderForValue.build(); } else { relationshipBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } */ public Builder mergeRelationship(com.authzed.api.v1.Core.Relationship value) { if (relationshipBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && relationship_ != null && relationship_ != com.authzed.api.v1.Core.Relationship.getDefaultInstance()) { getRelationshipBuilder().mergeFrom(value); } else { relationship_ = value; } } else { relationshipBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } */ public Builder clearRelationship() { bitField0_ = (bitField0_ & ~0x00000002); relationship_ = null; if (relationshipBuilder_ != null) { relationshipBuilder_.dispose(); relationshipBuilder_ = null; } onChanged(); return this; } /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.Relationship.Builder getRelationshipBuilder() { bitField0_ |= 0x00000002; onChanged(); return getRelationshipFieldBuilder().getBuilder(); } /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.RelationshipOrBuilder getRelationshipOrBuilder() { if (relationshipBuilder_ != null) { return relationshipBuilder_.getMessageOrBuilder(); } else { return relationship_ == null ? com.authzed.api.v1.Core.Relationship.getDefaultInstance() : relationship_; } } /** * .authzed.api.v1.Relationship relationship = 2 [(.validate.rules) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.Relationship, com.authzed.api.v1.Core.Relationship.Builder, com.authzed.api.v1.Core.RelationshipOrBuilder> getRelationshipFieldBuilder() { if (relationshipBuilder_ == null) { relationshipBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.Relationship, com.authzed.api.v1.Core.Relationship.Builder, com.authzed.api.v1.Core.RelationshipOrBuilder>( getRelationship(), getParentForChildren(), isClean()); relationship_ = null; } return relationshipBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authzed.api.v1.RelationshipUpdate) } // @@protoc_insertion_point(class_scope:authzed.api.v1.RelationshipUpdate) private static final com.authzed.api.v1.Core.RelationshipUpdate DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.authzed.api.v1.Core.RelationshipUpdate(); } public static com.authzed.api.v1.Core.RelationshipUpdate getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RelationshipUpdate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.authzed.api.v1.Core.RelationshipUpdate getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface PermissionRelationshipTreeOrBuilder extends // @@protoc_insertion_point(interface_extends:authzed.api.v1.PermissionRelationshipTree) com.google.protobuf.MessageOrBuilder { /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; * @return Whether the intermediate field is set. */ boolean hasIntermediate(); /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; * @return The intermediate. */ com.authzed.api.v1.Core.AlgebraicSubjectSet getIntermediate(); /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; */ com.authzed.api.v1.Core.AlgebraicSubjectSetOrBuilder getIntermediateOrBuilder(); /** * .authzed.api.v1.DirectSubjectSet leaf = 2; * @return Whether the leaf field is set. */ boolean hasLeaf(); /** * .authzed.api.v1.DirectSubjectSet leaf = 2; * @return The leaf. */ com.authzed.api.v1.Core.DirectSubjectSet getLeaf(); /** * .authzed.api.v1.DirectSubjectSet leaf = 2; */ com.authzed.api.v1.Core.DirectSubjectSetOrBuilder getLeafOrBuilder(); /** * .authzed.api.v1.ObjectReference expanded_object = 3; * @return Whether the expandedObject field is set. */ boolean hasExpandedObject(); /** * .authzed.api.v1.ObjectReference expanded_object = 3; * @return The expandedObject. */ com.authzed.api.v1.Core.ObjectReference getExpandedObject(); /** * .authzed.api.v1.ObjectReference expanded_object = 3; */ com.authzed.api.v1.Core.ObjectReferenceOrBuilder getExpandedObjectOrBuilder(); /** * string expanded_relation = 4; * @return The expandedRelation. */ java.lang.String getExpandedRelation(); /** * string expanded_relation = 4; * @return The bytes for expandedRelation. */ com.google.protobuf.ByteString getExpandedRelationBytes(); public com.authzed.api.v1.Core.PermissionRelationshipTree.TreeTypeCase getTreeTypeCase(); } /** *
   * PermissionRelationshipTree is used for representing a tree of a resource and
   * its permission relationships with other objects.
   * 
* * Protobuf type {@code authzed.api.v1.PermissionRelationshipTree} */ public static final class PermissionRelationshipTree extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authzed.api.v1.PermissionRelationshipTree) PermissionRelationshipTreeOrBuilder { private static final long serialVersionUID = 0L; // Use PermissionRelationshipTree.newBuilder() to construct. private PermissionRelationshipTree(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PermissionRelationshipTree() { expandedRelation_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new PermissionRelationshipTree(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_PermissionRelationshipTree_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_PermissionRelationshipTree_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.PermissionRelationshipTree.class, com.authzed.api.v1.Core.PermissionRelationshipTree.Builder.class); } private int treeTypeCase_ = 0; private java.lang.Object treeType_; public enum TreeTypeCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { INTERMEDIATE(1), LEAF(2), TREETYPE_NOT_SET(0); private final int value; private TreeTypeCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static TreeTypeCase valueOf(int value) { return forNumber(value); } public static TreeTypeCase forNumber(int value) { switch (value) { case 1: return INTERMEDIATE; case 2: return LEAF; case 0: return TREETYPE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public TreeTypeCase getTreeTypeCase() { return TreeTypeCase.forNumber( treeTypeCase_); } public static final int INTERMEDIATE_FIELD_NUMBER = 1; /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; * @return Whether the intermediate field is set. */ @java.lang.Override public boolean hasIntermediate() { return treeTypeCase_ == 1; } /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; * @return The intermediate. */ @java.lang.Override public com.authzed.api.v1.Core.AlgebraicSubjectSet getIntermediate() { if (treeTypeCase_ == 1) { return (com.authzed.api.v1.Core.AlgebraicSubjectSet) treeType_; } return com.authzed.api.v1.Core.AlgebraicSubjectSet.getDefaultInstance(); } /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; */ @java.lang.Override public com.authzed.api.v1.Core.AlgebraicSubjectSetOrBuilder getIntermediateOrBuilder() { if (treeTypeCase_ == 1) { return (com.authzed.api.v1.Core.AlgebraicSubjectSet) treeType_; } return com.authzed.api.v1.Core.AlgebraicSubjectSet.getDefaultInstance(); } public static final int LEAF_FIELD_NUMBER = 2; /** * .authzed.api.v1.DirectSubjectSet leaf = 2; * @return Whether the leaf field is set. */ @java.lang.Override public boolean hasLeaf() { return treeTypeCase_ == 2; } /** * .authzed.api.v1.DirectSubjectSet leaf = 2; * @return The leaf. */ @java.lang.Override public com.authzed.api.v1.Core.DirectSubjectSet getLeaf() { if (treeTypeCase_ == 2) { return (com.authzed.api.v1.Core.DirectSubjectSet) treeType_; } return com.authzed.api.v1.Core.DirectSubjectSet.getDefaultInstance(); } /** * .authzed.api.v1.DirectSubjectSet leaf = 2; */ @java.lang.Override public com.authzed.api.v1.Core.DirectSubjectSetOrBuilder getLeafOrBuilder() { if (treeTypeCase_ == 2) { return (com.authzed.api.v1.Core.DirectSubjectSet) treeType_; } return com.authzed.api.v1.Core.DirectSubjectSet.getDefaultInstance(); } public static final int EXPANDED_OBJECT_FIELD_NUMBER = 3; private com.authzed.api.v1.Core.ObjectReference expandedObject_; /** * .authzed.api.v1.ObjectReference expanded_object = 3; * @return Whether the expandedObject field is set. */ @java.lang.Override public boolean hasExpandedObject() { return expandedObject_ != null; } /** * .authzed.api.v1.ObjectReference expanded_object = 3; * @return The expandedObject. */ @java.lang.Override public com.authzed.api.v1.Core.ObjectReference getExpandedObject() { return expandedObject_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : expandedObject_; } /** * .authzed.api.v1.ObjectReference expanded_object = 3; */ @java.lang.Override public com.authzed.api.v1.Core.ObjectReferenceOrBuilder getExpandedObjectOrBuilder() { return expandedObject_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : expandedObject_; } public static final int EXPANDED_RELATION_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object expandedRelation_ = ""; /** * string expanded_relation = 4; * @return The expandedRelation. */ @java.lang.Override public java.lang.String getExpandedRelation() { java.lang.Object ref = expandedRelation_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); expandedRelation_ = s; return s; } } /** * string expanded_relation = 4; * @return The bytes for expandedRelation. */ @java.lang.Override public com.google.protobuf.ByteString getExpandedRelationBytes() { java.lang.Object ref = expandedRelation_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); expandedRelation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (treeTypeCase_ == 1) { output.writeMessage(1, (com.authzed.api.v1.Core.AlgebraicSubjectSet) treeType_); } if (treeTypeCase_ == 2) { output.writeMessage(2, (com.authzed.api.v1.Core.DirectSubjectSet) treeType_); } if (expandedObject_ != null) { output.writeMessage(3, getExpandedObject()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expandedRelation_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, expandedRelation_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (treeTypeCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (com.authzed.api.v1.Core.AlgebraicSubjectSet) treeType_); } if (treeTypeCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.authzed.api.v1.Core.DirectSubjectSet) treeType_); } if (expandedObject_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getExpandedObject()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expandedRelation_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, expandedRelation_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.authzed.api.v1.Core.PermissionRelationshipTree)) { return super.equals(obj); } com.authzed.api.v1.Core.PermissionRelationshipTree other = (com.authzed.api.v1.Core.PermissionRelationshipTree) obj; if (hasExpandedObject() != other.hasExpandedObject()) return false; if (hasExpandedObject()) { if (!getExpandedObject() .equals(other.getExpandedObject())) return false; } if (!getExpandedRelation() .equals(other.getExpandedRelation())) return false; if (!getTreeTypeCase().equals(other.getTreeTypeCase())) return false; switch (treeTypeCase_) { case 1: if (!getIntermediate() .equals(other.getIntermediate())) return false; break; case 2: if (!getLeaf() .equals(other.getLeaf())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasExpandedObject()) { hash = (37 * hash) + EXPANDED_OBJECT_FIELD_NUMBER; hash = (53 * hash) + getExpandedObject().hashCode(); } hash = (37 * hash) + EXPANDED_RELATION_FIELD_NUMBER; hash = (53 * hash) + getExpandedRelation().hashCode(); switch (treeTypeCase_) { case 1: hash = (37 * hash) + INTERMEDIATE_FIELD_NUMBER; hash = (53 * hash) + getIntermediate().hashCode(); break; case 2: hash = (37 * hash) + LEAF_FIELD_NUMBER; hash = (53 * hash) + getLeaf().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.PermissionRelationshipTree parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.authzed.api.v1.Core.PermissionRelationshipTree prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * PermissionRelationshipTree is used for representing a tree of a resource and
     * its permission relationships with other objects.
     * 
* * Protobuf type {@code authzed.api.v1.PermissionRelationshipTree} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authzed.api.v1.PermissionRelationshipTree) com.authzed.api.v1.Core.PermissionRelationshipTreeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_PermissionRelationshipTree_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_PermissionRelationshipTree_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.PermissionRelationshipTree.class, com.authzed.api.v1.Core.PermissionRelationshipTree.Builder.class); } // Construct using com.authzed.api.v1.Core.PermissionRelationshipTree.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (intermediateBuilder_ != null) { intermediateBuilder_.clear(); } if (leafBuilder_ != null) { leafBuilder_.clear(); } expandedObject_ = null; if (expandedObjectBuilder_ != null) { expandedObjectBuilder_.dispose(); expandedObjectBuilder_ = null; } expandedRelation_ = ""; treeTypeCase_ = 0; treeType_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_PermissionRelationshipTree_descriptor; } @java.lang.Override public com.authzed.api.v1.Core.PermissionRelationshipTree getDefaultInstanceForType() { return com.authzed.api.v1.Core.PermissionRelationshipTree.getDefaultInstance(); } @java.lang.Override public com.authzed.api.v1.Core.PermissionRelationshipTree build() { com.authzed.api.v1.Core.PermissionRelationshipTree result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.authzed.api.v1.Core.PermissionRelationshipTree buildPartial() { com.authzed.api.v1.Core.PermissionRelationshipTree result = new com.authzed.api.v1.Core.PermissionRelationshipTree(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.authzed.api.v1.Core.PermissionRelationshipTree result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000004) != 0)) { result.expandedObject_ = expandedObjectBuilder_ == null ? expandedObject_ : expandedObjectBuilder_.build(); } if (((from_bitField0_ & 0x00000008) != 0)) { result.expandedRelation_ = expandedRelation_; } } private void buildPartialOneofs(com.authzed.api.v1.Core.PermissionRelationshipTree result) { result.treeTypeCase_ = treeTypeCase_; result.treeType_ = this.treeType_; if (treeTypeCase_ == 1 && intermediateBuilder_ != null) { result.treeType_ = intermediateBuilder_.build(); } if (treeTypeCase_ == 2 && leafBuilder_ != null) { result.treeType_ = leafBuilder_.build(); } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.authzed.api.v1.Core.PermissionRelationshipTree) { return mergeFrom((com.authzed.api.v1.Core.PermissionRelationshipTree)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.authzed.api.v1.Core.PermissionRelationshipTree other) { if (other == com.authzed.api.v1.Core.PermissionRelationshipTree.getDefaultInstance()) return this; if (other.hasExpandedObject()) { mergeExpandedObject(other.getExpandedObject()); } if (!other.getExpandedRelation().isEmpty()) { expandedRelation_ = other.expandedRelation_; bitField0_ |= 0x00000008; onChanged(); } switch (other.getTreeTypeCase()) { case INTERMEDIATE: { mergeIntermediate(other.getIntermediate()); break; } case LEAF: { mergeLeaf(other.getLeaf()); break; } case TREETYPE_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getIntermediateFieldBuilder().getBuilder(), extensionRegistry); treeTypeCase_ = 1; break; } // case 10 case 18: { input.readMessage( getLeafFieldBuilder().getBuilder(), extensionRegistry); treeTypeCase_ = 2; break; } // case 18 case 26: { input.readMessage( getExpandedObjectFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { expandedRelation_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int treeTypeCase_ = 0; private java.lang.Object treeType_; public TreeTypeCase getTreeTypeCase() { return TreeTypeCase.forNumber( treeTypeCase_); } public Builder clearTreeType() { treeTypeCase_ = 0; treeType_ = null; onChanged(); return this; } private int bitField0_; private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.AlgebraicSubjectSet, com.authzed.api.v1.Core.AlgebraicSubjectSet.Builder, com.authzed.api.v1.Core.AlgebraicSubjectSetOrBuilder> intermediateBuilder_; /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; * @return Whether the intermediate field is set. */ @java.lang.Override public boolean hasIntermediate() { return treeTypeCase_ == 1; } /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; * @return The intermediate. */ @java.lang.Override public com.authzed.api.v1.Core.AlgebraicSubjectSet getIntermediate() { if (intermediateBuilder_ == null) { if (treeTypeCase_ == 1) { return (com.authzed.api.v1.Core.AlgebraicSubjectSet) treeType_; } return com.authzed.api.v1.Core.AlgebraicSubjectSet.getDefaultInstance(); } else { if (treeTypeCase_ == 1) { return intermediateBuilder_.getMessage(); } return com.authzed.api.v1.Core.AlgebraicSubjectSet.getDefaultInstance(); } } /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; */ public Builder setIntermediate(com.authzed.api.v1.Core.AlgebraicSubjectSet value) { if (intermediateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } treeType_ = value; onChanged(); } else { intermediateBuilder_.setMessage(value); } treeTypeCase_ = 1; return this; } /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; */ public Builder setIntermediate( com.authzed.api.v1.Core.AlgebraicSubjectSet.Builder builderForValue) { if (intermediateBuilder_ == null) { treeType_ = builderForValue.build(); onChanged(); } else { intermediateBuilder_.setMessage(builderForValue.build()); } treeTypeCase_ = 1; return this; } /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; */ public Builder mergeIntermediate(com.authzed.api.v1.Core.AlgebraicSubjectSet value) { if (intermediateBuilder_ == null) { if (treeTypeCase_ == 1 && treeType_ != com.authzed.api.v1.Core.AlgebraicSubjectSet.getDefaultInstance()) { treeType_ = com.authzed.api.v1.Core.AlgebraicSubjectSet.newBuilder((com.authzed.api.v1.Core.AlgebraicSubjectSet) treeType_) .mergeFrom(value).buildPartial(); } else { treeType_ = value; } onChanged(); } else { if (treeTypeCase_ == 1) { intermediateBuilder_.mergeFrom(value); } else { intermediateBuilder_.setMessage(value); } } treeTypeCase_ = 1; return this; } /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; */ public Builder clearIntermediate() { if (intermediateBuilder_ == null) { if (treeTypeCase_ == 1) { treeTypeCase_ = 0; treeType_ = null; onChanged(); } } else { if (treeTypeCase_ == 1) { treeTypeCase_ = 0; treeType_ = null; } intermediateBuilder_.clear(); } return this; } /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; */ public com.authzed.api.v1.Core.AlgebraicSubjectSet.Builder getIntermediateBuilder() { return getIntermediateFieldBuilder().getBuilder(); } /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; */ @java.lang.Override public com.authzed.api.v1.Core.AlgebraicSubjectSetOrBuilder getIntermediateOrBuilder() { if ((treeTypeCase_ == 1) && (intermediateBuilder_ != null)) { return intermediateBuilder_.getMessageOrBuilder(); } else { if (treeTypeCase_ == 1) { return (com.authzed.api.v1.Core.AlgebraicSubjectSet) treeType_; } return com.authzed.api.v1.Core.AlgebraicSubjectSet.getDefaultInstance(); } } /** * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.AlgebraicSubjectSet, com.authzed.api.v1.Core.AlgebraicSubjectSet.Builder, com.authzed.api.v1.Core.AlgebraicSubjectSetOrBuilder> getIntermediateFieldBuilder() { if (intermediateBuilder_ == null) { if (!(treeTypeCase_ == 1)) { treeType_ = com.authzed.api.v1.Core.AlgebraicSubjectSet.getDefaultInstance(); } intermediateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.AlgebraicSubjectSet, com.authzed.api.v1.Core.AlgebraicSubjectSet.Builder, com.authzed.api.v1.Core.AlgebraicSubjectSetOrBuilder>( (com.authzed.api.v1.Core.AlgebraicSubjectSet) treeType_, getParentForChildren(), isClean()); treeType_ = null; } treeTypeCase_ = 1; onChanged(); return intermediateBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.DirectSubjectSet, com.authzed.api.v1.Core.DirectSubjectSet.Builder, com.authzed.api.v1.Core.DirectSubjectSetOrBuilder> leafBuilder_; /** * .authzed.api.v1.DirectSubjectSet leaf = 2; * @return Whether the leaf field is set. */ @java.lang.Override public boolean hasLeaf() { return treeTypeCase_ == 2; } /** * .authzed.api.v1.DirectSubjectSet leaf = 2; * @return The leaf. */ @java.lang.Override public com.authzed.api.v1.Core.DirectSubjectSet getLeaf() { if (leafBuilder_ == null) { if (treeTypeCase_ == 2) { return (com.authzed.api.v1.Core.DirectSubjectSet) treeType_; } return com.authzed.api.v1.Core.DirectSubjectSet.getDefaultInstance(); } else { if (treeTypeCase_ == 2) { return leafBuilder_.getMessage(); } return com.authzed.api.v1.Core.DirectSubjectSet.getDefaultInstance(); } } /** * .authzed.api.v1.DirectSubjectSet leaf = 2; */ public Builder setLeaf(com.authzed.api.v1.Core.DirectSubjectSet value) { if (leafBuilder_ == null) { if (value == null) { throw new NullPointerException(); } treeType_ = value; onChanged(); } else { leafBuilder_.setMessage(value); } treeTypeCase_ = 2; return this; } /** * .authzed.api.v1.DirectSubjectSet leaf = 2; */ public Builder setLeaf( com.authzed.api.v1.Core.DirectSubjectSet.Builder builderForValue) { if (leafBuilder_ == null) { treeType_ = builderForValue.build(); onChanged(); } else { leafBuilder_.setMessage(builderForValue.build()); } treeTypeCase_ = 2; return this; } /** * .authzed.api.v1.DirectSubjectSet leaf = 2; */ public Builder mergeLeaf(com.authzed.api.v1.Core.DirectSubjectSet value) { if (leafBuilder_ == null) { if (treeTypeCase_ == 2 && treeType_ != com.authzed.api.v1.Core.DirectSubjectSet.getDefaultInstance()) { treeType_ = com.authzed.api.v1.Core.DirectSubjectSet.newBuilder((com.authzed.api.v1.Core.DirectSubjectSet) treeType_) .mergeFrom(value).buildPartial(); } else { treeType_ = value; } onChanged(); } else { if (treeTypeCase_ == 2) { leafBuilder_.mergeFrom(value); } else { leafBuilder_.setMessage(value); } } treeTypeCase_ = 2; return this; } /** * .authzed.api.v1.DirectSubjectSet leaf = 2; */ public Builder clearLeaf() { if (leafBuilder_ == null) { if (treeTypeCase_ == 2) { treeTypeCase_ = 0; treeType_ = null; onChanged(); } } else { if (treeTypeCase_ == 2) { treeTypeCase_ = 0; treeType_ = null; } leafBuilder_.clear(); } return this; } /** * .authzed.api.v1.DirectSubjectSet leaf = 2; */ public com.authzed.api.v1.Core.DirectSubjectSet.Builder getLeafBuilder() { return getLeafFieldBuilder().getBuilder(); } /** * .authzed.api.v1.DirectSubjectSet leaf = 2; */ @java.lang.Override public com.authzed.api.v1.Core.DirectSubjectSetOrBuilder getLeafOrBuilder() { if ((treeTypeCase_ == 2) && (leafBuilder_ != null)) { return leafBuilder_.getMessageOrBuilder(); } else { if (treeTypeCase_ == 2) { return (com.authzed.api.v1.Core.DirectSubjectSet) treeType_; } return com.authzed.api.v1.Core.DirectSubjectSet.getDefaultInstance(); } } /** * .authzed.api.v1.DirectSubjectSet leaf = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.DirectSubjectSet, com.authzed.api.v1.Core.DirectSubjectSet.Builder, com.authzed.api.v1.Core.DirectSubjectSetOrBuilder> getLeafFieldBuilder() { if (leafBuilder_ == null) { if (!(treeTypeCase_ == 2)) { treeType_ = com.authzed.api.v1.Core.DirectSubjectSet.getDefaultInstance(); } leafBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.DirectSubjectSet, com.authzed.api.v1.Core.DirectSubjectSet.Builder, com.authzed.api.v1.Core.DirectSubjectSetOrBuilder>( (com.authzed.api.v1.Core.DirectSubjectSet) treeType_, getParentForChildren(), isClean()); treeType_ = null; } treeTypeCase_ = 2; onChanged(); return leafBuilder_; } private com.authzed.api.v1.Core.ObjectReference expandedObject_; private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ObjectReference, com.authzed.api.v1.Core.ObjectReference.Builder, com.authzed.api.v1.Core.ObjectReferenceOrBuilder> expandedObjectBuilder_; /** * .authzed.api.v1.ObjectReference expanded_object = 3; * @return Whether the expandedObject field is set. */ public boolean hasExpandedObject() { return ((bitField0_ & 0x00000004) != 0); } /** * .authzed.api.v1.ObjectReference expanded_object = 3; * @return The expandedObject. */ public com.authzed.api.v1.Core.ObjectReference getExpandedObject() { if (expandedObjectBuilder_ == null) { return expandedObject_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : expandedObject_; } else { return expandedObjectBuilder_.getMessage(); } } /** * .authzed.api.v1.ObjectReference expanded_object = 3; */ public Builder setExpandedObject(com.authzed.api.v1.Core.ObjectReference value) { if (expandedObjectBuilder_ == null) { if (value == null) { throw new NullPointerException(); } expandedObject_ = value; } else { expandedObjectBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * .authzed.api.v1.ObjectReference expanded_object = 3; */ public Builder setExpandedObject( com.authzed.api.v1.Core.ObjectReference.Builder builderForValue) { if (expandedObjectBuilder_ == null) { expandedObject_ = builderForValue.build(); } else { expandedObjectBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * .authzed.api.v1.ObjectReference expanded_object = 3; */ public Builder mergeExpandedObject(com.authzed.api.v1.Core.ObjectReference value) { if (expandedObjectBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && expandedObject_ != null && expandedObject_ != com.authzed.api.v1.Core.ObjectReference.getDefaultInstance()) { getExpandedObjectBuilder().mergeFrom(value); } else { expandedObject_ = value; } } else { expandedObjectBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * .authzed.api.v1.ObjectReference expanded_object = 3; */ public Builder clearExpandedObject() { bitField0_ = (bitField0_ & ~0x00000004); expandedObject_ = null; if (expandedObjectBuilder_ != null) { expandedObjectBuilder_.dispose(); expandedObjectBuilder_ = null; } onChanged(); return this; } /** * .authzed.api.v1.ObjectReference expanded_object = 3; */ public com.authzed.api.v1.Core.ObjectReference.Builder getExpandedObjectBuilder() { bitField0_ |= 0x00000004; onChanged(); return getExpandedObjectFieldBuilder().getBuilder(); } /** * .authzed.api.v1.ObjectReference expanded_object = 3; */ public com.authzed.api.v1.Core.ObjectReferenceOrBuilder getExpandedObjectOrBuilder() { if (expandedObjectBuilder_ != null) { return expandedObjectBuilder_.getMessageOrBuilder(); } else { return expandedObject_ == null ? com.authzed.api.v1.Core.ObjectReference.getDefaultInstance() : expandedObject_; } } /** * .authzed.api.v1.ObjectReference expanded_object = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ObjectReference, com.authzed.api.v1.Core.ObjectReference.Builder, com.authzed.api.v1.Core.ObjectReferenceOrBuilder> getExpandedObjectFieldBuilder() { if (expandedObjectBuilder_ == null) { expandedObjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.authzed.api.v1.Core.ObjectReference, com.authzed.api.v1.Core.ObjectReference.Builder, com.authzed.api.v1.Core.ObjectReferenceOrBuilder>( getExpandedObject(), getParentForChildren(), isClean()); expandedObject_ = null; } return expandedObjectBuilder_; } private java.lang.Object expandedRelation_ = ""; /** * string expanded_relation = 4; * @return The expandedRelation. */ public java.lang.String getExpandedRelation() { java.lang.Object ref = expandedRelation_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); expandedRelation_ = s; return s; } else { return (java.lang.String) ref; } } /** * string expanded_relation = 4; * @return The bytes for expandedRelation. */ public com.google.protobuf.ByteString getExpandedRelationBytes() { java.lang.Object ref = expandedRelation_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); expandedRelation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string expanded_relation = 4; * @param value The expandedRelation to set. * @return This builder for chaining. */ public Builder setExpandedRelation( java.lang.String value) { if (value == null) { throw new NullPointerException(); } expandedRelation_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * string expanded_relation = 4; * @return This builder for chaining. */ public Builder clearExpandedRelation() { expandedRelation_ = getDefaultInstance().getExpandedRelation(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * string expanded_relation = 4; * @param value The bytes for expandedRelation to set. * @return This builder for chaining. */ public Builder setExpandedRelationBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); expandedRelation_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authzed.api.v1.PermissionRelationshipTree) } // @@protoc_insertion_point(class_scope:authzed.api.v1.PermissionRelationshipTree) private static final com.authzed.api.v1.Core.PermissionRelationshipTree DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.authzed.api.v1.Core.PermissionRelationshipTree(); } public static com.authzed.api.v1.Core.PermissionRelationshipTree getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public PermissionRelationshipTree parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.authzed.api.v1.Core.PermissionRelationshipTree getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface AlgebraicSubjectSetOrBuilder extends // @@protoc_insertion_point(interface_extends:authzed.api.v1.AlgebraicSubjectSet) com.google.protobuf.MessageOrBuilder { /** * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for operation. */ int getOperationValue(); /** * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [(.validate.rules) = { ... } * @return The operation. */ com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation getOperation(); /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ java.util.List getChildrenList(); /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ com.authzed.api.v1.Core.PermissionRelationshipTree getChildren(int index); /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ int getChildrenCount(); /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ java.util.List getChildrenOrBuilderList(); /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ com.authzed.api.v1.Core.PermissionRelationshipTreeOrBuilder getChildrenOrBuilder( int index); } /** *
   * AlgebraicSubjectSet is a subject set which is computed based on applying the
   * specified operation to the operands according to the algebra of sets.
   * UNION is a logical set containing the subject members from all operands.
   * INTERSECTION is a logical set containing only the subject members which are
   * present in all operands.
   * EXCLUSION is a logical set containing only the subject members which are
   * present in the first operand, and none of the other operands.
   * 
* * Protobuf type {@code authzed.api.v1.AlgebraicSubjectSet} */ public static final class AlgebraicSubjectSet extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authzed.api.v1.AlgebraicSubjectSet) AlgebraicSubjectSetOrBuilder { private static final long serialVersionUID = 0L; // Use AlgebraicSubjectSet.newBuilder() to construct. private AlgebraicSubjectSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AlgebraicSubjectSet() { operation_ = 0; children_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AlgebraicSubjectSet(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_AlgebraicSubjectSet_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_AlgebraicSubjectSet_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.AlgebraicSubjectSet.class, com.authzed.api.v1.Core.AlgebraicSubjectSet.Builder.class); } /** * Protobuf enum {@code authzed.api.v1.AlgebraicSubjectSet.Operation} */ public enum Operation implements com.google.protobuf.ProtocolMessageEnum { /** * OPERATION_UNSPECIFIED = 0; */ OPERATION_UNSPECIFIED(0), /** * OPERATION_UNION = 1; */ OPERATION_UNION(1), /** * OPERATION_INTERSECTION = 2; */ OPERATION_INTERSECTION(2), /** * OPERATION_EXCLUSION = 3; */ OPERATION_EXCLUSION(3), UNRECOGNIZED(-1), ; /** * OPERATION_UNSPECIFIED = 0; */ public static final int OPERATION_UNSPECIFIED_VALUE = 0; /** * OPERATION_UNION = 1; */ public static final int OPERATION_UNION_VALUE = 1; /** * OPERATION_INTERSECTION = 2; */ public static final int OPERATION_INTERSECTION_VALUE = 2; /** * OPERATION_EXCLUSION = 3; */ public static final int OPERATION_EXCLUSION_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Operation valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Operation forNumber(int value) { switch (value) { case 0: return OPERATION_UNSPECIFIED; case 1: return OPERATION_UNION; case 2: return OPERATION_INTERSECTION; case 3: return OPERATION_EXCLUSION; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Operation> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Operation findValueByNumber(int number) { return Operation.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.authzed.api.v1.Core.AlgebraicSubjectSet.getDescriptor().getEnumTypes().get(0); } private static final Operation[] VALUES = values(); public static Operation valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Operation(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:authzed.api.v1.AlgebraicSubjectSet.Operation) } public static final int OPERATION_FIELD_NUMBER = 1; private int operation_ = 0; /** * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for operation. */ @java.lang.Override public int getOperationValue() { return operation_; } /** * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [(.validate.rules) = { ... } * @return The operation. */ @java.lang.Override public com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation getOperation() { com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation result = com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation.forNumber(operation_); return result == null ? com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation.UNRECOGNIZED : result; } public static final int CHILDREN_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List children_; /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getChildrenList() { return children_; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ @java.lang.Override public java.util.List getChildrenOrBuilderList() { return children_; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ @java.lang.Override public int getChildrenCount() { return children_.size(); } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ @java.lang.Override public com.authzed.api.v1.Core.PermissionRelationshipTree getChildren(int index) { return children_.get(index); } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ @java.lang.Override public com.authzed.api.v1.Core.PermissionRelationshipTreeOrBuilder getChildrenOrBuilder( int index) { return children_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (operation_ != com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation.OPERATION_UNSPECIFIED.getNumber()) { output.writeEnum(1, operation_); } for (int i = 0; i < children_.size(); i++) { output.writeMessage(2, children_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (operation_ != com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation.OPERATION_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, operation_); } for (int i = 0; i < children_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, children_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.authzed.api.v1.Core.AlgebraicSubjectSet)) { return super.equals(obj); } com.authzed.api.v1.Core.AlgebraicSubjectSet other = (com.authzed.api.v1.Core.AlgebraicSubjectSet) obj; if (operation_ != other.operation_) return false; if (!getChildrenList() .equals(other.getChildrenList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + OPERATION_FIELD_NUMBER; hash = (53 * hash) + operation_; if (getChildrenCount() > 0) { hash = (37 * hash) + CHILDREN_FIELD_NUMBER; hash = (53 * hash) + getChildrenList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.authzed.api.v1.Core.AlgebraicSubjectSet prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * AlgebraicSubjectSet is a subject set which is computed based on applying the
     * specified operation to the operands according to the algebra of sets.
     * UNION is a logical set containing the subject members from all operands.
     * INTERSECTION is a logical set containing only the subject members which are
     * present in all operands.
     * EXCLUSION is a logical set containing only the subject members which are
     * present in the first operand, and none of the other operands.
     * 
* * Protobuf type {@code authzed.api.v1.AlgebraicSubjectSet} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authzed.api.v1.AlgebraicSubjectSet) com.authzed.api.v1.Core.AlgebraicSubjectSetOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_AlgebraicSubjectSet_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_AlgebraicSubjectSet_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.AlgebraicSubjectSet.class, com.authzed.api.v1.Core.AlgebraicSubjectSet.Builder.class); } // Construct using com.authzed.api.v1.Core.AlgebraicSubjectSet.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; operation_ = 0; if (childrenBuilder_ == null) { children_ = java.util.Collections.emptyList(); } else { children_ = null; childrenBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_AlgebraicSubjectSet_descriptor; } @java.lang.Override public com.authzed.api.v1.Core.AlgebraicSubjectSet getDefaultInstanceForType() { return com.authzed.api.v1.Core.AlgebraicSubjectSet.getDefaultInstance(); } @java.lang.Override public com.authzed.api.v1.Core.AlgebraicSubjectSet build() { com.authzed.api.v1.Core.AlgebraicSubjectSet result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.authzed.api.v1.Core.AlgebraicSubjectSet buildPartial() { com.authzed.api.v1.Core.AlgebraicSubjectSet result = new com.authzed.api.v1.Core.AlgebraicSubjectSet(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.authzed.api.v1.Core.AlgebraicSubjectSet result) { if (childrenBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { children_ = java.util.Collections.unmodifiableList(children_); bitField0_ = (bitField0_ & ~0x00000002); } result.children_ = children_; } else { result.children_ = childrenBuilder_.build(); } } private void buildPartial0(com.authzed.api.v1.Core.AlgebraicSubjectSet result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.operation_ = operation_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.authzed.api.v1.Core.AlgebraicSubjectSet) { return mergeFrom((com.authzed.api.v1.Core.AlgebraicSubjectSet)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.authzed.api.v1.Core.AlgebraicSubjectSet other) { if (other == com.authzed.api.v1.Core.AlgebraicSubjectSet.getDefaultInstance()) return this; if (other.operation_ != 0) { setOperationValue(other.getOperationValue()); } if (childrenBuilder_ == null) { if (!other.children_.isEmpty()) { if (children_.isEmpty()) { children_ = other.children_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureChildrenIsMutable(); children_.addAll(other.children_); } onChanged(); } } else { if (!other.children_.isEmpty()) { if (childrenBuilder_.isEmpty()) { childrenBuilder_.dispose(); childrenBuilder_ = null; children_ = other.children_; bitField0_ = (bitField0_ & ~0x00000002); childrenBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getChildrenFieldBuilder() : null; } else { childrenBuilder_.addAllMessages(other.children_); } } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { operation_ = input.readEnum(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { com.authzed.api.v1.Core.PermissionRelationshipTree m = input.readMessage( com.authzed.api.v1.Core.PermissionRelationshipTree.parser(), extensionRegistry); if (childrenBuilder_ == null) { ensureChildrenIsMutable(); children_.add(m); } else { childrenBuilder_.addMessage(m); } break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private int operation_ = 0; /** * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [(.validate.rules) = { ... } * @return The enum numeric value on the wire for operation. */ @java.lang.Override public int getOperationValue() { return operation_; } /** * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [(.validate.rules) = { ... } * @param value The enum numeric value on the wire for operation to set. * @return This builder for chaining. */ public Builder setOperationValue(int value) { operation_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [(.validate.rules) = { ... } * @return The operation. */ @java.lang.Override public com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation getOperation() { com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation result = com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation.forNumber(operation_); return result == null ? com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation.UNRECOGNIZED : result; } /** * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [(.validate.rules) = { ... } * @param value The operation to set. * @return This builder for chaining. */ public Builder setOperation(com.authzed.api.v1.Core.AlgebraicSubjectSet.Operation value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; operation_ = value.getNumber(); onChanged(); return this; } /** * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearOperation() { bitField0_ = (bitField0_ & ~0x00000001); operation_ = 0; onChanged(); return this; } private java.util.List children_ = java.util.Collections.emptyList(); private void ensureChildrenIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { children_ = new java.util.ArrayList(children_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.authzed.api.v1.Core.PermissionRelationshipTree, com.authzed.api.v1.Core.PermissionRelationshipTree.Builder, com.authzed.api.v1.Core.PermissionRelationshipTreeOrBuilder> childrenBuilder_; /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public java.util.List getChildrenList() { if (childrenBuilder_ == null) { return java.util.Collections.unmodifiableList(children_); } else { return childrenBuilder_.getMessageList(); } } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public int getChildrenCount() { if (childrenBuilder_ == null) { return children_.size(); } else { return childrenBuilder_.getCount(); } } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.PermissionRelationshipTree getChildren(int index) { if (childrenBuilder_ == null) { return children_.get(index); } else { return childrenBuilder_.getMessage(index); } } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public Builder setChildren( int index, com.authzed.api.v1.Core.PermissionRelationshipTree value) { if (childrenBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureChildrenIsMutable(); children_.set(index, value); onChanged(); } else { childrenBuilder_.setMessage(index, value); } return this; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public Builder setChildren( int index, com.authzed.api.v1.Core.PermissionRelationshipTree.Builder builderForValue) { if (childrenBuilder_ == null) { ensureChildrenIsMutable(); children_.set(index, builderForValue.build()); onChanged(); } else { childrenBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public Builder addChildren(com.authzed.api.v1.Core.PermissionRelationshipTree value) { if (childrenBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureChildrenIsMutable(); children_.add(value); onChanged(); } else { childrenBuilder_.addMessage(value); } return this; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public Builder addChildren( int index, com.authzed.api.v1.Core.PermissionRelationshipTree value) { if (childrenBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureChildrenIsMutable(); children_.add(index, value); onChanged(); } else { childrenBuilder_.addMessage(index, value); } return this; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public Builder addChildren( com.authzed.api.v1.Core.PermissionRelationshipTree.Builder builderForValue) { if (childrenBuilder_ == null) { ensureChildrenIsMutable(); children_.add(builderForValue.build()); onChanged(); } else { childrenBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public Builder addChildren( int index, com.authzed.api.v1.Core.PermissionRelationshipTree.Builder builderForValue) { if (childrenBuilder_ == null) { ensureChildrenIsMutable(); children_.add(index, builderForValue.build()); onChanged(); } else { childrenBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public Builder addAllChildren( java.lang.Iterable values) { if (childrenBuilder_ == null) { ensureChildrenIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, children_); onChanged(); } else { childrenBuilder_.addAllMessages(values); } return this; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public Builder clearChildren() { if (childrenBuilder_ == null) { children_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { childrenBuilder_.clear(); } return this; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public Builder removeChildren(int index) { if (childrenBuilder_ == null) { ensureChildrenIsMutable(); children_.remove(index); onChanged(); } else { childrenBuilder_.remove(index); } return this; } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.PermissionRelationshipTree.Builder getChildrenBuilder( int index) { return getChildrenFieldBuilder().getBuilder(index); } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.PermissionRelationshipTreeOrBuilder getChildrenOrBuilder( int index) { if (childrenBuilder_ == null) { return children_.get(index); } else { return childrenBuilder_.getMessageOrBuilder(index); } } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public java.util.List getChildrenOrBuilderList() { if (childrenBuilder_ != null) { return childrenBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(children_); } } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.PermissionRelationshipTree.Builder addChildrenBuilder() { return getChildrenFieldBuilder().addBuilder( com.authzed.api.v1.Core.PermissionRelationshipTree.getDefaultInstance()); } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public com.authzed.api.v1.Core.PermissionRelationshipTree.Builder addChildrenBuilder( int index) { return getChildrenFieldBuilder().addBuilder( index, com.authzed.api.v1.Core.PermissionRelationshipTree.getDefaultInstance()); } /** * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [(.validate.rules) = { ... } */ public java.util.List getChildrenBuilderList() { return getChildrenFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.authzed.api.v1.Core.PermissionRelationshipTree, com.authzed.api.v1.Core.PermissionRelationshipTree.Builder, com.authzed.api.v1.Core.PermissionRelationshipTreeOrBuilder> getChildrenFieldBuilder() { if (childrenBuilder_ == null) { childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.authzed.api.v1.Core.PermissionRelationshipTree, com.authzed.api.v1.Core.PermissionRelationshipTree.Builder, com.authzed.api.v1.Core.PermissionRelationshipTreeOrBuilder>( children_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); children_ = null; } return childrenBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authzed.api.v1.AlgebraicSubjectSet) } // @@protoc_insertion_point(class_scope:authzed.api.v1.AlgebraicSubjectSet) private static final com.authzed.api.v1.Core.AlgebraicSubjectSet DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.authzed.api.v1.Core.AlgebraicSubjectSet(); } public static com.authzed.api.v1.Core.AlgebraicSubjectSet getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AlgebraicSubjectSet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.authzed.api.v1.Core.AlgebraicSubjectSet getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface DirectSubjectSetOrBuilder extends // @@protoc_insertion_point(interface_extends:authzed.api.v1.DirectSubjectSet) com.google.protobuf.MessageOrBuilder { /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ java.util.List getSubjectsList(); /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ com.authzed.api.v1.Core.SubjectReference getSubjects(int index); /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ int getSubjectsCount(); /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ java.util.List getSubjectsOrBuilderList(); /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ com.authzed.api.v1.Core.SubjectReferenceOrBuilder getSubjectsOrBuilder( int index); } /** *
   * DirectSubjectSet is a subject set which is simply a collection of subjects.
   * 
* * Protobuf type {@code authzed.api.v1.DirectSubjectSet} */ public static final class DirectSubjectSet extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authzed.api.v1.DirectSubjectSet) DirectSubjectSetOrBuilder { private static final long serialVersionUID = 0L; // Use DirectSubjectSet.newBuilder() to construct. private DirectSubjectSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private DirectSubjectSet() { subjects_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new DirectSubjectSet(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_DirectSubjectSet_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_DirectSubjectSet_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.DirectSubjectSet.class, com.authzed.api.v1.Core.DirectSubjectSet.Builder.class); } public static final int SUBJECTS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List subjects_; /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ @java.lang.Override public java.util.List getSubjectsList() { return subjects_; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ @java.lang.Override public java.util.List getSubjectsOrBuilderList() { return subjects_; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ @java.lang.Override public int getSubjectsCount() { return subjects_.size(); } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ @java.lang.Override public com.authzed.api.v1.Core.SubjectReference getSubjects(int index) { return subjects_.get(index); } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ @java.lang.Override public com.authzed.api.v1.Core.SubjectReferenceOrBuilder getSubjectsOrBuilder( int index) { return subjects_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < subjects_.size(); i++) { output.writeMessage(1, subjects_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < subjects_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, subjects_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.authzed.api.v1.Core.DirectSubjectSet)) { return super.equals(obj); } com.authzed.api.v1.Core.DirectSubjectSet other = (com.authzed.api.v1.Core.DirectSubjectSet) obj; if (!getSubjectsList() .equals(other.getSubjectsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getSubjectsCount() > 0) { hash = (37 * hash) + SUBJECTS_FIELD_NUMBER; hash = (53 * hash) + getSubjectsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.authzed.api.v1.Core.DirectSubjectSet parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.DirectSubjectSet parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.DirectSubjectSet parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.DirectSubjectSet parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.DirectSubjectSet parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.DirectSubjectSet parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.DirectSubjectSet parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.DirectSubjectSet parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.DirectSubjectSet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.DirectSubjectSet parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.DirectSubjectSet parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.DirectSubjectSet parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.authzed.api.v1.Core.DirectSubjectSet prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * DirectSubjectSet is a subject set which is simply a collection of subjects.
     * 
* * Protobuf type {@code authzed.api.v1.DirectSubjectSet} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authzed.api.v1.DirectSubjectSet) com.authzed.api.v1.Core.DirectSubjectSetOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_DirectSubjectSet_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_DirectSubjectSet_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.DirectSubjectSet.class, com.authzed.api.v1.Core.DirectSubjectSet.Builder.class); } // Construct using com.authzed.api.v1.Core.DirectSubjectSet.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (subjectsBuilder_ == null) { subjects_ = java.util.Collections.emptyList(); } else { subjects_ = null; subjectsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_DirectSubjectSet_descriptor; } @java.lang.Override public com.authzed.api.v1.Core.DirectSubjectSet getDefaultInstanceForType() { return com.authzed.api.v1.Core.DirectSubjectSet.getDefaultInstance(); } @java.lang.Override public com.authzed.api.v1.Core.DirectSubjectSet build() { com.authzed.api.v1.Core.DirectSubjectSet result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.authzed.api.v1.Core.DirectSubjectSet buildPartial() { com.authzed.api.v1.Core.DirectSubjectSet result = new com.authzed.api.v1.Core.DirectSubjectSet(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.authzed.api.v1.Core.DirectSubjectSet result) { if (subjectsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { subjects_ = java.util.Collections.unmodifiableList(subjects_); bitField0_ = (bitField0_ & ~0x00000001); } result.subjects_ = subjects_; } else { result.subjects_ = subjectsBuilder_.build(); } } private void buildPartial0(com.authzed.api.v1.Core.DirectSubjectSet result) { int from_bitField0_ = bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.authzed.api.v1.Core.DirectSubjectSet) { return mergeFrom((com.authzed.api.v1.Core.DirectSubjectSet)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.authzed.api.v1.Core.DirectSubjectSet other) { if (other == com.authzed.api.v1.Core.DirectSubjectSet.getDefaultInstance()) return this; if (subjectsBuilder_ == null) { if (!other.subjects_.isEmpty()) { if (subjects_.isEmpty()) { subjects_ = other.subjects_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureSubjectsIsMutable(); subjects_.addAll(other.subjects_); } onChanged(); } } else { if (!other.subjects_.isEmpty()) { if (subjectsBuilder_.isEmpty()) { subjectsBuilder_.dispose(); subjectsBuilder_ = null; subjects_ = other.subjects_; bitField0_ = (bitField0_ & ~0x00000001); subjectsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubjectsFieldBuilder() : null; } else { subjectsBuilder_.addAllMessages(other.subjects_); } } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.authzed.api.v1.Core.SubjectReference m = input.readMessage( com.authzed.api.v1.Core.SubjectReference.parser(), extensionRegistry); if (subjectsBuilder_ == null) { ensureSubjectsIsMutable(); subjects_.add(m); } else { subjectsBuilder_.addMessage(m); } break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List subjects_ = java.util.Collections.emptyList(); private void ensureSubjectsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { subjects_ = new java.util.ArrayList(subjects_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.authzed.api.v1.Core.SubjectReference, com.authzed.api.v1.Core.SubjectReference.Builder, com.authzed.api.v1.Core.SubjectReferenceOrBuilder> subjectsBuilder_; /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public java.util.List getSubjectsList() { if (subjectsBuilder_ == null) { return java.util.Collections.unmodifiableList(subjects_); } else { return subjectsBuilder_.getMessageList(); } } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public int getSubjectsCount() { if (subjectsBuilder_ == null) { return subjects_.size(); } else { return subjectsBuilder_.getCount(); } } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public com.authzed.api.v1.Core.SubjectReference getSubjects(int index) { if (subjectsBuilder_ == null) { return subjects_.get(index); } else { return subjectsBuilder_.getMessage(index); } } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public Builder setSubjects( int index, com.authzed.api.v1.Core.SubjectReference value) { if (subjectsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSubjectsIsMutable(); subjects_.set(index, value); onChanged(); } else { subjectsBuilder_.setMessage(index, value); } return this; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public Builder setSubjects( int index, com.authzed.api.v1.Core.SubjectReference.Builder builderForValue) { if (subjectsBuilder_ == null) { ensureSubjectsIsMutable(); subjects_.set(index, builderForValue.build()); onChanged(); } else { subjectsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public Builder addSubjects(com.authzed.api.v1.Core.SubjectReference value) { if (subjectsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSubjectsIsMutable(); subjects_.add(value); onChanged(); } else { subjectsBuilder_.addMessage(value); } return this; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public Builder addSubjects( int index, com.authzed.api.v1.Core.SubjectReference value) { if (subjectsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSubjectsIsMutable(); subjects_.add(index, value); onChanged(); } else { subjectsBuilder_.addMessage(index, value); } return this; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public Builder addSubjects( com.authzed.api.v1.Core.SubjectReference.Builder builderForValue) { if (subjectsBuilder_ == null) { ensureSubjectsIsMutable(); subjects_.add(builderForValue.build()); onChanged(); } else { subjectsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public Builder addSubjects( int index, com.authzed.api.v1.Core.SubjectReference.Builder builderForValue) { if (subjectsBuilder_ == null) { ensureSubjectsIsMutable(); subjects_.add(index, builderForValue.build()); onChanged(); } else { subjectsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public Builder addAllSubjects( java.lang.Iterable values) { if (subjectsBuilder_ == null) { ensureSubjectsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, subjects_); onChanged(); } else { subjectsBuilder_.addAllMessages(values); } return this; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public Builder clearSubjects() { if (subjectsBuilder_ == null) { subjects_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { subjectsBuilder_.clear(); } return this; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public Builder removeSubjects(int index) { if (subjectsBuilder_ == null) { ensureSubjectsIsMutable(); subjects_.remove(index); onChanged(); } else { subjectsBuilder_.remove(index); } return this; } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public com.authzed.api.v1.Core.SubjectReference.Builder getSubjectsBuilder( int index) { return getSubjectsFieldBuilder().getBuilder(index); } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public com.authzed.api.v1.Core.SubjectReferenceOrBuilder getSubjectsOrBuilder( int index) { if (subjectsBuilder_ == null) { return subjects_.get(index); } else { return subjectsBuilder_.getMessageOrBuilder(index); } } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public java.util.List getSubjectsOrBuilderList() { if (subjectsBuilder_ != null) { return subjectsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(subjects_); } } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public com.authzed.api.v1.Core.SubjectReference.Builder addSubjectsBuilder() { return getSubjectsFieldBuilder().addBuilder( com.authzed.api.v1.Core.SubjectReference.getDefaultInstance()); } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public com.authzed.api.v1.Core.SubjectReference.Builder addSubjectsBuilder( int index) { return getSubjectsFieldBuilder().addBuilder( index, com.authzed.api.v1.Core.SubjectReference.getDefaultInstance()); } /** * repeated .authzed.api.v1.SubjectReference subjects = 1; */ public java.util.List getSubjectsBuilderList() { return getSubjectsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.authzed.api.v1.Core.SubjectReference, com.authzed.api.v1.Core.SubjectReference.Builder, com.authzed.api.v1.Core.SubjectReferenceOrBuilder> getSubjectsFieldBuilder() { if (subjectsBuilder_ == null) { subjectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.authzed.api.v1.Core.SubjectReference, com.authzed.api.v1.Core.SubjectReference.Builder, com.authzed.api.v1.Core.SubjectReferenceOrBuilder>( subjects_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); subjects_ = null; } return subjectsBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authzed.api.v1.DirectSubjectSet) } // @@protoc_insertion_point(class_scope:authzed.api.v1.DirectSubjectSet) private static final com.authzed.api.v1.Core.DirectSubjectSet DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.authzed.api.v1.Core.DirectSubjectSet(); } public static com.authzed.api.v1.Core.DirectSubjectSet getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public DirectSubjectSet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.authzed.api.v1.Core.DirectSubjectSet getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface PartialCaveatInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:authzed.api.v1.PartialCaveatInfo) com.google.protobuf.MessageOrBuilder { /** *
     * missing_required_context is a list of one or more fields that were missing and prevented caveats
     * from being fully evaluated
     * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @return A list containing the missingRequiredContext. */ java.util.List getMissingRequiredContextList(); /** *
     * missing_required_context is a list of one or more fields that were missing and prevented caveats
     * from being fully evaluated
     * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @return The count of missingRequiredContext. */ int getMissingRequiredContextCount(); /** *
     * missing_required_context is a list of one or more fields that were missing and prevented caveats
     * from being fully evaluated
     * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @param index The index of the element to return. * @return The missingRequiredContext at the given index. */ java.lang.String getMissingRequiredContext(int index); /** *
     * missing_required_context is a list of one or more fields that were missing and prevented caveats
     * from being fully evaluated
     * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @param index The index of the value to return. * @return The bytes of the missingRequiredContext at the given index. */ com.google.protobuf.ByteString getMissingRequiredContextBytes(int index); } /** *
   * PartialCaveatInfo carries information necessary for the client to take action
   * in the event a response contains a partially evaluated caveat
   * 
* * Protobuf type {@code authzed.api.v1.PartialCaveatInfo} */ public static final class PartialCaveatInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authzed.api.v1.PartialCaveatInfo) PartialCaveatInfoOrBuilder { private static final long serialVersionUID = 0L; // Use PartialCaveatInfo.newBuilder() to construct. private PartialCaveatInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PartialCaveatInfo() { missingRequiredContext_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new PartialCaveatInfo(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_PartialCaveatInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_PartialCaveatInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.PartialCaveatInfo.class, com.authzed.api.v1.Core.PartialCaveatInfo.Builder.class); } public static final int MISSING_REQUIRED_CONTEXT_FIELD_NUMBER = 1; @SuppressWarnings("serial") private com.google.protobuf.LazyStringList missingRequiredContext_; /** *
     * missing_required_context is a list of one or more fields that were missing and prevented caveats
     * from being fully evaluated
     * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @return A list containing the missingRequiredContext. */ public com.google.protobuf.ProtocolStringList getMissingRequiredContextList() { return missingRequiredContext_; } /** *
     * missing_required_context is a list of one or more fields that were missing and prevented caveats
     * from being fully evaluated
     * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @return The count of missingRequiredContext. */ public int getMissingRequiredContextCount() { return missingRequiredContext_.size(); } /** *
     * missing_required_context is a list of one or more fields that were missing and prevented caveats
     * from being fully evaluated
     * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @param index The index of the element to return. * @return The missingRequiredContext at the given index. */ public java.lang.String getMissingRequiredContext(int index) { return missingRequiredContext_.get(index); } /** *
     * missing_required_context is a list of one or more fields that were missing and prevented caveats
     * from being fully evaluated
     * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @param index The index of the value to return. * @return The bytes of the missingRequiredContext at the given index. */ public com.google.protobuf.ByteString getMissingRequiredContextBytes(int index) { return missingRequiredContext_.getByteString(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < missingRequiredContext_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, missingRequiredContext_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < missingRequiredContext_.size(); i++) { dataSize += computeStringSizeNoTag(missingRequiredContext_.getRaw(i)); } size += dataSize; size += 1 * getMissingRequiredContextList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.authzed.api.v1.Core.PartialCaveatInfo)) { return super.equals(obj); } com.authzed.api.v1.Core.PartialCaveatInfo other = (com.authzed.api.v1.Core.PartialCaveatInfo) obj; if (!getMissingRequiredContextList() .equals(other.getMissingRequiredContextList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getMissingRequiredContextCount() > 0) { hash = (37 * hash) + MISSING_REQUIRED_CONTEXT_FIELD_NUMBER; hash = (53 * hash) + getMissingRequiredContextList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.authzed.api.v1.Core.PartialCaveatInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.authzed.api.v1.Core.PartialCaveatInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.authzed.api.v1.Core.PartialCaveatInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * PartialCaveatInfo carries information necessary for the client to take action
     * in the event a response contains a partially evaluated caveat
     * 
* * Protobuf type {@code authzed.api.v1.PartialCaveatInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authzed.api.v1.PartialCaveatInfo) com.authzed.api.v1.Core.PartialCaveatInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_PartialCaveatInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_PartialCaveatInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.authzed.api.v1.Core.PartialCaveatInfo.class, com.authzed.api.v1.Core.PartialCaveatInfo.Builder.class); } // Construct using com.authzed.api.v1.Core.PartialCaveatInfo.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; missingRequiredContext_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.authzed.api.v1.Core.internal_static_authzed_api_v1_PartialCaveatInfo_descriptor; } @java.lang.Override public com.authzed.api.v1.Core.PartialCaveatInfo getDefaultInstanceForType() { return com.authzed.api.v1.Core.PartialCaveatInfo.getDefaultInstance(); } @java.lang.Override public com.authzed.api.v1.Core.PartialCaveatInfo build() { com.authzed.api.v1.Core.PartialCaveatInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.authzed.api.v1.Core.PartialCaveatInfo buildPartial() { com.authzed.api.v1.Core.PartialCaveatInfo result = new com.authzed.api.v1.Core.PartialCaveatInfo(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.authzed.api.v1.Core.PartialCaveatInfo result) { if (((bitField0_ & 0x00000001) != 0)) { missingRequiredContext_ = missingRequiredContext_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.missingRequiredContext_ = missingRequiredContext_; } private void buildPartial0(com.authzed.api.v1.Core.PartialCaveatInfo result) { int from_bitField0_ = bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.authzed.api.v1.Core.PartialCaveatInfo) { return mergeFrom((com.authzed.api.v1.Core.PartialCaveatInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.authzed.api.v1.Core.PartialCaveatInfo other) { if (other == com.authzed.api.v1.Core.PartialCaveatInfo.getDefaultInstance()) return this; if (!other.missingRequiredContext_.isEmpty()) { if (missingRequiredContext_.isEmpty()) { missingRequiredContext_ = other.missingRequiredContext_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureMissingRequiredContextIsMutable(); missingRequiredContext_.addAll(other.missingRequiredContext_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); ensureMissingRequiredContextIsMutable(); missingRequiredContext_.add(s); break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.protobuf.LazyStringList missingRequiredContext_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureMissingRequiredContextIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { missingRequiredContext_ = new com.google.protobuf.LazyStringArrayList(missingRequiredContext_); bitField0_ |= 0x00000001; } } /** *
       * missing_required_context is a list of one or more fields that were missing and prevented caveats
       * from being fully evaluated
       * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @return A list containing the missingRequiredContext. */ public com.google.protobuf.ProtocolStringList getMissingRequiredContextList() { return missingRequiredContext_.getUnmodifiableView(); } /** *
       * missing_required_context is a list of one or more fields that were missing and prevented caveats
       * from being fully evaluated
       * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @return The count of missingRequiredContext. */ public int getMissingRequiredContextCount() { return missingRequiredContext_.size(); } /** *
       * missing_required_context is a list of one or more fields that were missing and prevented caveats
       * from being fully evaluated
       * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @param index The index of the element to return. * @return The missingRequiredContext at the given index. */ public java.lang.String getMissingRequiredContext(int index) { return missingRequiredContext_.get(index); } /** *
       * missing_required_context is a list of one or more fields that were missing and prevented caveats
       * from being fully evaluated
       * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @param index The index of the value to return. * @return The bytes of the missingRequiredContext at the given index. */ public com.google.protobuf.ByteString getMissingRequiredContextBytes(int index) { return missingRequiredContext_.getByteString(index); } /** *
       * missing_required_context is a list of one or more fields that were missing and prevented caveats
       * from being fully evaluated
       * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @param index The index to set the value at. * @param value The missingRequiredContext to set. * @return This builder for chaining. */ public Builder setMissingRequiredContext( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureMissingRequiredContextIsMutable(); missingRequiredContext_.set(index, value); onChanged(); return this; } /** *
       * missing_required_context is a list of one or more fields that were missing and prevented caveats
       * from being fully evaluated
       * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @param value The missingRequiredContext to add. * @return This builder for chaining. */ public Builder addMissingRequiredContext( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureMissingRequiredContextIsMutable(); missingRequiredContext_.add(value); onChanged(); return this; } /** *
       * missing_required_context is a list of one or more fields that were missing and prevented caveats
       * from being fully evaluated
       * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @param values The missingRequiredContext to add. * @return This builder for chaining. */ public Builder addAllMissingRequiredContext( java.lang.Iterable values) { ensureMissingRequiredContextIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, missingRequiredContext_); onChanged(); return this; } /** *
       * missing_required_context is a list of one or more fields that were missing and prevented caveats
       * from being fully evaluated
       * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearMissingRequiredContext() { missingRequiredContext_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
       * missing_required_context is a list of one or more fields that were missing and prevented caveats
       * from being fully evaluated
       * 
* * repeated string missing_required_context = 1 [(.validate.rules) = { ... } * @param value The bytes of the missingRequiredContext to add. * @return This builder for chaining. */ public Builder addMissingRequiredContextBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureMissingRequiredContextIsMutable(); missingRequiredContext_.add(value); onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authzed.api.v1.PartialCaveatInfo) } // @@protoc_insertion_point(class_scope:authzed.api.v1.PartialCaveatInfo) private static final com.authzed.api.v1.Core.PartialCaveatInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.authzed.api.v1.Core.PartialCaveatInfo(); } public static com.authzed.api.v1.Core.PartialCaveatInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public PartialCaveatInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.authzed.api.v1.Core.PartialCaveatInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_authzed_api_v1_Relationship_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authzed_api_v1_Relationship_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authzed_api_v1_ContextualizedCaveat_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authzed_api_v1_ContextualizedCaveat_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authzed_api_v1_SubjectReference_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authzed_api_v1_SubjectReference_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authzed_api_v1_ObjectReference_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authzed_api_v1_ObjectReference_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authzed_api_v1_ZedToken_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authzed_api_v1_ZedToken_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authzed_api_v1_RelationshipUpdate_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authzed_api_v1_RelationshipUpdate_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authzed_api_v1_PermissionRelationshipTree_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authzed_api_v1_PermissionRelationshipTree_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authzed_api_v1_AlgebraicSubjectSet_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authzed_api_v1_AlgebraicSubjectSet_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authzed_api_v1_DirectSubjectSet_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authzed_api_v1_DirectSubjectSet_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authzed_api_v1_PartialCaveatInfo_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authzed_api_v1_PartialCaveatInfo_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\031authzed/api/v1/core.proto\022\016authzed.api" + ".v1\032\034google/protobuf/struct.proto\032\027valid" + "ate/validate.proto\"\214\002\n\014Relationship\022;\n\010r" + "esource\030\001 \001(\0132\037.authzed.api.v1.ObjectRef" + "erenceB\010\372B\005\212\001\002\020\001\0229\n\010relation\030\002 \001(\tB\'\372B$r" + "\"(@2\036^[a-z][a-z0-9_]{1,62}[a-z0-9]$\022;\n\007s" + "ubject\030\003 \001(\0132 .authzed.api.v1.SubjectRef" + "erenceB\010\372B\005\212\001\002\020\001\022G\n\017optional_caveat\030\004 \001(" + "\0132$.authzed.api.v1.ContextualizedCaveatB" + "\010\372B\005\212\001\002\020\000\"\221\001\n\024ContextualizedCaveat\022E\n\013ca" + "veat_name\030\001 \001(\tB0\372B-r+(\200\0012&^([a-zA-Z0-9_" + "][a-zA-Z0-9/_|-]{0,127})$\0222\n\007context\030\002 \001" + "(\0132\027.google.protobuf.StructB\010\372B\005\212\001\002\020\000\"\224\001" + "\n\020SubjectReference\0229\n\006object\030\001 \001(\0132\037.aut" + "hzed.api.v1.ObjectReferenceB\010\372B\005\212\001\002\020\001\022E\n" + "\021optional_relation\030\002 \001(\tB*\372B\'r%(@2!^([a-" + "z][a-z0-9_]{1,62}[a-z0-9])?$\"\272\001\n\017ObjectR" + "eference\022]\n\013object_type\030\001 \001(\tBH\372BErC(\200\0012" + ">^([a-z][a-z0-9_]{1,61}[a-z0-9]/)?[a-z][" + "a-z0-9_]{1,62}[a-z0-9]$\022H\n\tobject_id\030\002 \001" + "(\tB5\372B2r0(\200\0012+^(([a-zA-Z0-9_][a-zA-Z0-9/" + "_|-]{0,127})|\\*)$\"\"\n\010ZedToken\022\026\n\005token\030\001" + " \001(\tB\007\372B\004r\002 \001\"\210\002\n\022RelationshipUpdate\022K\n\t" + "operation\030\001 \001(\0162,.authzed.api.v1.Relatio" + "nshipUpdate.OperationB\n\372B\007\202\001\004\020\001 \000\022<\n\014rel" + "ationship\030\002 \001(\0132\034.authzed.api.v1.Relatio" + "nshipB\010\372B\005\212\001\002\020\001\"g\n\tOperation\022\031\n\025OPERATIO" + "N_UNSPECIFIED\020\000\022\024\n\020OPERATION_CREATE\020\001\022\023\n" + "\017OPERATION_TOUCH\020\002\022\024\n\020OPERATION_DELETE\020\003" + "\"\362\001\n\032PermissionRelationshipTree\022;\n\014inter" + "mediate\030\001 \001(\0132#.authzed.api.v1.Algebraic" + "SubjectSetH\000\0220\n\004leaf\030\002 \001(\0132 .authzed.api" + ".v1.DirectSubjectSetH\000\0228\n\017expanded_objec" + "t\030\003 \001(\0132\037.authzed.api.v1.ObjectReference" + "\022\031\n\021expanded_relation\030\004 \001(\tB\020\n\ttree_type" + "\022\003\370B\001\"\242\002\n\023AlgebraicSubjectSet\022L\n\toperati" + "on\030\001 \001(\0162-.authzed.api.v1.AlgebraicSubje" + "ctSet.OperationB\n\372B\007\202\001\004\020\001 \000\022K\n\010children\030" + "\002 \003(\0132*.authzed.api.v1.PermissionRelatio" + "nshipTreeB\r\372B\n\222\001\007\"\005\212\001\002\020\001\"p\n\tOperation\022\031\n" + "\025OPERATION_UNSPECIFIED\020\000\022\023\n\017OPERATION_UN" + "ION\020\001\022\032\n\026OPERATION_INTERSECTION\020\002\022\027\n\023OPE" + "RATION_EXCLUSION\020\003\"F\n\020DirectSubjectSet\0222" + "\n\010subjects\030\001 \003(\0132 .authzed.api.v1.Subjec" + "tReference\"?\n\021PartialCaveatInfo\022*\n\030missi" + "ng_required_context\030\001 \003(\tB\010\372B\005\222\001\002\010\001BH\n\022c" + "om.authzed.api.v1Z2github.com/authzed/au" + "thzed-go/proto/authzed/api/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.StructProto.getDescriptor(), io.envoyproxy.pgv.validate.Validate.getDescriptor(), }); internal_static_authzed_api_v1_Relationship_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_authzed_api_v1_Relationship_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authzed_api_v1_Relationship_descriptor, new java.lang.String[] { "Resource", "Relation", "Subject", "OptionalCaveat", }); internal_static_authzed_api_v1_ContextualizedCaveat_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_authzed_api_v1_ContextualizedCaveat_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authzed_api_v1_ContextualizedCaveat_descriptor, new java.lang.String[] { "CaveatName", "Context", }); internal_static_authzed_api_v1_SubjectReference_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_authzed_api_v1_SubjectReference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authzed_api_v1_SubjectReference_descriptor, new java.lang.String[] { "Object", "OptionalRelation", }); internal_static_authzed_api_v1_ObjectReference_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_authzed_api_v1_ObjectReference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authzed_api_v1_ObjectReference_descriptor, new java.lang.String[] { "ObjectType", "ObjectId", }); internal_static_authzed_api_v1_ZedToken_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_authzed_api_v1_ZedToken_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authzed_api_v1_ZedToken_descriptor, new java.lang.String[] { "Token", }); internal_static_authzed_api_v1_RelationshipUpdate_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_authzed_api_v1_RelationshipUpdate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authzed_api_v1_RelationshipUpdate_descriptor, new java.lang.String[] { "Operation", "Relationship", }); internal_static_authzed_api_v1_PermissionRelationshipTree_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_authzed_api_v1_PermissionRelationshipTree_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authzed_api_v1_PermissionRelationshipTree_descriptor, new java.lang.String[] { "Intermediate", "Leaf", "ExpandedObject", "ExpandedRelation", "TreeType", }); internal_static_authzed_api_v1_AlgebraicSubjectSet_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_authzed_api_v1_AlgebraicSubjectSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authzed_api_v1_AlgebraicSubjectSet_descriptor, new java.lang.String[] { "Operation", "Children", }); internal_static_authzed_api_v1_DirectSubjectSet_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_authzed_api_v1_DirectSubjectSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authzed_api_v1_DirectSubjectSet_descriptor, new java.lang.String[] { "Subjects", }); internal_static_authzed_api_v1_PartialCaveatInfo_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_authzed_api_v1_PartialCaveatInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authzed_api_v1_PartialCaveatInfo_descriptor, new java.lang.String[] { "MissingRequiredContext", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(io.envoyproxy.pgv.validate.Validate.required); registry.add(io.envoyproxy.pgv.validate.Validate.rules); com.google.protobuf.Descriptors.FileDescriptor .internalUpdateFileDescriptor(descriptor, registry); com.google.protobuf.StructProto.getDescriptor(); io.envoyproxy.pgv.validate.Validate.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy