diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100755 index 00000000..9a01d579 --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,11 @@ +#!/usr/bin/env -S buf generate +--- +version: "v2" +inputs: + - module: "buf.build/authzed/api:v1.35.0" +plugins: + - protoc_builtin: "java" + out: "./generated" + # TODO: lmao + - local: "/home/tstirrat/.gradle/caches/modules-2/files-2.1/io.grpc/protoc-gen-grpc-java/1.66.0/24c9e1d727942b34efc5f36ff268665136d0cb4c/protoc-gen-grpc-java-1.66.0-linux-x86_64.exe" + out: "./generated" diff --git a/generated/com/authzed/api/materialize/v0/BreakingSchemaChange.java b/generated/com/authzed/api/materialize/v0/BreakingSchemaChange.java new file mode 100644 index 00000000..2b5f3607 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/BreakingSchemaChange.java @@ -0,0 +1,649 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +/** + *
+ * BreakingSchemaChange is used to signal a breaking schema change has happened, and that the consumer should
+ * expect delays in the ingestion of new changes, because the permission set snapshot needs to be rebuilt from scratch.
+ * Once the snapshot is ready, the consumer will receive a LookupPermissionSetsRequired event.
+ * 
+ * + * Protobuf type {@code authzed.api.materialize.v0.BreakingSchemaChange} + */ +public final class BreakingSchemaChange extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.BreakingSchemaChange) + BreakingSchemaChangeOrBuilder { +private static final long serialVersionUID = 0L; + // Use BreakingSchemaChange.newBuilder() to construct. + private BreakingSchemaChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BreakingSchemaChange() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BreakingSchemaChange(); + } + + @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.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_BreakingSchemaChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_BreakingSchemaChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.BreakingSchemaChange.class, com.authzed.api.materialize.v0.BreakingSchemaChange.Builder.class); + } + + public static final int CHANGE_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken changeAt_; + /** + *
+   * change_at is the revision at which a breaking schema event has happened.
+   * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + * @return Whether the changeAt field is set. + */ + @java.lang.Override + public boolean hasChangeAt() { + return changeAt_ != null; + } + /** + *
+   * change_at is the revision at which a breaking schema event has happened.
+   * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + * @return The changeAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getChangeAt() { + return changeAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : changeAt_; + } + /** + *
+   * change_at is the revision at which a breaking schema event has happened.
+   * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getChangeAtOrBuilder() { + return changeAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : changeAt_; + } + + 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 (changeAt_ != null) { + output.writeMessage(1, getChangeAt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (changeAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getChangeAt()); + } + 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.materialize.v0.BreakingSchemaChange)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.BreakingSchemaChange other = (com.authzed.api.materialize.v0.BreakingSchemaChange) obj; + + if (hasChangeAt() != other.hasChangeAt()) return false; + if (hasChangeAt()) { + if (!getChangeAt() + .equals(other.getChangeAt())) 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 (hasChangeAt()) { + hash = (37 * hash) + CHANGE_AT_FIELD_NUMBER; + hash = (53 * hash) + getChangeAt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.BreakingSchemaChange parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.BreakingSchemaChange 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.materialize.v0.BreakingSchemaChange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.BreakingSchemaChange 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.materialize.v0.BreakingSchemaChange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.BreakingSchemaChange parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.BreakingSchemaChange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.BreakingSchemaChange 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.materialize.v0.BreakingSchemaChange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.BreakingSchemaChange 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.materialize.v0.BreakingSchemaChange parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.BreakingSchemaChange 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.materialize.v0.BreakingSchemaChange 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; + } + /** + *
+   * BreakingSchemaChange is used to signal a breaking schema change has happened, and that the consumer should
+   * expect delays in the ingestion of new changes, because the permission set snapshot needs to be rebuilt from scratch.
+   * Once the snapshot is ready, the consumer will receive a LookupPermissionSetsRequired event.
+   * 
+ * + * Protobuf type {@code authzed.api.materialize.v0.BreakingSchemaChange} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.BreakingSchemaChange) + com.authzed.api.materialize.v0.BreakingSchemaChangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_BreakingSchemaChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_BreakingSchemaChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.BreakingSchemaChange.class, com.authzed.api.materialize.v0.BreakingSchemaChange.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.BreakingSchemaChange.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + changeAt_ = null; + if (changeAtBuilder_ != null) { + changeAtBuilder_.dispose(); + changeAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_BreakingSchemaChange_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.BreakingSchemaChange getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.BreakingSchemaChange.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.BreakingSchemaChange build() { + com.authzed.api.materialize.v0.BreakingSchemaChange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.BreakingSchemaChange buildPartial() { + com.authzed.api.materialize.v0.BreakingSchemaChange result = new com.authzed.api.materialize.v0.BreakingSchemaChange(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.BreakingSchemaChange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.changeAt_ = changeAtBuilder_ == null + ? changeAt_ + : changeAtBuilder_.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.materialize.v0.BreakingSchemaChange) { + return mergeFrom((com.authzed.api.materialize.v0.BreakingSchemaChange)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.BreakingSchemaChange other) { + if (other == com.authzed.api.materialize.v0.BreakingSchemaChange.getDefaultInstance()) return this; + if (other.hasChangeAt()) { + mergeChangeAt(other.getChangeAt()); + } + 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( + getChangeAtFieldBuilder().getBuilder(), + extensionRegistry); + 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 com.authzed.api.v1.ZedToken changeAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> changeAtBuilder_; + /** + *
+     * change_at is the revision at which a breaking schema event has happened.
+     * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + * @return Whether the changeAt field is set. + */ + public boolean hasChangeAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * change_at is the revision at which a breaking schema event has happened.
+     * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + * @return The changeAt. + */ + public com.authzed.api.v1.ZedToken getChangeAt() { + if (changeAtBuilder_ == null) { + return changeAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : changeAt_; + } else { + return changeAtBuilder_.getMessage(); + } + } + /** + *
+     * change_at is the revision at which a breaking schema event has happened.
+     * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + */ + public Builder setChangeAt(com.authzed.api.v1.ZedToken value) { + if (changeAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + changeAt_ = value; + } else { + changeAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * change_at is the revision at which a breaking schema event has happened.
+     * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + */ + public Builder setChangeAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (changeAtBuilder_ == null) { + changeAt_ = builderForValue.build(); + } else { + changeAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * change_at is the revision at which a breaking schema event has happened.
+     * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + */ + public Builder mergeChangeAt(com.authzed.api.v1.ZedToken value) { + if (changeAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + changeAt_ != null && + changeAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getChangeAtBuilder().mergeFrom(value); + } else { + changeAt_ = value; + } + } else { + changeAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * change_at is the revision at which a breaking schema event has happened.
+     * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + */ + public Builder clearChangeAt() { + bitField0_ = (bitField0_ & ~0x00000001); + changeAt_ = null; + if (changeAtBuilder_ != null) { + changeAtBuilder_.dispose(); + changeAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * change_at is the revision at which a breaking schema event has happened.
+     * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getChangeAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getChangeAtFieldBuilder().getBuilder(); + } + /** + *
+     * change_at is the revision at which a breaking schema event has happened.
+     * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getChangeAtOrBuilder() { + if (changeAtBuilder_ != null) { + return changeAtBuilder_.getMessageOrBuilder(); + } else { + return changeAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : changeAt_; + } + } + /** + *
+     * change_at is the revision at which a breaking schema event has happened.
+     * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getChangeAtFieldBuilder() { + if (changeAtBuilder_ == null) { + changeAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getChangeAt(), + getParentForChildren(), + isClean()); + changeAt_ = null; + } + return changeAtBuilder_; + } + @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.materialize.v0.BreakingSchemaChange) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.BreakingSchemaChange) + private static final com.authzed.api.materialize.v0.BreakingSchemaChange DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.BreakingSchemaChange(); + } + + public static com.authzed.api.materialize.v0.BreakingSchemaChange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BreakingSchemaChange 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.materialize.v0.BreakingSchemaChange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/BreakingSchemaChangeOrBuilder.java b/generated/com/authzed/api/materialize/v0/BreakingSchemaChangeOrBuilder.java new file mode 100644 index 00000000..9bc65349 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/BreakingSchemaChangeOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public interface BreakingSchemaChangeOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.BreakingSchemaChange) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * change_at is the revision at which a breaking schema event has happened.
+   * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + * @return Whether the changeAt field is set. + */ + boolean hasChangeAt(); + /** + *
+   * change_at is the revision at which a breaking schema event has happened.
+   * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + * @return The changeAt. + */ + com.authzed.api.v1.ZedToken getChangeAt(); + /** + *
+   * change_at is the revision at which a breaking schema event has happened.
+   * 
+ * + * .authzed.api.v1.ZedToken change_at = 1 [json_name = "changeAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getChangeAtOrBuilder(); +} diff --git a/generated/com/authzed/api/materialize/v0/Cursor.java b/generated/com/authzed/api/materialize/v0/Cursor.java new file mode 100644 index 00000000..72ab9e32 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/Cursor.java @@ -0,0 +1,1048 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.Cursor} + */ +public final class Cursor extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.Cursor) + CursorOrBuilder { +private static final long serialVersionUID = 0L; + // Use Cursor.newBuilder() to construct. + private Cursor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Cursor() { + startingKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Cursor(); + } + + @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.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_Cursor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_Cursor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.Cursor.class, com.authzed.api.materialize.v0.Cursor.Builder.class); + } + + public static final int LIMIT_FIELD_NUMBER = 1; + private int limit_ = 0; + /** + *
+   * limit is the number of permission sets to stream over a single LookupPermissionSets call that was requested.
+   * 
+ * + * uint32 limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + + public static final int TOKEN_FIELD_NUMBER = 4; + private com.authzed.api.v1.ZedToken token_; + /** + *
+   * token is the snapshot revision at which the cursor was computed.
+   * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + * @return Whether the token field is set. + */ + @java.lang.Override + public boolean hasToken() { + return token_ != null; + } + /** + *
+   * token is the snapshot revision at which the cursor was computed.
+   * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getToken() { + return token_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : token_; + } + /** + *
+   * token is the snapshot revision at which the cursor was computed.
+   * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getTokenOrBuilder() { + return token_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : token_; + } + + public static final int STARTING_INDEX_FIELD_NUMBER = 5; + private int startingIndex_ = 0; + /** + *
+   * starting_index is an offset of the permission set represented by this cursor
+   * 
+ * + * uint32 starting_index = 5 [json_name = "startingIndex"]; + * @return The startingIndex. + */ + @java.lang.Override + public int getStartingIndex() { + return startingIndex_; + } + + public static final int COMPLETED_MEMBERS_FIELD_NUMBER = 6; + private boolean completedMembers_ = false; + /** + *
+   * completed_members is a boolean flag that indicates that the cursor has reached the end of the permission sets
+   * 
+ * + * bool completed_members = 6 [json_name = "completedMembers"]; + * @return The completedMembers. + */ + @java.lang.Override + public boolean getCompletedMembers() { + return completedMembers_; + } + + public static final int STARTING_KEY_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object startingKey_ = ""; + /** + *
+   * starting_key is a string cursor used by some backends to resume the stream from a specific point.
+   * 
+ * + * string starting_key = 7 [json_name = "startingKey"]; + * @return The startingKey. + */ + @java.lang.Override + public java.lang.String getStartingKey() { + java.lang.Object ref = startingKey_; + 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(); + startingKey_ = s; + return s; + } + } + /** + *
+   * starting_key is a string cursor used by some backends to resume the stream from a specific point.
+   * 
+ * + * string starting_key = 7 [json_name = "startingKey"]; + * @return The bytes for startingKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStartingKeyBytes() { + java.lang.Object ref = startingKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + startingKey_ = 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 (limit_ != 0) { + output.writeUInt32(1, limit_); + } + if (token_ != null) { + output.writeMessage(4, getToken()); + } + if (startingIndex_ != 0) { + output.writeUInt32(5, startingIndex_); + } + if (completedMembers_ != false) { + output.writeBool(6, completedMembers_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startingKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, startingKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (limit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, limit_); + } + if (token_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getToken()); + } + if (startingIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, startingIndex_); + } + if (completedMembers_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, completedMembers_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startingKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, startingKey_); + } + 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.materialize.v0.Cursor)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.Cursor other = (com.authzed.api.materialize.v0.Cursor) obj; + + if (getLimit() + != other.getLimit()) return false; + if (hasToken() != other.hasToken()) return false; + if (hasToken()) { + if (!getToken() + .equals(other.getToken())) return false; + } + if (getStartingIndex() + != other.getStartingIndex()) return false; + if (getCompletedMembers() + != other.getCompletedMembers()) return false; + if (!getStartingKey() + .equals(other.getStartingKey())) 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) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit(); + if (hasToken()) { + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + } + hash = (37 * hash) + STARTING_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getStartingIndex(); + hash = (37 * hash) + COMPLETED_MEMBERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCompletedMembers()); + hash = (37 * hash) + STARTING_KEY_FIELD_NUMBER; + hash = (53 * hash) + getStartingKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.Cursor parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.Cursor 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.materialize.v0.Cursor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.Cursor 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.materialize.v0.Cursor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.Cursor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.Cursor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.Cursor 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.materialize.v0.Cursor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.Cursor 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.materialize.v0.Cursor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.Cursor 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.materialize.v0.Cursor 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.Cursor} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.Cursor) + com.authzed.api.materialize.v0.CursorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_Cursor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_Cursor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.Cursor.class, com.authzed.api.materialize.v0.Cursor.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.Cursor.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + limit_ = 0; + token_ = null; + if (tokenBuilder_ != null) { + tokenBuilder_.dispose(); + tokenBuilder_ = null; + } + startingIndex_ = 0; + completedMembers_ = false; + startingKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_Cursor_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.Cursor getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.Cursor.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.Cursor build() { + com.authzed.api.materialize.v0.Cursor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.Cursor buildPartial() { + com.authzed.api.materialize.v0.Cursor result = new com.authzed.api.materialize.v0.Cursor(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.Cursor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.limit_ = limit_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.token_ = tokenBuilder_ == null + ? token_ + : tokenBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.startingIndex_ = startingIndex_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.completedMembers_ = completedMembers_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.startingKey_ = startingKey_; + } + } + + @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.materialize.v0.Cursor) { + return mergeFrom((com.authzed.api.materialize.v0.Cursor)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.Cursor other) { + if (other == com.authzed.api.materialize.v0.Cursor.getDefaultInstance()) return this; + if (other.getLimit() != 0) { + setLimit(other.getLimit()); + } + if (other.hasToken()) { + mergeToken(other.getToken()); + } + if (other.getStartingIndex() != 0) { + setStartingIndex(other.getStartingIndex()); + } + if (other.getCompletedMembers() != false) { + setCompletedMembers(other.getCompletedMembers()); + } + if (!other.getStartingKey().isEmpty()) { + startingKey_ = other.startingKey_; + bitField0_ |= 0x00000010; + 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 8: { + limit_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 34: { + input.readMessage( + getTokenFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 34 + case 40: { + startingIndex_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 40 + case 48: { + completedMembers_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 48 + case 58: { + startingKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 58 + 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 limit_ ; + /** + *
+     * limit is the number of permission sets to stream over a single LookupPermissionSets call that was requested.
+     * 
+ * + * uint32 limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + /** + *
+     * limit is the number of permission sets to stream over a single LookupPermissionSets call that was requested.
+     * 
+ * + * uint32 limit = 1 [json_name = "limit"]; + * @param value The limit to set. + * @return This builder for chaining. + */ + public Builder setLimit(int value) { + + limit_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * limit is the number of permission sets to stream over a single LookupPermissionSets call that was requested.
+     * 
+ * + * uint32 limit = 1 [json_name = "limit"]; + * @return This builder for chaining. + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000001); + limit_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.ZedToken token_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> tokenBuilder_; + /** + *
+     * token is the snapshot revision at which the cursor was computed.
+     * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + * @return Whether the token field is set. + */ + public boolean hasToken() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * token is the snapshot revision at which the cursor was computed.
+     * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + * @return The token. + */ + public com.authzed.api.v1.ZedToken getToken() { + if (tokenBuilder_ == null) { + return token_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : token_; + } else { + return tokenBuilder_.getMessage(); + } + } + /** + *
+     * token is the snapshot revision at which the cursor was computed.
+     * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + */ + public Builder setToken(com.authzed.api.v1.ZedToken value) { + if (tokenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + token_ = value; + } else { + tokenBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * token is the snapshot revision at which the cursor was computed.
+     * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + */ + public Builder setToken( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (tokenBuilder_ == null) { + token_ = builderForValue.build(); + } else { + tokenBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * token is the snapshot revision at which the cursor was computed.
+     * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + */ + public Builder mergeToken(com.authzed.api.v1.ZedToken value) { + if (tokenBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + token_ != null && + token_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getTokenBuilder().mergeFrom(value); + } else { + token_ = value; + } + } else { + tokenBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * token is the snapshot revision at which the cursor was computed.
+     * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + */ + public Builder clearToken() { + bitField0_ = (bitField0_ & ~0x00000002); + token_ = null; + if (tokenBuilder_ != null) { + tokenBuilder_.dispose(); + tokenBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * token is the snapshot revision at which the cursor was computed.
+     * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + */ + public com.authzed.api.v1.ZedToken.Builder getTokenBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTokenFieldBuilder().getBuilder(); + } + /** + *
+     * token is the snapshot revision at which the cursor was computed.
+     * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getTokenOrBuilder() { + if (tokenBuilder_ != null) { + return tokenBuilder_.getMessageOrBuilder(); + } else { + return token_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : token_; + } + } + /** + *
+     * token is the snapshot revision at which the cursor was computed.
+     * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getTokenFieldBuilder() { + if (tokenBuilder_ == null) { + tokenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getToken(), + getParentForChildren(), + isClean()); + token_ = null; + } + return tokenBuilder_; + } + + private int startingIndex_ ; + /** + *
+     * starting_index is an offset of the permission set represented by this cursor
+     * 
+ * + * uint32 starting_index = 5 [json_name = "startingIndex"]; + * @return The startingIndex. + */ + @java.lang.Override + public int getStartingIndex() { + return startingIndex_; + } + /** + *
+     * starting_index is an offset of the permission set represented by this cursor
+     * 
+ * + * uint32 starting_index = 5 [json_name = "startingIndex"]; + * @param value The startingIndex to set. + * @return This builder for chaining. + */ + public Builder setStartingIndex(int value) { + + startingIndex_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * starting_index is an offset of the permission set represented by this cursor
+     * 
+ * + * uint32 starting_index = 5 [json_name = "startingIndex"]; + * @return This builder for chaining. + */ + public Builder clearStartingIndex() { + bitField0_ = (bitField0_ & ~0x00000004); + startingIndex_ = 0; + onChanged(); + return this; + } + + private boolean completedMembers_ ; + /** + *
+     * completed_members is a boolean flag that indicates that the cursor has reached the end of the permission sets
+     * 
+ * + * bool completed_members = 6 [json_name = "completedMembers"]; + * @return The completedMembers. + */ + @java.lang.Override + public boolean getCompletedMembers() { + return completedMembers_; + } + /** + *
+     * completed_members is a boolean flag that indicates that the cursor has reached the end of the permission sets
+     * 
+ * + * bool completed_members = 6 [json_name = "completedMembers"]; + * @param value The completedMembers to set. + * @return This builder for chaining. + */ + public Builder setCompletedMembers(boolean value) { + + completedMembers_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * completed_members is a boolean flag that indicates that the cursor has reached the end of the permission sets
+     * 
+ * + * bool completed_members = 6 [json_name = "completedMembers"]; + * @return This builder for chaining. + */ + public Builder clearCompletedMembers() { + bitField0_ = (bitField0_ & ~0x00000008); + completedMembers_ = false; + onChanged(); + return this; + } + + private java.lang.Object startingKey_ = ""; + /** + *
+     * starting_key is a string cursor used by some backends to resume the stream from a specific point.
+     * 
+ * + * string starting_key = 7 [json_name = "startingKey"]; + * @return The startingKey. + */ + public java.lang.String getStartingKey() { + java.lang.Object ref = startingKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + startingKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * starting_key is a string cursor used by some backends to resume the stream from a specific point.
+     * 
+ * + * string starting_key = 7 [json_name = "startingKey"]; + * @return The bytes for startingKey. + */ + public com.google.protobuf.ByteString + getStartingKeyBytes() { + java.lang.Object ref = startingKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + startingKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * starting_key is a string cursor used by some backends to resume the stream from a specific point.
+     * 
+ * + * string starting_key = 7 [json_name = "startingKey"]; + * @param value The startingKey to set. + * @return This builder for chaining. + */ + public Builder setStartingKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + startingKey_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * starting_key is a string cursor used by some backends to resume the stream from a specific point.
+     * 
+ * + * string starting_key = 7 [json_name = "startingKey"]; + * @return This builder for chaining. + */ + public Builder clearStartingKey() { + startingKey_ = getDefaultInstance().getStartingKey(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * starting_key is a string cursor used by some backends to resume the stream from a specific point.
+     * 
+ * + * string starting_key = 7 [json_name = "startingKey"]; + * @param value The bytes for startingKey to set. + * @return This builder for chaining. + */ + public Builder setStartingKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + startingKey_ = value; + bitField0_ |= 0x00000010; + 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.materialize.v0.Cursor) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.Cursor) + private static final com.authzed.api.materialize.v0.Cursor DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.Cursor(); + } + + public static com.authzed.api.materialize.v0.Cursor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Cursor 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.materialize.v0.Cursor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/CursorOrBuilder.java b/generated/com/authzed/api/materialize/v0/CursorOrBuilder.java new file mode 100644 index 00000000..529135b5 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/CursorOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public interface CursorOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.Cursor) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * limit is the number of permission sets to stream over a single LookupPermissionSets call that was requested.
+   * 
+ * + * uint32 limit = 1 [json_name = "limit"]; + * @return The limit. + */ + int getLimit(); + + /** + *
+   * token is the snapshot revision at which the cursor was computed.
+   * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + * @return Whether the token field is set. + */ + boolean hasToken(); + /** + *
+   * token is the snapshot revision at which the cursor was computed.
+   * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + * @return The token. + */ + com.authzed.api.v1.ZedToken getToken(); + /** + *
+   * token is the snapshot revision at which the cursor was computed.
+   * 
+ * + * .authzed.api.v1.ZedToken token = 4 [json_name = "token"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getTokenOrBuilder(); + + /** + *
+   * starting_index is an offset of the permission set represented by this cursor
+   * 
+ * + * uint32 starting_index = 5 [json_name = "startingIndex"]; + * @return The startingIndex. + */ + int getStartingIndex(); + + /** + *
+   * completed_members is a boolean flag that indicates that the cursor has reached the end of the permission sets
+   * 
+ * + * bool completed_members = 6 [json_name = "completedMembers"]; + * @return The completedMembers. + */ + boolean getCompletedMembers(); + + /** + *
+   * starting_key is a string cursor used by some backends to resume the stream from a specific point.
+   * 
+ * + * string starting_key = 7 [json_name = "startingKey"]; + * @return The startingKey. + */ + java.lang.String getStartingKey(); + /** + *
+   * starting_key is a string cursor used by some backends to resume the stream from a specific point.
+   * 
+ * + * string starting_key = 7 [json_name = "startingKey"]; + * @return The bytes for startingKey. + */ + com.google.protobuf.ByteString + getStartingKeyBytes(); +} diff --git a/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequest.java b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequest.java new file mode 100644 index 00000000..67f33f46 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequest.java @@ -0,0 +1,980 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.LookupPermissionSetsRequest} + */ +public final class LookupPermissionSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.LookupPermissionSetsRequest) + LookupPermissionSetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use LookupPermissionSetsRequest.newBuilder() to construct. + private LookupPermissionSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LookupPermissionSetsRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LookupPermissionSetsRequest(); + } + + @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.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.LookupPermissionSetsRequest.class, com.authzed.api.materialize.v0.LookupPermissionSetsRequest.Builder.class); + } + + public static final int LIMIT_FIELD_NUMBER = 1; + private int limit_ = 0; + /** + *
+   * limit is the number of permission sets to stream over a single LookupPermissionSets. Once the limit is reached,
+   * the server will close the stream. If more permission sets are available, the consume should open a new stream
+   * providing optional_starting_after_cursor, using the cursor from the last response.
+   * 
+ * + * uint32 limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + + public static final int OPTIONAL_AT_REVISION_FIELD_NUMBER = 2; + private com.authzed.api.v1.ZedToken optionalAtRevision_; + /** + *
+   * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+   * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+   * takes precedence in defining the revision when present.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + * @return Whether the optionalAtRevision field is set. + */ + @java.lang.Override + public boolean hasOptionalAtRevision() { + return optionalAtRevision_ != null; + } + /** + *
+   * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+   * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+   * takes precedence in defining the revision when present.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + * @return The optionalAtRevision. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getOptionalAtRevision() { + return optionalAtRevision_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalAtRevision_; + } + /** + *
+   * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+   * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+   * takes precedence in defining the revision when present.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getOptionalAtRevisionOrBuilder() { + return optionalAtRevision_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalAtRevision_; + } + + public static final int OPTIONAL_STARTING_AFTER_CURSOR_FIELD_NUMBER = 4; + private com.authzed.api.materialize.v0.Cursor optionalStartingAfterCursor_; + /** + *
+   * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + * @return Whether the optionalStartingAfterCursor field is set. + */ + @java.lang.Override + public boolean hasOptionalStartingAfterCursor() { + return optionalStartingAfterCursor_ != null; + } + /** + *
+   * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + * @return The optionalStartingAfterCursor. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.Cursor getOptionalStartingAfterCursor() { + return optionalStartingAfterCursor_ == null ? com.authzed.api.materialize.v0.Cursor.getDefaultInstance() : optionalStartingAfterCursor_; + } + /** + *
+   * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.CursorOrBuilder getOptionalStartingAfterCursorOrBuilder() { + return optionalStartingAfterCursor_ == null ? com.authzed.api.materialize.v0.Cursor.getDefaultInstance() : optionalStartingAfterCursor_; + } + + 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 (limit_ != 0) { + output.writeUInt32(1, limit_); + } + if (optionalAtRevision_ != null) { + output.writeMessage(2, getOptionalAtRevision()); + } + if (optionalStartingAfterCursor_ != null) { + output.writeMessage(4, getOptionalStartingAfterCursor()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (limit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, limit_); + } + if (optionalAtRevision_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOptionalAtRevision()); + } + if (optionalStartingAfterCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOptionalStartingAfterCursor()); + } + 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.materialize.v0.LookupPermissionSetsRequest)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.LookupPermissionSetsRequest other = (com.authzed.api.materialize.v0.LookupPermissionSetsRequest) obj; + + if (getLimit() + != other.getLimit()) return false; + if (hasOptionalAtRevision() != other.hasOptionalAtRevision()) return false; + if (hasOptionalAtRevision()) { + if (!getOptionalAtRevision() + .equals(other.getOptionalAtRevision())) return false; + } + if (hasOptionalStartingAfterCursor() != other.hasOptionalStartingAfterCursor()) return false; + if (hasOptionalStartingAfterCursor()) { + if (!getOptionalStartingAfterCursor() + .equals(other.getOptionalStartingAfterCursor())) 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) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit(); + if (hasOptionalAtRevision()) { + hash = (37 * hash) + OPTIONAL_AT_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getOptionalAtRevision().hashCode(); + } + if (hasOptionalStartingAfterCursor()) { + hash = (37 * hash) + OPTIONAL_STARTING_AFTER_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getOptionalStartingAfterCursor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequest 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.materialize.v0.LookupPermissionSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequest 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.materialize.v0.LookupPermissionSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequest 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.materialize.v0.LookupPermissionSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequest 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.materialize.v0.LookupPermissionSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequest 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.materialize.v0.LookupPermissionSetsRequest 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.LookupPermissionSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.LookupPermissionSetsRequest) + com.authzed.api.materialize.v0.LookupPermissionSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.LookupPermissionSetsRequest.class, com.authzed.api.materialize.v0.LookupPermissionSetsRequest.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.LookupPermissionSetsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + limit_ = 0; + optionalAtRevision_ = null; + if (optionalAtRevisionBuilder_ != null) { + optionalAtRevisionBuilder_.dispose(); + optionalAtRevisionBuilder_ = null; + } + optionalStartingAfterCursor_ = null; + if (optionalStartingAfterCursorBuilder_ != null) { + optionalStartingAfterCursorBuilder_.dispose(); + optionalStartingAfterCursorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsRequest getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.LookupPermissionSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsRequest build() { + com.authzed.api.materialize.v0.LookupPermissionSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsRequest buildPartial() { + com.authzed.api.materialize.v0.LookupPermissionSetsRequest result = new com.authzed.api.materialize.v0.LookupPermissionSetsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.LookupPermissionSetsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.limit_ = limit_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optionalAtRevision_ = optionalAtRevisionBuilder_ == null + ? optionalAtRevision_ + : optionalAtRevisionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.optionalStartingAfterCursor_ = optionalStartingAfterCursorBuilder_ == null + ? optionalStartingAfterCursor_ + : optionalStartingAfterCursorBuilder_.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.materialize.v0.LookupPermissionSetsRequest) { + return mergeFrom((com.authzed.api.materialize.v0.LookupPermissionSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.LookupPermissionSetsRequest other) { + if (other == com.authzed.api.materialize.v0.LookupPermissionSetsRequest.getDefaultInstance()) return this; + if (other.getLimit() != 0) { + setLimit(other.getLimit()); + } + if (other.hasOptionalAtRevision()) { + mergeOptionalAtRevision(other.getOptionalAtRevision()); + } + if (other.hasOptionalStartingAfterCursor()) { + mergeOptionalStartingAfterCursor(other.getOptionalStartingAfterCursor()); + } + 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: { + limit_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getOptionalAtRevisionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: { + input.readMessage( + getOptionalStartingAfterCursorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + 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 int limit_ ; + /** + *
+     * limit is the number of permission sets to stream over a single LookupPermissionSets. Once the limit is reached,
+     * the server will close the stream. If more permission sets are available, the consume should open a new stream
+     * providing optional_starting_after_cursor, using the cursor from the last response.
+     * 
+ * + * uint32 limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + /** + *
+     * limit is the number of permission sets to stream over a single LookupPermissionSets. Once the limit is reached,
+     * the server will close the stream. If more permission sets are available, the consume should open a new stream
+     * providing optional_starting_after_cursor, using the cursor from the last response.
+     * 
+ * + * uint32 limit = 1 [json_name = "limit"]; + * @param value The limit to set. + * @return This builder for chaining. + */ + public Builder setLimit(int value) { + + limit_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * limit is the number of permission sets to stream over a single LookupPermissionSets. Once the limit is reached,
+     * the server will close the stream. If more permission sets are available, the consume should open a new stream
+     * providing optional_starting_after_cursor, using the cursor from the last response.
+     * 
+ * + * uint32 limit = 1 [json_name = "limit"]; + * @return This builder for chaining. + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000001); + limit_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.ZedToken optionalAtRevision_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> optionalAtRevisionBuilder_; + /** + *
+     * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+     * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+     * takes precedence in defining the revision when present.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + * @return Whether the optionalAtRevision field is set. + */ + public boolean hasOptionalAtRevision() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+     * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+     * takes precedence in defining the revision when present.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + * @return The optionalAtRevision. + */ + public com.authzed.api.v1.ZedToken getOptionalAtRevision() { + if (optionalAtRevisionBuilder_ == null) { + return optionalAtRevision_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalAtRevision_; + } else { + return optionalAtRevisionBuilder_.getMessage(); + } + } + /** + *
+     * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+     * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+     * takes precedence in defining the revision when present.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + */ + public Builder setOptionalAtRevision(com.authzed.api.v1.ZedToken value) { + if (optionalAtRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalAtRevision_ = value; + } else { + optionalAtRevisionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+     * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+     * takes precedence in defining the revision when present.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + */ + public Builder setOptionalAtRevision( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (optionalAtRevisionBuilder_ == null) { + optionalAtRevision_ = builderForValue.build(); + } else { + optionalAtRevisionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+     * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+     * takes precedence in defining the revision when present.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + */ + public Builder mergeOptionalAtRevision(com.authzed.api.v1.ZedToken value) { + if (optionalAtRevisionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + optionalAtRevision_ != null && + optionalAtRevision_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getOptionalAtRevisionBuilder().mergeFrom(value); + } else { + optionalAtRevision_ = value; + } + } else { + optionalAtRevisionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+     * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+     * takes precedence in defining the revision when present.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + */ + public Builder clearOptionalAtRevision() { + bitField0_ = (bitField0_ & ~0x00000002); + optionalAtRevision_ = null; + if (optionalAtRevisionBuilder_ != null) { + optionalAtRevisionBuilder_.dispose(); + optionalAtRevisionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+     * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+     * takes precedence in defining the revision when present.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + */ + public com.authzed.api.v1.ZedToken.Builder getOptionalAtRevisionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOptionalAtRevisionFieldBuilder().getBuilder(); + } + /** + *
+     * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+     * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+     * takes precedence in defining the revision when present.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getOptionalAtRevisionOrBuilder() { + if (optionalAtRevisionBuilder_ != null) { + return optionalAtRevisionBuilder_.getMessageOrBuilder(); + } else { + return optionalAtRevision_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalAtRevision_; + } + } + /** + *
+     * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+     * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+     * takes precedence in defining the revision when present.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getOptionalAtRevisionFieldBuilder() { + if (optionalAtRevisionBuilder_ == null) { + optionalAtRevisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getOptionalAtRevision(), + getParentForChildren(), + isClean()); + optionalAtRevision_ = null; + } + return optionalAtRevisionBuilder_; + } + + private com.authzed.api.materialize.v0.Cursor optionalStartingAfterCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.Cursor, com.authzed.api.materialize.v0.Cursor.Builder, com.authzed.api.materialize.v0.CursorOrBuilder> optionalStartingAfterCursorBuilder_; + /** + *
+     * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + * @return Whether the optionalStartingAfterCursor field is set. + */ + public boolean hasOptionalStartingAfterCursor() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + * @return The optionalStartingAfterCursor. + */ + public com.authzed.api.materialize.v0.Cursor getOptionalStartingAfterCursor() { + if (optionalStartingAfterCursorBuilder_ == null) { + return optionalStartingAfterCursor_ == null ? com.authzed.api.materialize.v0.Cursor.getDefaultInstance() : optionalStartingAfterCursor_; + } else { + return optionalStartingAfterCursorBuilder_.getMessage(); + } + } + /** + *
+     * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + */ + public Builder setOptionalStartingAfterCursor(com.authzed.api.materialize.v0.Cursor value) { + if (optionalStartingAfterCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalStartingAfterCursor_ = value; + } else { + optionalStartingAfterCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + */ + public Builder setOptionalStartingAfterCursor( + com.authzed.api.materialize.v0.Cursor.Builder builderForValue) { + if (optionalStartingAfterCursorBuilder_ == null) { + optionalStartingAfterCursor_ = builderForValue.build(); + } else { + optionalStartingAfterCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + */ + public Builder mergeOptionalStartingAfterCursor(com.authzed.api.materialize.v0.Cursor value) { + if (optionalStartingAfterCursorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + optionalStartingAfterCursor_ != null && + optionalStartingAfterCursor_ != com.authzed.api.materialize.v0.Cursor.getDefaultInstance()) { + getOptionalStartingAfterCursorBuilder().mergeFrom(value); + } else { + optionalStartingAfterCursor_ = value; + } + } else { + optionalStartingAfterCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + */ + public Builder clearOptionalStartingAfterCursor() { + bitField0_ = (bitField0_ & ~0x00000004); + optionalStartingAfterCursor_ = null; + if (optionalStartingAfterCursorBuilder_ != null) { + optionalStartingAfterCursorBuilder_.dispose(); + optionalStartingAfterCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + */ + public com.authzed.api.materialize.v0.Cursor.Builder getOptionalStartingAfterCursorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOptionalStartingAfterCursorFieldBuilder().getBuilder(); + } + /** + *
+     * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + */ + public com.authzed.api.materialize.v0.CursorOrBuilder getOptionalStartingAfterCursorOrBuilder() { + if (optionalStartingAfterCursorBuilder_ != null) { + return optionalStartingAfterCursorBuilder_.getMessageOrBuilder(); + } else { + return optionalStartingAfterCursor_ == null ? + com.authzed.api.materialize.v0.Cursor.getDefaultInstance() : optionalStartingAfterCursor_; + } + } + /** + *
+     * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.Cursor, com.authzed.api.materialize.v0.Cursor.Builder, com.authzed.api.materialize.v0.CursorOrBuilder> + getOptionalStartingAfterCursorFieldBuilder() { + if (optionalStartingAfterCursorBuilder_ == null) { + optionalStartingAfterCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.Cursor, com.authzed.api.materialize.v0.Cursor.Builder, com.authzed.api.materialize.v0.CursorOrBuilder>( + getOptionalStartingAfterCursor(), + getParentForChildren(), + isClean()); + optionalStartingAfterCursor_ = null; + } + return optionalStartingAfterCursorBuilder_; + } + @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.materialize.v0.LookupPermissionSetsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.LookupPermissionSetsRequest) + private static final com.authzed.api.materialize.v0.LookupPermissionSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.LookupPermissionSetsRequest(); + } + + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupPermissionSetsRequest 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.materialize.v0.LookupPermissionSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequestOrBuilder.java b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequestOrBuilder.java new file mode 100644 index 00000000..36d3c333 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequestOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public interface LookupPermissionSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.LookupPermissionSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * limit is the number of permission sets to stream over a single LookupPermissionSets. Once the limit is reached,
+   * the server will close the stream. If more permission sets are available, the consume should open a new stream
+   * providing optional_starting_after_cursor, using the cursor from the last response.
+   * 
+ * + * uint32 limit = 1 [json_name = "limit"]; + * @return The limit. + */ + int getLimit(); + + /** + *
+   * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+   * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+   * takes precedence in defining the revision when present.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + * @return Whether the optionalAtRevision field is set. + */ + boolean hasOptionalAtRevision(); + /** + *
+   * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+   * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+   * takes precedence in defining the revision when present.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + * @return The optionalAtRevision. + */ + com.authzed.api.v1.ZedToken getOptionalAtRevision(); + /** + *
+   * optional_at_revision specifies the client is requesting to lookup PermissionSets at a specific revision. It's
+   * optional, and if not provided, PermissionSets will be looked up at the current revision. The cursor always
+   * takes precedence in defining the revision when present.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_at_revision = 2 [json_name = "optionalAtRevision"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getOptionalAtRevisionOrBuilder(); + + /** + *
+   * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + * @return Whether the optionalStartingAfterCursor field is set. + */ + boolean hasOptionalStartingAfterCursor(); + /** + *
+   * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + * @return The optionalStartingAfterCursor. + */ + com.authzed.api.materialize.v0.Cursor getOptionalStartingAfterCursor(); + /** + *
+   * optional_starting_after_cursor is used to specify the offset to start streaming permission sets from.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor optional_starting_after_cursor = 4 [json_name = "optionalStartingAfterCursor"]; + */ + com.authzed.api.materialize.v0.CursorOrBuilder getOptionalStartingAfterCursorOrBuilder(); +} diff --git a/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequired.java b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequired.java new file mode 100644 index 00000000..f4de3006 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequired.java @@ -0,0 +1,649 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +/** + *
+ * LookupPermissionSetsRequired is a signal that the consumer should perform a LookupPermissionSets call because
+ * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+ * cluster has seen its schema changed, see BreakingSchemaChange event.
+ * 
+ * + * Protobuf type {@code authzed.api.materialize.v0.LookupPermissionSetsRequired} + */ +public final class LookupPermissionSetsRequired extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.LookupPermissionSetsRequired) + LookupPermissionSetsRequiredOrBuilder { +private static final long serialVersionUID = 0L; + // Use LookupPermissionSetsRequired.newBuilder() to construct. + private LookupPermissionSetsRequired(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LookupPermissionSetsRequired() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LookupPermissionSetsRequired(); + } + + @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.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequired_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequired_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.LookupPermissionSetsRequired.class, com.authzed.api.materialize.v0.LookupPermissionSetsRequired.Builder.class); + } + + public static final int REQUIRED_LOOKUP_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken requiredLookupAt_; + /** + *
+   * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+   * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + * @return Whether the requiredLookupAt field is set. + */ + @java.lang.Override + public boolean hasRequiredLookupAt() { + return requiredLookupAt_ != null; + } + /** + *
+   * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+   * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + * @return The requiredLookupAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getRequiredLookupAt() { + return requiredLookupAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : requiredLookupAt_; + } + /** + *
+   * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+   * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getRequiredLookupAtOrBuilder() { + return requiredLookupAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : requiredLookupAt_; + } + + 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 (requiredLookupAt_ != null) { + output.writeMessage(1, getRequiredLookupAt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (requiredLookupAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRequiredLookupAt()); + } + 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.materialize.v0.LookupPermissionSetsRequired)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.LookupPermissionSetsRequired other = (com.authzed.api.materialize.v0.LookupPermissionSetsRequired) obj; + + if (hasRequiredLookupAt() != other.hasRequiredLookupAt()) return false; + if (hasRequiredLookupAt()) { + if (!getRequiredLookupAt() + .equals(other.getRequiredLookupAt())) 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 (hasRequiredLookupAt()) { + hash = (37 * hash) + REQUIRED_LOOKUP_AT_FIELD_NUMBER; + hash = (53 * hash) + getRequiredLookupAt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequired parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequired 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.materialize.v0.LookupPermissionSetsRequired parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequired 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.materialize.v0.LookupPermissionSetsRequired parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequired parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequired parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequired 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.materialize.v0.LookupPermissionSetsRequired parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequired 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.materialize.v0.LookupPermissionSetsRequired parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequired 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.materialize.v0.LookupPermissionSetsRequired 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; + } + /** + *
+   * LookupPermissionSetsRequired is a signal that the consumer should perform a LookupPermissionSets call because
+   * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+   * cluster has seen its schema changed, see BreakingSchemaChange event.
+   * 
+ * + * Protobuf type {@code authzed.api.materialize.v0.LookupPermissionSetsRequired} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.LookupPermissionSetsRequired) + com.authzed.api.materialize.v0.LookupPermissionSetsRequiredOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequired_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequired_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.LookupPermissionSetsRequired.class, com.authzed.api.materialize.v0.LookupPermissionSetsRequired.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.LookupPermissionSetsRequired.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + requiredLookupAt_ = null; + if (requiredLookupAtBuilder_ != null) { + requiredLookupAtBuilder_.dispose(); + requiredLookupAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequired_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsRequired getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.LookupPermissionSetsRequired.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsRequired build() { + com.authzed.api.materialize.v0.LookupPermissionSetsRequired result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsRequired buildPartial() { + com.authzed.api.materialize.v0.LookupPermissionSetsRequired result = new com.authzed.api.materialize.v0.LookupPermissionSetsRequired(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.LookupPermissionSetsRequired result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.requiredLookupAt_ = requiredLookupAtBuilder_ == null + ? requiredLookupAt_ + : requiredLookupAtBuilder_.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.materialize.v0.LookupPermissionSetsRequired) { + return mergeFrom((com.authzed.api.materialize.v0.LookupPermissionSetsRequired)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.LookupPermissionSetsRequired other) { + if (other == com.authzed.api.materialize.v0.LookupPermissionSetsRequired.getDefaultInstance()) return this; + if (other.hasRequiredLookupAt()) { + mergeRequiredLookupAt(other.getRequiredLookupAt()); + } + 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( + getRequiredLookupAtFieldBuilder().getBuilder(), + extensionRegistry); + 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 com.authzed.api.v1.ZedToken requiredLookupAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> requiredLookupAtBuilder_; + /** + *
+     * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+     * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + * @return Whether the requiredLookupAt field is set. + */ + public boolean hasRequiredLookupAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+     * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + * @return The requiredLookupAt. + */ + public com.authzed.api.v1.ZedToken getRequiredLookupAt() { + if (requiredLookupAtBuilder_ == null) { + return requiredLookupAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : requiredLookupAt_; + } else { + return requiredLookupAtBuilder_.getMessage(); + } + } + /** + *
+     * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+     * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + */ + public Builder setRequiredLookupAt(com.authzed.api.v1.ZedToken value) { + if (requiredLookupAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requiredLookupAt_ = value; + } else { + requiredLookupAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+     * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + */ + public Builder setRequiredLookupAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (requiredLookupAtBuilder_ == null) { + requiredLookupAt_ = builderForValue.build(); + } else { + requiredLookupAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+     * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + */ + public Builder mergeRequiredLookupAt(com.authzed.api.v1.ZedToken value) { + if (requiredLookupAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + requiredLookupAt_ != null && + requiredLookupAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getRequiredLookupAtBuilder().mergeFrom(value); + } else { + requiredLookupAt_ = value; + } + } else { + requiredLookupAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+     * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + */ + public Builder clearRequiredLookupAt() { + bitField0_ = (bitField0_ & ~0x00000001); + requiredLookupAt_ = null; + if (requiredLookupAtBuilder_ != null) { + requiredLookupAtBuilder_.dispose(); + requiredLookupAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+     * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getRequiredLookupAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRequiredLookupAtFieldBuilder().getBuilder(); + } + /** + *
+     * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+     * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getRequiredLookupAtOrBuilder() { + if (requiredLookupAtBuilder_ != null) { + return requiredLookupAtBuilder_.getMessageOrBuilder(); + } else { + return requiredLookupAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : requiredLookupAt_; + } + } + /** + *
+     * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+     * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getRequiredLookupAtFieldBuilder() { + if (requiredLookupAtBuilder_ == null) { + requiredLookupAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getRequiredLookupAt(), + getParentForChildren(), + isClean()); + requiredLookupAt_ = null; + } + return requiredLookupAtBuilder_; + } + @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.materialize.v0.LookupPermissionSetsRequired) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.LookupPermissionSetsRequired) + private static final com.authzed.api.materialize.v0.LookupPermissionSetsRequired DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.LookupPermissionSetsRequired(); + } + + public static com.authzed.api.materialize.v0.LookupPermissionSetsRequired getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupPermissionSetsRequired 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.materialize.v0.LookupPermissionSetsRequired getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequiredOrBuilder.java b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequiredOrBuilder.java new file mode 100644 index 00000000..3069ed08 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsRequiredOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public interface LookupPermissionSetsRequiredOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.LookupPermissionSetsRequired) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+   * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + * @return Whether the requiredLookupAt field is set. + */ + boolean hasRequiredLookupAt(); + /** + *
+   * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+   * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + * @return The requiredLookupAt. + */ + com.authzed.api.v1.ZedToken getRequiredLookupAt(); + /** + *
+   * required_lookup_at is the snapshot revision at which the permission set needs to be rebuilt to.
+   * 
+ * + * .authzed.api.v1.ZedToken required_lookup_at = 1 [json_name = "requiredLookupAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getRequiredLookupAtOrBuilder(); +} diff --git a/generated/com/authzed/api/materialize/v0/LookupPermissionSetsResponse.java b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsResponse.java new file mode 100644 index 00000000..0c97a152 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsResponse.java @@ -0,0 +1,926 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.LookupPermissionSetsResponse} + */ +public final class LookupPermissionSetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.LookupPermissionSetsResponse) + LookupPermissionSetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use LookupPermissionSetsResponse.newBuilder() to construct. + private LookupPermissionSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LookupPermissionSetsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LookupPermissionSetsResponse(); + } + + @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.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.LookupPermissionSetsResponse.class, com.authzed.api.materialize.v0.LookupPermissionSetsResponse.Builder.class); + } + + public static final int CHANGE_FIELD_NUMBER = 1; + private com.authzed.api.materialize.v0.PermissionSetChange change_; + /** + *
+   * change represents the permission set delta necessary to transition an uninitialized target system to
+   * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+   * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+   * Applying the deltas to a previously initialized target system would yield incorrect results.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return Whether the change field is set. + */ + @java.lang.Override + public boolean hasChange() { + return change_ != null; + } + /** + *
+   * change represents the permission set delta necessary to transition an uninitialized target system to
+   * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+   * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+   * Applying the deltas to a previously initialized target system would yield incorrect results.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return The change. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionSetChange getChange() { + return change_ == null ? com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance() : change_; + } + /** + *
+   * change represents the permission set delta necessary to transition an uninitialized target system to
+   * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+   * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+   * Applying the deltas to a previously initialized target system would yield incorrect results.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder getChangeOrBuilder() { + return change_ == null ? com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance() : change_; + } + + public static final int CURSOR_FIELD_NUMBER = 2; + private com.authzed.api.materialize.v0.Cursor cursor_; + /** + *
+   * cursor points to a specific permission set in a revision.
+   * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+   * is particularly important in backfill scenarios that may take hours or event days to complete.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + * @return Whether the cursor field is set. + */ + @java.lang.Override + public boolean hasCursor() { + return cursor_ != null; + } + /** + *
+   * cursor points to a specific permission set in a revision.
+   * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+   * is particularly important in backfill scenarios that may take hours or event days to complete.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.Cursor getCursor() { + return cursor_ == null ? com.authzed.api.materialize.v0.Cursor.getDefaultInstance() : cursor_; + } + /** + *
+   * cursor points to a specific permission set in a revision.
+   * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+   * is particularly important in backfill scenarios that may take hours or event days to complete.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.CursorOrBuilder getCursorOrBuilder() { + return cursor_ == null ? com.authzed.api.materialize.v0.Cursor.getDefaultInstance() : cursor_; + } + + 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 (change_ != null) { + output.writeMessage(1, getChange()); + } + if (cursor_ != null) { + output.writeMessage(2, getCursor()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (change_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getChange()); + } + if (cursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCursor()); + } + 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.materialize.v0.LookupPermissionSetsResponse)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.LookupPermissionSetsResponse other = (com.authzed.api.materialize.v0.LookupPermissionSetsResponse) obj; + + if (hasChange() != other.hasChange()) return false; + if (hasChange()) { + if (!getChange() + .equals(other.getChange())) return false; + } + if (hasCursor() != other.hasCursor()) return false; + if (hasCursor()) { + if (!getCursor() + .equals(other.getCursor())) 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 (hasChange()) { + hash = (37 * hash) + CHANGE_FIELD_NUMBER; + hash = (53 * hash) + getChange().hashCode(); + } + if (hasCursor()) { + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.LookupPermissionSetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsResponse 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.materialize.v0.LookupPermissionSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsResponse 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.materialize.v0.LookupPermissionSetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsResponse 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.materialize.v0.LookupPermissionSetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsResponse 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.materialize.v0.LookupPermissionSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.LookupPermissionSetsResponse 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.materialize.v0.LookupPermissionSetsResponse 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.LookupPermissionSetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.LookupPermissionSetsResponse) + com.authzed.api.materialize.v0.LookupPermissionSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.LookupPermissionSetsResponse.class, com.authzed.api.materialize.v0.LookupPermissionSetsResponse.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.LookupPermissionSetsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + change_ = null; + if (changeBuilder_ != null) { + changeBuilder_.dispose(); + changeBuilder_ = null; + } + cursor_ = null; + if (cursorBuilder_ != null) { + cursorBuilder_.dispose(); + cursorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_LookupPermissionSetsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsResponse getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.LookupPermissionSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsResponse build() { + com.authzed.api.materialize.v0.LookupPermissionSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsResponse buildPartial() { + com.authzed.api.materialize.v0.LookupPermissionSetsResponse result = new com.authzed.api.materialize.v0.LookupPermissionSetsResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.LookupPermissionSetsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.change_ = changeBuilder_ == null + ? change_ + : changeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursorBuilder_ == null + ? cursor_ + : cursorBuilder_.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.materialize.v0.LookupPermissionSetsResponse) { + return mergeFrom((com.authzed.api.materialize.v0.LookupPermissionSetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.LookupPermissionSetsResponse other) { + if (other == com.authzed.api.materialize.v0.LookupPermissionSetsResponse.getDefaultInstance()) return this; + if (other.hasChange()) { + mergeChange(other.getChange()); + } + if (other.hasCursor()) { + mergeCursor(other.getCursor()); + } + 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( + getChangeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCursorFieldBuilder().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 com.authzed.api.materialize.v0.PermissionSetChange change_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.PermissionSetChange, com.authzed.api.materialize.v0.PermissionSetChange.Builder, com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder> changeBuilder_; + /** + *
+     * change represents the permission set delta necessary to transition an uninitialized target system to
+     * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+     * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+     * Applying the deltas to a previously initialized target system would yield incorrect results.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return Whether the change field is set. + */ + public boolean hasChange() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * change represents the permission set delta necessary to transition an uninitialized target system to
+     * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+     * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+     * Applying the deltas to a previously initialized target system would yield incorrect results.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return The change. + */ + public com.authzed.api.materialize.v0.PermissionSetChange getChange() { + if (changeBuilder_ == null) { + return change_ == null ? com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance() : change_; + } else { + return changeBuilder_.getMessage(); + } + } + /** + *
+     * change represents the permission set delta necessary to transition an uninitialized target system to
+     * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+     * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+     * Applying the deltas to a previously initialized target system would yield incorrect results.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public Builder setChange(com.authzed.api.materialize.v0.PermissionSetChange value) { + if (changeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + change_ = value; + } else { + changeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * change represents the permission set delta necessary to transition an uninitialized target system to
+     * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+     * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+     * Applying the deltas to a previously initialized target system would yield incorrect results.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public Builder setChange( + com.authzed.api.materialize.v0.PermissionSetChange.Builder builderForValue) { + if (changeBuilder_ == null) { + change_ = builderForValue.build(); + } else { + changeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * change represents the permission set delta necessary to transition an uninitialized target system to
+     * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+     * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+     * Applying the deltas to a previously initialized target system would yield incorrect results.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public Builder mergeChange(com.authzed.api.materialize.v0.PermissionSetChange value) { + if (changeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + change_ != null && + change_ != com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance()) { + getChangeBuilder().mergeFrom(value); + } else { + change_ = value; + } + } else { + changeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * change represents the permission set delta necessary to transition an uninitialized target system to
+     * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+     * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+     * Applying the deltas to a previously initialized target system would yield incorrect results.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public Builder clearChange() { + bitField0_ = (bitField0_ & ~0x00000001); + change_ = null; + if (changeBuilder_ != null) { + changeBuilder_.dispose(); + changeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * change represents the permission set delta necessary to transition an uninitialized target system to
+     * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+     * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+     * Applying the deltas to a previously initialized target system would yield incorrect results.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public com.authzed.api.materialize.v0.PermissionSetChange.Builder getChangeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getChangeFieldBuilder().getBuilder(); + } + /** + *
+     * change represents the permission set delta necessary to transition an uninitialized target system to
+     * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+     * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+     * Applying the deltas to a previously initialized target system would yield incorrect results.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder getChangeOrBuilder() { + if (changeBuilder_ != null) { + return changeBuilder_.getMessageOrBuilder(); + } else { + return change_ == null ? + com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance() : change_; + } + } + /** + *
+     * change represents the permission set delta necessary to transition an uninitialized target system to
+     * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+     * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+     * Applying the deltas to a previously initialized target system would yield incorrect results.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.PermissionSetChange, com.authzed.api.materialize.v0.PermissionSetChange.Builder, com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder> + getChangeFieldBuilder() { + if (changeBuilder_ == null) { + changeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.PermissionSetChange, com.authzed.api.materialize.v0.PermissionSetChange.Builder, com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder>( + getChange(), + getParentForChildren(), + isClean()); + change_ = null; + } + return changeBuilder_; + } + + private com.authzed.api.materialize.v0.Cursor cursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.Cursor, com.authzed.api.materialize.v0.Cursor.Builder, com.authzed.api.materialize.v0.CursorOrBuilder> cursorBuilder_; + /** + *
+     * cursor points to a specific permission set in a revision.
+     * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+     * is particularly important in backfill scenarios that may take hours or event days to complete.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + * @return Whether the cursor field is set. + */ + public boolean hasCursor() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * cursor points to a specific permission set in a revision.
+     * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+     * is particularly important in backfill scenarios that may take hours or event days to complete.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public com.authzed.api.materialize.v0.Cursor getCursor() { + if (cursorBuilder_ == null) { + return cursor_ == null ? com.authzed.api.materialize.v0.Cursor.getDefaultInstance() : cursor_; + } else { + return cursorBuilder_.getMessage(); + } + } + /** + *
+     * cursor points to a specific permission set in a revision.
+     * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+     * is particularly important in backfill scenarios that may take hours or event days to complete.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + */ + public Builder setCursor(com.authzed.api.materialize.v0.Cursor value) { + if (cursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cursor_ = value; + } else { + cursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * cursor points to a specific permission set in a revision.
+     * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+     * is particularly important in backfill scenarios that may take hours or event days to complete.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + */ + public Builder setCursor( + com.authzed.api.materialize.v0.Cursor.Builder builderForValue) { + if (cursorBuilder_ == null) { + cursor_ = builderForValue.build(); + } else { + cursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * cursor points to a specific permission set in a revision.
+     * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+     * is particularly important in backfill scenarios that may take hours or event days to complete.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + */ + public Builder mergeCursor(com.authzed.api.materialize.v0.Cursor value) { + if (cursorBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + cursor_ != null && + cursor_ != com.authzed.api.materialize.v0.Cursor.getDefaultInstance()) { + getCursorBuilder().mergeFrom(value); + } else { + cursor_ = value; + } + } else { + cursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * cursor points to a specific permission set in a revision.
+     * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+     * is particularly important in backfill scenarios that may take hours or event days to complete.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + */ + public Builder clearCursor() { + bitField0_ = (bitField0_ & ~0x00000002); + cursor_ = null; + if (cursorBuilder_ != null) { + cursorBuilder_.dispose(); + cursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * cursor points to a specific permission set in a revision.
+     * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+     * is particularly important in backfill scenarios that may take hours or event days to complete.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + */ + public com.authzed.api.materialize.v0.Cursor.Builder getCursorBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCursorFieldBuilder().getBuilder(); + } + /** + *
+     * cursor points to a specific permission set in a revision.
+     * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+     * is particularly important in backfill scenarios that may take hours or event days to complete.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + */ + public com.authzed.api.materialize.v0.CursorOrBuilder getCursorOrBuilder() { + if (cursorBuilder_ != null) { + return cursorBuilder_.getMessageOrBuilder(); + } else { + return cursor_ == null ? + com.authzed.api.materialize.v0.Cursor.getDefaultInstance() : cursor_; + } + } + /** + *
+     * cursor points to a specific permission set in a revision.
+     * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+     * is particularly important in backfill scenarios that may take hours or event days to complete.
+     * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.Cursor, com.authzed.api.materialize.v0.Cursor.Builder, com.authzed.api.materialize.v0.CursorOrBuilder> + getCursorFieldBuilder() { + if (cursorBuilder_ == null) { + cursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.Cursor, com.authzed.api.materialize.v0.Cursor.Builder, com.authzed.api.materialize.v0.CursorOrBuilder>( + getCursor(), + getParentForChildren(), + isClean()); + cursor_ = null; + } + return cursorBuilder_; + } + @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.materialize.v0.LookupPermissionSetsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.LookupPermissionSetsResponse) + private static final com.authzed.api.materialize.v0.LookupPermissionSetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.LookupPermissionSetsResponse(); + } + + public static com.authzed.api.materialize.v0.LookupPermissionSetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupPermissionSetsResponse 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.materialize.v0.LookupPermissionSetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/LookupPermissionSetsResponseOrBuilder.java b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsResponseOrBuilder.java new file mode 100644 index 00000000..f2a1db6c --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/LookupPermissionSetsResponseOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public interface LookupPermissionSetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.LookupPermissionSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * change represents the permission set delta necessary to transition an uninitialized target system to
+   * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+   * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+   * Applying the deltas to a previously initialized target system would yield incorrect results.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return Whether the change field is set. + */ + boolean hasChange(); + /** + *
+   * change represents the permission set delta necessary to transition an uninitialized target system to
+   * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+   * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+   * Applying the deltas to a previously initialized target system would yield incorrect results.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return The change. + */ + com.authzed.api.materialize.v0.PermissionSetChange getChange(); + /** + *
+   * change represents the permission set delta necessary to transition an uninitialized target system to
+   * a specific snapshot revision. In practice it's not different from the WatchPermissionSetsResponse.change, except
+   * all changes will be of time SET_OPERATION_ADDED because it's assumed there is no known previous state.
+   * Applying the deltas to a previously initialized target system would yield incorrect results.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder getChangeOrBuilder(); + + /** + *
+   * cursor points to a specific permission set in a revision.
+   * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+   * is particularly important in backfill scenarios that may take hours or event days to complete.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + * @return Whether the cursor field is set. + */ + boolean hasCursor(); + /** + *
+   * cursor points to a specific permission set in a revision.
+   * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+   * is particularly important in backfill scenarios that may take hours or event days to complete.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + com.authzed.api.materialize.v0.Cursor getCursor(); + /** + *
+   * cursor points to a specific permission set in a revision.
+   * The consumer should keep track of the cursor in order to resume streaming in the event of consumer restarts. This
+   * is particularly important in backfill scenarios that may take hours or event days to complete.
+   * 
+ * + * .authzed.api.materialize.v0.Cursor cursor = 2 [json_name = "cursor"]; + */ + com.authzed.api.materialize.v0.CursorOrBuilder getCursorOrBuilder(); +} diff --git a/generated/com/authzed/api/materialize/v0/MemberReference.java b/generated/com/authzed/api/materialize/v0/MemberReference.java new file mode 100644 index 00000000..94080f23 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/MemberReference.java @@ -0,0 +1,900 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.MemberReference} + */ +public final class MemberReference extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.MemberReference) + MemberReferenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use MemberReference.newBuilder() to construct. + private MemberReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MemberReference() { + objectType_ = ""; + objectId_ = ""; + optionalPermissionOrRelation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MemberReference(); + } + + @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.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_MemberReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_MemberReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.MemberReference.class, com.authzed.api.materialize.v0.MemberReference.Builder.class); + } + + public static final int OBJECT_TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object objectType_ = ""; + /** + *
+   * object_type is the type of object of a permission set member
+   * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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; + } + } + /** + *
+   * object_type is the type of object of a permission set member
+   * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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_ = ""; + /** + *
+   * object_id is the ID of a permission set member
+   * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + } + /** + *
+   * object_id is the ID of a permission set member
+   * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + } + + public static final int OPTIONAL_PERMISSION_OR_RELATION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalPermissionOrRelation_ = ""; + /** + *
+   * optional_permission_or_relation is the permission or relation referenced by this permission set member
+   * 
+ * + * string optional_permission_or_relation = 3 [json_name = "optionalPermissionOrRelation"]; + * @return The optionalPermissionOrRelation. + */ + @java.lang.Override + public java.lang.String getOptionalPermissionOrRelation() { + java.lang.Object ref = optionalPermissionOrRelation_; + 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(); + optionalPermissionOrRelation_ = s; + return s; + } + } + /** + *
+   * optional_permission_or_relation is the permission or relation referenced by this permission set member
+   * 
+ * + * string optional_permission_or_relation = 3 [json_name = "optionalPermissionOrRelation"]; + * @return The bytes for optionalPermissionOrRelation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalPermissionOrRelationBytes() { + java.lang.Object ref = optionalPermissionOrRelation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalPermissionOrRelation_ = 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalPermissionOrRelation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, optionalPermissionOrRelation_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalPermissionOrRelation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, optionalPermissionOrRelation_); + } + 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.materialize.v0.MemberReference)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.MemberReference other = (com.authzed.api.materialize.v0.MemberReference) obj; + + if (!getObjectType() + .equals(other.getObjectType())) return false; + if (!getObjectId() + .equals(other.getObjectId())) return false; + if (!getOptionalPermissionOrRelation() + .equals(other.getOptionalPermissionOrRelation())) 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 = (37 * hash) + OPTIONAL_PERMISSION_OR_RELATION_FIELD_NUMBER; + hash = (53 * hash) + getOptionalPermissionOrRelation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.MemberReference parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.MemberReference 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.materialize.v0.MemberReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.MemberReference 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.materialize.v0.MemberReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.MemberReference parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.MemberReference parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.MemberReference 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.materialize.v0.MemberReference parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.MemberReference 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.materialize.v0.MemberReference parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.MemberReference 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.materialize.v0.MemberReference 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.MemberReference} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.MemberReference) + com.authzed.api.materialize.v0.MemberReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_MemberReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_MemberReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.MemberReference.class, com.authzed.api.materialize.v0.MemberReference.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.MemberReference.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_ = ""; + optionalPermissionOrRelation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_MemberReference_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.MemberReference getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.MemberReference.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.MemberReference build() { + com.authzed.api.materialize.v0.MemberReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.MemberReference buildPartial() { + com.authzed.api.materialize.v0.MemberReference result = new com.authzed.api.materialize.v0.MemberReference(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.MemberReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.objectType_ = objectType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.objectId_ = objectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.optionalPermissionOrRelation_ = optionalPermissionOrRelation_; + } + } + + @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.materialize.v0.MemberReference) { + return mergeFrom((com.authzed.api.materialize.v0.MemberReference)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.MemberReference other) { + if (other == com.authzed.api.materialize.v0.MemberReference.getDefaultInstance()) return this; + if (!other.getObjectType().isEmpty()) { + objectType_ = other.objectType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getObjectId().isEmpty()) { + objectId_ = other.objectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOptionalPermissionOrRelation().isEmpty()) { + optionalPermissionOrRelation_ = other.optionalPermissionOrRelation_; + bitField0_ |= 0x00000004; + 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 + case 26: { + optionalPermissionOrRelation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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_ = ""; + /** + *
+     * object_type is the type of object of a permission set member
+     * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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; + } + } + /** + *
+     * object_type is the type of object of a permission set member
+     * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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; + } + } + /** + *
+     * object_type is the type of object of a permission set member
+     * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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; + } + /** + *
+     * object_type is the type of object of a permission set member
+     * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @return This builder for chaining. + */ + public Builder clearObjectType() { + objectType_ = getDefaultInstance().getObjectType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * object_type is the type of object of a permission set member
+     * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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_ = ""; + /** + *
+     * object_id is the ID of a permission set member
+     * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + } + /** + *
+     * object_id is the ID of a permission set member
+     * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + } + /** + *
+     * object_id is the ID of a permission set member
+     * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + /** + *
+     * object_id is the ID of a permission set member
+     * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @return This builder for chaining. + */ + public Builder clearObjectId() { + objectId_ = getDefaultInstance().getObjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * object_id is the ID of a permission set member
+     * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + + private java.lang.Object optionalPermissionOrRelation_ = ""; + /** + *
+     * optional_permission_or_relation is the permission or relation referenced by this permission set member
+     * 
+ * + * string optional_permission_or_relation = 3 [json_name = "optionalPermissionOrRelation"]; + * @return The optionalPermissionOrRelation. + */ + public java.lang.String getOptionalPermissionOrRelation() { + java.lang.Object ref = optionalPermissionOrRelation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalPermissionOrRelation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_permission_or_relation is the permission or relation referenced by this permission set member
+     * 
+ * + * string optional_permission_or_relation = 3 [json_name = "optionalPermissionOrRelation"]; + * @return The bytes for optionalPermissionOrRelation. + */ + public com.google.protobuf.ByteString + getOptionalPermissionOrRelationBytes() { + java.lang.Object ref = optionalPermissionOrRelation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalPermissionOrRelation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_permission_or_relation is the permission or relation referenced by this permission set member
+     * 
+ * + * string optional_permission_or_relation = 3 [json_name = "optionalPermissionOrRelation"]; + * @param value The optionalPermissionOrRelation to set. + * @return This builder for chaining. + */ + public Builder setOptionalPermissionOrRelation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalPermissionOrRelation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_permission_or_relation is the permission or relation referenced by this permission set member
+     * 
+ * + * string optional_permission_or_relation = 3 [json_name = "optionalPermissionOrRelation"]; + * @return This builder for chaining. + */ + public Builder clearOptionalPermissionOrRelation() { + optionalPermissionOrRelation_ = getDefaultInstance().getOptionalPermissionOrRelation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * optional_permission_or_relation is the permission or relation referenced by this permission set member
+     * 
+ * + * string optional_permission_or_relation = 3 [json_name = "optionalPermissionOrRelation"]; + * @param value The bytes for optionalPermissionOrRelation to set. + * @return This builder for chaining. + */ + public Builder setOptionalPermissionOrRelationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalPermissionOrRelation_ = value; + bitField0_ |= 0x00000004; + 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.materialize.v0.MemberReference) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.MemberReference) + private static final com.authzed.api.materialize.v0.MemberReference DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.MemberReference(); + } + + public static com.authzed.api.materialize.v0.MemberReference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemberReference 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.materialize.v0.MemberReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/MemberReferenceOrBuilder.java b/generated/com/authzed/api/materialize/v0/MemberReferenceOrBuilder.java new file mode 100644 index 00000000..1d34805f --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/MemberReferenceOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public interface MemberReferenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.MemberReference) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * object_type is the type of object of a permission set member
+   * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @return The objectType. + */ + java.lang.String getObjectType(); + /** + *
+   * object_type is the type of object of a permission set member
+   * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @return The bytes for objectType. + */ + com.google.protobuf.ByteString + getObjectTypeBytes(); + + /** + *
+   * object_id is the ID of a permission set member
+   * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @return The objectId. + */ + java.lang.String getObjectId(); + /** + *
+   * object_id is the ID of a permission set member
+   * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @return The bytes for objectId. + */ + com.google.protobuf.ByteString + getObjectIdBytes(); + + /** + *
+   * optional_permission_or_relation is the permission or relation referenced by this permission set member
+   * 
+ * + * string optional_permission_or_relation = 3 [json_name = "optionalPermissionOrRelation"]; + * @return The optionalPermissionOrRelation. + */ + java.lang.String getOptionalPermissionOrRelation(); + /** + *
+   * optional_permission_or_relation is the permission or relation referenced by this permission set member
+   * 
+ * + * string optional_permission_or_relation = 3 [json_name = "optionalPermissionOrRelation"]; + * @return The bytes for optionalPermissionOrRelation. + */ + com.google.protobuf.ByteString + getOptionalPermissionOrRelationBytes(); +} diff --git a/generated/com/authzed/api/materialize/v0/PermissionChange.java b/generated/com/authzed/api/materialize/v0/PermissionChange.java new file mode 100644 index 00000000..cf9adf8f --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/PermissionChange.java @@ -0,0 +1,1507 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissions.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.PermissionChange} + */ +public final class PermissionChange extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.PermissionChange) + PermissionChangeOrBuilder { +private static final long serialVersionUID = 0L; + // Use PermissionChange.newBuilder() to construct. + private PermissionChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PermissionChange() { + permission_ = ""; + permissionship_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PermissionChange(); + } + + @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.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_PermissionChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_PermissionChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.PermissionChange.class, com.authzed.api.materialize.v0.PermissionChange.Builder.class); + } + + /** + * Protobuf enum {@code authzed.api.materialize.v0.PermissionChange.Permissionship} + */ + public enum Permissionship + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PERMISSIONSHIP_UNSPECIFIED = 0; + */ + PERMISSIONSHIP_UNSPECIFIED(0), + /** + * PERMISSIONSHIP_NO_PERMISSION = 1; + */ + PERMISSIONSHIP_NO_PERMISSION(1), + /** + * PERMISSIONSHIP_HAS_PERMISSION = 2; + */ + PERMISSIONSHIP_HAS_PERMISSION(2), + /** + * PERMISSIONSHIP_CONDITIONAL_PERMISSION = 3; + */ + PERMISSIONSHIP_CONDITIONAL_PERMISSION(3), + UNRECOGNIZED(-1), + ; + + /** + * PERMISSIONSHIP_UNSPECIFIED = 0; + */ + public static final int PERMISSIONSHIP_UNSPECIFIED_VALUE = 0; + /** + * PERMISSIONSHIP_NO_PERMISSION = 1; + */ + public static final int PERMISSIONSHIP_NO_PERMISSION_VALUE = 1; + /** + * PERMISSIONSHIP_HAS_PERMISSION = 2; + */ + public static final int PERMISSIONSHIP_HAS_PERMISSION_VALUE = 2; + /** + * PERMISSIONSHIP_CONDITIONAL_PERMISSION = 3; + */ + public static final int PERMISSIONSHIP_CONDITIONAL_PERMISSION_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 Permissionship 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 Permissionship forNumber(int value) { + switch (value) { + case 0: return PERMISSIONSHIP_UNSPECIFIED; + case 1: return PERMISSIONSHIP_NO_PERMISSION; + case 2: return PERMISSIONSHIP_HAS_PERMISSION; + case 3: return PERMISSIONSHIP_CONDITIONAL_PERMISSION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Permissionship> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Permissionship findValueByNumber(int number) { + return Permissionship.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.materialize.v0.PermissionChange.getDescriptor().getEnumTypes().get(0); + } + + private static final Permissionship[] VALUES = values(); + + public static Permissionship 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 Permissionship(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.materialize.v0.PermissionChange.Permissionship) + } + + public static final int REVISION_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken revision_; + /** + *
+   * revision represents the revision at which the change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + * @return Whether the revision field is set. + */ + @java.lang.Override + public boolean hasRevision() { + return revision_ != null; + } + /** + *
+   * revision represents the revision at which the change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + * @return The revision. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getRevision() { + return revision_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : revision_; + } + /** + *
+   * revision represents the revision at which the change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getRevisionOrBuilder() { + return revision_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : revision_; + } + + public static final int RESOURCE_FIELD_NUMBER = 2; + private com.authzed.api.v1.ObjectReference resource_; + /** + *
+   * resource is the resource that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+   * resource is the resource that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return The resource. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getResource() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + /** + *
+   * resource is the resource that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + + public static final int PERMISSION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object permission_ = ""; + /** + *
+   * permission is the permission that has changed.
+   * 
+ * + * string permission = 3 [json_name = "permission"]; + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + *
+   * permission is the permission that has changed.
+   * 
+ * + * string permission = 3 [json_name = "permission"]; + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_FIELD_NUMBER = 4; + private com.authzed.api.v1.SubjectReference subject_; + /** + *
+   * subject is the subject that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + * @return Whether the subject field is set. + */ + @java.lang.Override + public boolean hasSubject() { + return subject_ != null; + } + /** + *
+   * subject is the subject that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + * @return The subject. + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReference getSubject() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + /** + *
+   * subject is the subject that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + + public static final int PERMISSIONSHIP_FIELD_NUMBER = 5; + private int permissionship_ = 0; + /** + *
+   * permissionship is the new permissionship of the subject over the resource after the change.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionChange.Permissionship permissionship = 5 [json_name = "permissionship"]; + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + *
+   * permissionship is the new permissionship of the subject over the resource after the change.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionChange.Permissionship permissionship = 5 [json_name = "permissionship"]; + * @return The permissionship. + */ + @java.lang.Override public com.authzed.api.materialize.v0.PermissionChange.Permissionship getPermissionship() { + com.authzed.api.materialize.v0.PermissionChange.Permissionship result = com.authzed.api.materialize.v0.PermissionChange.Permissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.materialize.v0.PermissionChange.Permissionship.UNRECOGNIZED : result; + } + + 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 (revision_ != null) { + output.writeMessage(1, getRevision()); + } + if (resource_ != null) { + output.writeMessage(2, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, permission_); + } + if (subject_ != null) { + output.writeMessage(4, getSubject()); + } + if (permissionship_ != com.authzed.api.materialize.v0.PermissionChange.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + output.writeEnum(5, permissionship_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (revision_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRevision()); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, permission_); + } + if (subject_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getSubject()); + } + if (permissionship_ != com.authzed.api.materialize.v0.PermissionChange.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, permissionship_); + } + 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.materialize.v0.PermissionChange)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.PermissionChange other = (com.authzed.api.materialize.v0.PermissionChange) obj; + + if (hasRevision() != other.hasRevision()) return false; + if (hasRevision()) { + if (!getRevision() + .equals(other.getRevision())) return false; + } + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (!getPermission() + .equals(other.getPermission())) return false; + if (hasSubject() != other.hasSubject()) return false; + if (hasSubject()) { + if (!getSubject() + .equals(other.getSubject())) return false; + } + if (permissionship_ != other.permissionship_) 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 (hasRevision()) { + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + getRevision().hashCode(); + } + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + if (hasSubject()) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().hashCode(); + } + hash = (37 * hash) + PERMISSIONSHIP_FIELD_NUMBER; + hash = (53 * hash) + permissionship_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.PermissionChange parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.PermissionChange 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.materialize.v0.PermissionChange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.PermissionChange 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.materialize.v0.PermissionChange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.PermissionChange parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.PermissionChange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.PermissionChange 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.materialize.v0.PermissionChange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.PermissionChange 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.materialize.v0.PermissionChange parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.PermissionChange 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.materialize.v0.PermissionChange 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.PermissionChange} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.PermissionChange) + com.authzed.api.materialize.v0.PermissionChangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_PermissionChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_PermissionChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.PermissionChange.class, com.authzed.api.materialize.v0.PermissionChange.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.PermissionChange.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + revision_ = null; + if (revisionBuilder_ != null) { + revisionBuilder_.dispose(); + revisionBuilder_ = null; + } + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + permission_ = ""; + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + permissionship_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_PermissionChange_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionChange getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.PermissionChange.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionChange build() { + com.authzed.api.materialize.v0.PermissionChange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionChange buildPartial() { + com.authzed.api.materialize.v0.PermissionChange result = new com.authzed.api.materialize.v0.PermissionChange(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.PermissionChange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.revision_ = revisionBuilder_ == null + ? revision_ + : revisionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resource_ = resourceBuilder_ == null + ? resource_ + : resourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permission_ = permission_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.subject_ = subjectBuilder_ == null + ? subject_ + : subjectBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.permissionship_ = permissionship_; + } + } + + @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.materialize.v0.PermissionChange) { + return mergeFrom((com.authzed.api.materialize.v0.PermissionChange)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.PermissionChange other) { + if (other == com.authzed.api.materialize.v0.PermissionChange.getDefaultInstance()) return this; + if (other.hasRevision()) { + mergeRevision(other.getRevision()); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasSubject()) { + mergeSubject(other.getSubject()); + } + if (other.permissionship_ != 0) { + setPermissionshipValue(other.getPermissionshipValue()); + } + 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( + getRevisionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getResourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + permission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getSubjectFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + permissionship_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + 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.ZedToken revision_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> revisionBuilder_; + /** + *
+     * revision represents the revision at which the change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + * @return Whether the revision field is set. + */ + public boolean hasRevision() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * revision represents the revision at which the change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + * @return The revision. + */ + public com.authzed.api.v1.ZedToken getRevision() { + if (revisionBuilder_ == null) { + return revision_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : revision_; + } else { + return revisionBuilder_.getMessage(); + } + } + /** + *
+     * revision represents the revision at which the change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + */ + public Builder setRevision(com.authzed.api.v1.ZedToken value) { + if (revisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revision_ = value; + } else { + revisionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * revision represents the revision at which the change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + */ + public Builder setRevision( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (revisionBuilder_ == null) { + revision_ = builderForValue.build(); + } else { + revisionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * revision represents the revision at which the change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + */ + public Builder mergeRevision(com.authzed.api.v1.ZedToken value) { + if (revisionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + revision_ != null && + revision_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getRevisionBuilder().mergeFrom(value); + } else { + revision_ = value; + } + } else { + revisionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * revision represents the revision at which the change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + */ + public Builder clearRevision() { + bitField0_ = (bitField0_ & ~0x00000001); + revision_ = null; + if (revisionBuilder_ != null) { + revisionBuilder_.dispose(); + revisionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * revision represents the revision at which the change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + */ + public com.authzed.api.v1.ZedToken.Builder getRevisionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRevisionFieldBuilder().getBuilder(); + } + /** + *
+     * revision represents the revision at which the change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getRevisionOrBuilder() { + if (revisionBuilder_ != null) { + return revisionBuilder_.getMessageOrBuilder(); + } else { + return revision_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : revision_; + } + } + /** + *
+     * revision represents the revision at which the change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getRevisionFieldBuilder() { + if (revisionBuilder_ == null) { + revisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getRevision(), + getParentForChildren(), + isClean()); + revision_ = null; + } + return revisionBuilder_; + } + + private com.authzed.api.v1.ObjectReference resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> resourceBuilder_; + /** + *
+     * resource is the resource that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * resource is the resource that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return The resource. + */ + public com.authzed.api.v1.ObjectReference getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+     * resource is the resource that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public Builder setResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + } else { + resourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public Builder setResource( + com.authzed.api.v1.ObjectReference.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public Builder mergeResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + resource_ != null && + resource_ != com.authzed.api.v1.ObjectReference.getDefaultInstance()) { + getResourceBuilder().mergeFrom(value); + } else { + resource_ = value; + } + } else { + resourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public Builder clearResource() { + bitField0_ = (bitField0_ & ~0x00000002); + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * resource is the resource that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public com.authzed.api.v1.ObjectReference.Builder getResourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+     * resource is the resource that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + } + /** + *
+     * resource is the resource that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private java.lang.Object permission_ = ""; + /** + *
+     * permission is the permission that has changed.
+     * 
+ * + * string permission = 3 [json_name = "permission"]; + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * permission is the permission that has changed.
+     * 
+ * + * string permission = 3 [json_name = "permission"]; + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * permission is the permission that has changed.
+     * 
+ * + * string permission = 3 [json_name = "permission"]; + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * permission is the permission that has changed.
+     * 
+ * + * string permission = 3 [json_name = "permission"]; + * @return This builder for chaining. + */ + public Builder clearPermission() { + permission_ = getDefaultInstance().getPermission(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * permission is the permission that has changed.
+     * 
+ * + * string permission = 3 [json_name = "permission"]; + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.authzed.api.v1.SubjectReference subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> subjectBuilder_; + /** + *
+     * subject is the subject that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + * @return Whether the subject field is set. + */ + public boolean hasSubject() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * subject is the subject that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + * @return The subject. + */ + public com.authzed.api.v1.SubjectReference getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } else { + return subjectBuilder_.getMessage(); + } + } + /** + *
+     * subject is the subject that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + */ + public Builder setSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subject_ = value; + } else { + subjectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject is the subject that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + */ + public Builder setSubject( + com.authzed.api.v1.SubjectReference.Builder builderForValue) { + if (subjectBuilder_ == null) { + subject_ = builderForValue.build(); + } else { + subjectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject is the subject that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + */ + public Builder mergeSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + subject_ != null && + subject_ != com.authzed.api.v1.SubjectReference.getDefaultInstance()) { + getSubjectBuilder().mergeFrom(value); + } else { + subject_ = value; + } + } else { + subjectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject is the subject that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + */ + public Builder clearSubject() { + bitField0_ = (bitField0_ & ~0x00000008); + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * subject is the subject that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + */ + public com.authzed.api.v1.SubjectReference.Builder getSubjectBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubjectFieldBuilder().getBuilder(); + } + /** + *
+     * subject is the subject that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + */ + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null ? + com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + } + /** + *
+     * subject is the subject that the permission change is related to.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder>( + getSubject(), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + private int permissionship_ = 0; + /** + *
+     * permissionship is the new permissionship of the subject over the resource after the change.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange.Permissionship permissionship = 5 [json_name = "permissionship"]; + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + *
+     * permissionship is the new permissionship of the subject over the resource after the change.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange.Permissionship permissionship = 5 [json_name = "permissionship"]; + * @param value The enum numeric value on the wire for permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionshipValue(int value) { + permissionship_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * permissionship is the new permissionship of the subject over the resource after the change.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange.Permissionship permissionship = 5 [json_name = "permissionship"]; + * @return The permissionship. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionChange.Permissionship getPermissionship() { + com.authzed.api.materialize.v0.PermissionChange.Permissionship result = com.authzed.api.materialize.v0.PermissionChange.Permissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.materialize.v0.PermissionChange.Permissionship.UNRECOGNIZED : result; + } + /** + *
+     * permissionship is the new permissionship of the subject over the resource after the change.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange.Permissionship permissionship = 5 [json_name = "permissionship"]; + * @param value The permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionship(com.authzed.api.materialize.v0.PermissionChange.Permissionship value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + permissionship_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * permissionship is the new permissionship of the subject over the resource after the change.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange.Permissionship permissionship = 5 [json_name = "permissionship"]; + * @return This builder for chaining. + */ + public Builder clearPermissionship() { + bitField0_ = (bitField0_ & ~0x00000010); + permissionship_ = 0; + 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.materialize.v0.PermissionChange) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.PermissionChange) + private static final com.authzed.api.materialize.v0.PermissionChange DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.PermissionChange(); + } + + public static com.authzed.api.materialize.v0.PermissionChange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PermissionChange 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.materialize.v0.PermissionChange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/PermissionChangeOrBuilder.java b/generated/com/authzed/api/materialize/v0/PermissionChangeOrBuilder.java new file mode 100644 index 00000000..08febc15 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/PermissionChangeOrBuilder.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissions.proto + +package com.authzed.api.materialize.v0; + +public interface PermissionChangeOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.PermissionChange) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * revision represents the revision at which the change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + * @return Whether the revision field is set. + */ + boolean hasRevision(); + /** + *
+   * revision represents the revision at which the change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + * @return The revision. + */ + com.authzed.api.v1.ZedToken getRevision(); + /** + *
+   * revision represents the revision at which the change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken revision = 1 [json_name = "revision"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getRevisionOrBuilder(); + + /** + *
+   * resource is the resource that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+   * resource is the resource that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return The resource. + */ + com.authzed.api.v1.ObjectReference getResource(); + /** + *
+   * resource is the resource that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder(); + + /** + *
+   * permission is the permission that has changed.
+   * 
+ * + * string permission = 3 [json_name = "permission"]; + * @return The permission. + */ + java.lang.String getPermission(); + /** + *
+   * permission is the permission that has changed.
+   * 
+ * + * string permission = 3 [json_name = "permission"]; + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + *
+   * subject is the subject that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + * @return Whether the subject field is set. + */ + boolean hasSubject(); + /** + *
+   * subject is the subject that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + * @return The subject. + */ + com.authzed.api.v1.SubjectReference getSubject(); + /** + *
+   * subject is the subject that the permission change is related to.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject"]; + */ + com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder(); + + /** + *
+   * permissionship is the new permissionship of the subject over the resource after the change.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionChange.Permissionship permissionship = 5 [json_name = "permissionship"]; + * @return The enum numeric value on the wire for permissionship. + */ + int getPermissionshipValue(); + /** + *
+   * permissionship is the new permissionship of the subject over the resource after the change.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionChange.Permissionship permissionship = 5 [json_name = "permissionship"]; + * @return The permissionship. + */ + com.authzed.api.materialize.v0.PermissionChange.Permissionship getPermissionship(); +} diff --git a/generated/com/authzed/api/materialize/v0/PermissionSetChange.java b/generated/com/authzed/api/materialize/v0/PermissionSetChange.java new file mode 100644 index 00000000..e80f38f3 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/PermissionSetChange.java @@ -0,0 +1,1691 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.PermissionSetChange} + */ +public final class PermissionSetChange extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.PermissionSetChange) + PermissionSetChangeOrBuilder { +private static final long serialVersionUID = 0L; + // Use PermissionSetChange.newBuilder() to construct. + private PermissionSetChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PermissionSetChange() { + operation_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PermissionSetChange(); + } + + @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.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_PermissionSetChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_PermissionSetChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.PermissionSetChange.class, com.authzed.api.materialize.v0.PermissionSetChange.Builder.class); + } + + /** + * Protobuf enum {@code authzed.api.materialize.v0.PermissionSetChange.SetOperation} + */ + public enum SetOperation + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SET_OPERATION_UNSPECIFIED = 0; + */ + SET_OPERATION_UNSPECIFIED(0), + /** + * SET_OPERATION_ADDED = 1; + */ + SET_OPERATION_ADDED(1), + /** + * SET_OPERATION_REMOVED = 2; + */ + SET_OPERATION_REMOVED(2), + UNRECOGNIZED(-1), + ; + + /** + * SET_OPERATION_UNSPECIFIED = 0; + */ + public static final int SET_OPERATION_UNSPECIFIED_VALUE = 0; + /** + * SET_OPERATION_ADDED = 1; + */ + public static final int SET_OPERATION_ADDED_VALUE = 1; + /** + * SET_OPERATION_REMOVED = 2; + */ + public static final int SET_OPERATION_REMOVED_VALUE = 2; + + + 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 SetOperation 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 SetOperation forNumber(int value) { + switch (value) { + case 0: return SET_OPERATION_UNSPECIFIED; + case 1: return SET_OPERATION_ADDED; + case 2: return SET_OPERATION_REMOVED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + SetOperation> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SetOperation findValueByNumber(int number) { + return SetOperation.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.materialize.v0.PermissionSetChange.getDescriptor().getEnumTypes().get(0); + } + + private static final SetOperation[] VALUES = values(); + + public static SetOperation 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 SetOperation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.materialize.v0.PermissionSetChange.SetOperation) + } + + private int childCase_ = 0; + private java.lang.Object child_; + public enum ChildCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CHILD_SET(4), + CHILD_MEMBER(5), + CHILD_NOT_SET(0); + private final int value; + private ChildCase(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 ChildCase valueOf(int value) { + return forNumber(value); + } + + public static ChildCase forNumber(int value) { + switch (value) { + case 4: return CHILD_SET; + case 5: return CHILD_MEMBER; + case 0: return CHILD_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ChildCase + getChildCase() { + return ChildCase.forNumber( + childCase_); + } + + public static final int AT_REVISION_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken atRevision_; + /** + *
+   * revision represents the revision at which the permission set change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + * @return Whether the atRevision field is set. + */ + @java.lang.Override + public boolean hasAtRevision() { + return atRevision_ != null; + } + /** + *
+   * revision represents the revision at which the permission set change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + * @return The atRevision. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getAtRevision() { + return atRevision_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : atRevision_; + } + /** + *
+   * revision represents the revision at which the permission set change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getAtRevisionOrBuilder() { + return atRevision_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : atRevision_; + } + + public static final int OPERATION_FIELD_NUMBER = 2; + private int operation_ = 0; + /** + *
+   * operation represents the type of set operation that took place as part of the change
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange.SetOperation operation = 2 [json_name = "operation"]; + * @return The enum numeric value on the wire for operation. + */ + @java.lang.Override public int getOperationValue() { + return operation_; + } + /** + *
+   * operation represents the type of set operation that took place as part of the change
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange.SetOperation operation = 2 [json_name = "operation"]; + * @return The operation. + */ + @java.lang.Override public com.authzed.api.materialize.v0.PermissionSetChange.SetOperation getOperation() { + com.authzed.api.materialize.v0.PermissionSetChange.SetOperation result = com.authzed.api.materialize.v0.PermissionSetChange.SetOperation.forNumber(operation_); + return result == null ? com.authzed.api.materialize.v0.PermissionSetChange.SetOperation.UNRECOGNIZED : result; + } + + public static final int PARENT_SET_FIELD_NUMBER = 3; + private com.authzed.api.materialize.v0.SetReference parentSet_; + /** + *
+   * parent_set represents the permission set parent of either another set or a member
+   * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + * @return Whether the parentSet field is set. + */ + @java.lang.Override + public boolean hasParentSet() { + return parentSet_ != null; + } + /** + *
+   * parent_set represents the permission set parent of either another set or a member
+   * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + * @return The parentSet. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.SetReference getParentSet() { + return parentSet_ == null ? com.authzed.api.materialize.v0.SetReference.getDefaultInstance() : parentSet_; + } + /** + *
+   * parent_set represents the permission set parent of either another set or a member
+   * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.SetReferenceOrBuilder getParentSetOrBuilder() { + return parentSet_ == null ? com.authzed.api.materialize.v0.SetReference.getDefaultInstance() : parentSet_; + } + + public static final int CHILD_SET_FIELD_NUMBER = 4; + /** + *
+   * child_set represents the scenario where another set is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + * @return Whether the childSet field is set. + */ + @java.lang.Override + public boolean hasChildSet() { + return childCase_ == 4; + } + /** + *
+   * child_set represents the scenario where another set is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + * @return The childSet. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.SetReference getChildSet() { + if (childCase_ == 4) { + return (com.authzed.api.materialize.v0.SetReference) child_; + } + return com.authzed.api.materialize.v0.SetReference.getDefaultInstance(); + } + /** + *
+   * child_set represents the scenario where another set is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.SetReferenceOrBuilder getChildSetOrBuilder() { + if (childCase_ == 4) { + return (com.authzed.api.materialize.v0.SetReference) child_; + } + return com.authzed.api.materialize.v0.SetReference.getDefaultInstance(); + } + + public static final int CHILD_MEMBER_FIELD_NUMBER = 5; + /** + *
+   * child_member represents the scenario where an specific object is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + * @return Whether the childMember field is set. + */ + @java.lang.Override + public boolean hasChildMember() { + return childCase_ == 5; + } + /** + *
+   * child_member represents the scenario where an specific object is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + * @return The childMember. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.MemberReference getChildMember() { + if (childCase_ == 5) { + return (com.authzed.api.materialize.v0.MemberReference) child_; + } + return com.authzed.api.materialize.v0.MemberReference.getDefaultInstance(); + } + /** + *
+   * child_member represents the scenario where an specific object is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.MemberReferenceOrBuilder getChildMemberOrBuilder() { + if (childCase_ == 5) { + return (com.authzed.api.materialize.v0.MemberReference) child_; + } + return com.authzed.api.materialize.v0.MemberReference.getDefaultInstance(); + } + + 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 (atRevision_ != null) { + output.writeMessage(1, getAtRevision()); + } + if (operation_ != com.authzed.api.materialize.v0.PermissionSetChange.SetOperation.SET_OPERATION_UNSPECIFIED.getNumber()) { + output.writeEnum(2, operation_); + } + if (parentSet_ != null) { + output.writeMessage(3, getParentSet()); + } + if (childCase_ == 4) { + output.writeMessage(4, (com.authzed.api.materialize.v0.SetReference) child_); + } + if (childCase_ == 5) { + output.writeMessage(5, (com.authzed.api.materialize.v0.MemberReference) child_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (atRevision_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAtRevision()); + } + if (operation_ != com.authzed.api.materialize.v0.PermissionSetChange.SetOperation.SET_OPERATION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, operation_); + } + if (parentSet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getParentSet()); + } + if (childCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.authzed.api.materialize.v0.SetReference) child_); + } + if (childCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.authzed.api.materialize.v0.MemberReference) child_); + } + 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.materialize.v0.PermissionSetChange)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.PermissionSetChange other = (com.authzed.api.materialize.v0.PermissionSetChange) obj; + + if (hasAtRevision() != other.hasAtRevision()) return false; + if (hasAtRevision()) { + if (!getAtRevision() + .equals(other.getAtRevision())) return false; + } + if (operation_ != other.operation_) return false; + if (hasParentSet() != other.hasParentSet()) return false; + if (hasParentSet()) { + if (!getParentSet() + .equals(other.getParentSet())) return false; + } + if (!getChildCase().equals(other.getChildCase())) return false; + switch (childCase_) { + case 4: + if (!getChildSet() + .equals(other.getChildSet())) return false; + break; + case 5: + if (!getChildMember() + .equals(other.getChildMember())) 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 (hasAtRevision()) { + hash = (37 * hash) + AT_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getAtRevision().hashCode(); + } + hash = (37 * hash) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + operation_; + if (hasParentSet()) { + hash = (37 * hash) + PARENT_SET_FIELD_NUMBER; + hash = (53 * hash) + getParentSet().hashCode(); + } + switch (childCase_) { + case 4: + hash = (37 * hash) + CHILD_SET_FIELD_NUMBER; + hash = (53 * hash) + getChildSet().hashCode(); + break; + case 5: + hash = (37 * hash) + CHILD_MEMBER_FIELD_NUMBER; + hash = (53 * hash) + getChildMember().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.PermissionSetChange parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.PermissionSetChange 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.materialize.v0.PermissionSetChange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.PermissionSetChange 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.materialize.v0.PermissionSetChange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.PermissionSetChange parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.PermissionSetChange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.PermissionSetChange 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.materialize.v0.PermissionSetChange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.PermissionSetChange 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.materialize.v0.PermissionSetChange parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.PermissionSetChange 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.materialize.v0.PermissionSetChange 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.PermissionSetChange} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.PermissionSetChange) + com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_PermissionSetChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_PermissionSetChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.PermissionSetChange.class, com.authzed.api.materialize.v0.PermissionSetChange.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.PermissionSetChange.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + atRevision_ = null; + if (atRevisionBuilder_ != null) { + atRevisionBuilder_.dispose(); + atRevisionBuilder_ = null; + } + operation_ = 0; + parentSet_ = null; + if (parentSetBuilder_ != null) { + parentSetBuilder_.dispose(); + parentSetBuilder_ = null; + } + if (childSetBuilder_ != null) { + childSetBuilder_.clear(); + } + if (childMemberBuilder_ != null) { + childMemberBuilder_.clear(); + } + childCase_ = 0; + child_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_PermissionSetChange_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionSetChange getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionSetChange build() { + com.authzed.api.materialize.v0.PermissionSetChange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionSetChange buildPartial() { + com.authzed.api.materialize.v0.PermissionSetChange result = new com.authzed.api.materialize.v0.PermissionSetChange(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.PermissionSetChange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.atRevision_ = atRevisionBuilder_ == null + ? atRevision_ + : atRevisionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.operation_ = operation_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.parentSet_ = parentSetBuilder_ == null + ? parentSet_ + : parentSetBuilder_.build(); + } + } + + private void buildPartialOneofs(com.authzed.api.materialize.v0.PermissionSetChange result) { + result.childCase_ = childCase_; + result.child_ = this.child_; + if (childCase_ == 4 && + childSetBuilder_ != null) { + result.child_ = childSetBuilder_.build(); + } + if (childCase_ == 5 && + childMemberBuilder_ != null) { + result.child_ = childMemberBuilder_.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.materialize.v0.PermissionSetChange) { + return mergeFrom((com.authzed.api.materialize.v0.PermissionSetChange)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.PermissionSetChange other) { + if (other == com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance()) return this; + if (other.hasAtRevision()) { + mergeAtRevision(other.getAtRevision()); + } + if (other.operation_ != 0) { + setOperationValue(other.getOperationValue()); + } + if (other.hasParentSet()) { + mergeParentSet(other.getParentSet()); + } + switch (other.getChildCase()) { + case CHILD_SET: { + mergeChildSet(other.getChildSet()); + break; + } + case CHILD_MEMBER: { + mergeChildMember(other.getChildMember()); + break; + } + case CHILD_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( + getAtRevisionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + operation_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getParentSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getChildSetFieldBuilder().getBuilder(), + extensionRegistry); + childCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getChildMemberFieldBuilder().getBuilder(), + extensionRegistry); + childCase_ = 5; + break; + } // case 42 + 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 childCase_ = 0; + private java.lang.Object child_; + public ChildCase + getChildCase() { + return ChildCase.forNumber( + childCase_); + } + + public Builder clearChild() { + childCase_ = 0; + child_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.authzed.api.v1.ZedToken atRevision_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> atRevisionBuilder_; + /** + *
+     * revision represents the revision at which the permission set change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + * @return Whether the atRevision field is set. + */ + public boolean hasAtRevision() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * revision represents the revision at which the permission set change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + * @return The atRevision. + */ + public com.authzed.api.v1.ZedToken getAtRevision() { + if (atRevisionBuilder_ == null) { + return atRevision_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : atRevision_; + } else { + return atRevisionBuilder_.getMessage(); + } + } + /** + *
+     * revision represents the revision at which the permission set change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + */ + public Builder setAtRevision(com.authzed.api.v1.ZedToken value) { + if (atRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + atRevision_ = value; + } else { + atRevisionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * revision represents the revision at which the permission set change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + */ + public Builder setAtRevision( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (atRevisionBuilder_ == null) { + atRevision_ = builderForValue.build(); + } else { + atRevisionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * revision represents the revision at which the permission set change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + */ + public Builder mergeAtRevision(com.authzed.api.v1.ZedToken value) { + if (atRevisionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + atRevision_ != null && + atRevision_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getAtRevisionBuilder().mergeFrom(value); + } else { + atRevision_ = value; + } + } else { + atRevisionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * revision represents the revision at which the permission set change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + */ + public Builder clearAtRevision() { + bitField0_ = (bitField0_ & ~0x00000001); + atRevision_ = null; + if (atRevisionBuilder_ != null) { + atRevisionBuilder_.dispose(); + atRevisionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * revision represents the revision at which the permission set change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + */ + public com.authzed.api.v1.ZedToken.Builder getAtRevisionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAtRevisionFieldBuilder().getBuilder(); + } + /** + *
+     * revision represents the revision at which the permission set change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getAtRevisionOrBuilder() { + if (atRevisionBuilder_ != null) { + return atRevisionBuilder_.getMessageOrBuilder(); + } else { + return atRevision_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : atRevision_; + } + } + /** + *
+     * revision represents the revision at which the permission set change occurred.
+     * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getAtRevisionFieldBuilder() { + if (atRevisionBuilder_ == null) { + atRevisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getAtRevision(), + getParentForChildren(), + isClean()); + atRevision_ = null; + } + return atRevisionBuilder_; + } + + private int operation_ = 0; + /** + *
+     * operation represents the type of set operation that took place as part of the change
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange.SetOperation operation = 2 [json_name = "operation"]; + * @return The enum numeric value on the wire for operation. + */ + @java.lang.Override public int getOperationValue() { + return operation_; + } + /** + *
+     * operation represents the type of set operation that took place as part of the change
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange.SetOperation operation = 2 [json_name = "operation"]; + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * operation represents the type of set operation that took place as part of the change
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange.SetOperation operation = 2 [json_name = "operation"]; + * @return The operation. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionSetChange.SetOperation getOperation() { + com.authzed.api.materialize.v0.PermissionSetChange.SetOperation result = com.authzed.api.materialize.v0.PermissionSetChange.SetOperation.forNumber(operation_); + return result == null ? com.authzed.api.materialize.v0.PermissionSetChange.SetOperation.UNRECOGNIZED : result; + } + /** + *
+     * operation represents the type of set operation that took place as part of the change
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange.SetOperation operation = 2 [json_name = "operation"]; + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation(com.authzed.api.materialize.v0.PermissionSetChange.SetOperation value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + operation_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * operation represents the type of set operation that took place as part of the change
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange.SetOperation operation = 2 [json_name = "operation"]; + * @return This builder for chaining. + */ + public Builder clearOperation() { + bitField0_ = (bitField0_ & ~0x00000002); + operation_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.materialize.v0.SetReference parentSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.SetReference, com.authzed.api.materialize.v0.SetReference.Builder, com.authzed.api.materialize.v0.SetReferenceOrBuilder> parentSetBuilder_; + /** + *
+     * parent_set represents the permission set parent of either another set or a member
+     * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + * @return Whether the parentSet field is set. + */ + public boolean hasParentSet() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * parent_set represents the permission set parent of either another set or a member
+     * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + * @return The parentSet. + */ + public com.authzed.api.materialize.v0.SetReference getParentSet() { + if (parentSetBuilder_ == null) { + return parentSet_ == null ? com.authzed.api.materialize.v0.SetReference.getDefaultInstance() : parentSet_; + } else { + return parentSetBuilder_.getMessage(); + } + } + /** + *
+     * parent_set represents the permission set parent of either another set or a member
+     * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + */ + public Builder setParentSet(com.authzed.api.materialize.v0.SetReference value) { + if (parentSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parentSet_ = value; + } else { + parentSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * parent_set represents the permission set parent of either another set or a member
+     * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + */ + public Builder setParentSet( + com.authzed.api.materialize.v0.SetReference.Builder builderForValue) { + if (parentSetBuilder_ == null) { + parentSet_ = builderForValue.build(); + } else { + parentSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * parent_set represents the permission set parent of either another set or a member
+     * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + */ + public Builder mergeParentSet(com.authzed.api.materialize.v0.SetReference value) { + if (parentSetBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + parentSet_ != null && + parentSet_ != com.authzed.api.materialize.v0.SetReference.getDefaultInstance()) { + getParentSetBuilder().mergeFrom(value); + } else { + parentSet_ = value; + } + } else { + parentSetBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * parent_set represents the permission set parent of either another set or a member
+     * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + */ + public Builder clearParentSet() { + bitField0_ = (bitField0_ & ~0x00000004); + parentSet_ = null; + if (parentSetBuilder_ != null) { + parentSetBuilder_.dispose(); + parentSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * parent_set represents the permission set parent of either another set or a member
+     * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + */ + public com.authzed.api.materialize.v0.SetReference.Builder getParentSetBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getParentSetFieldBuilder().getBuilder(); + } + /** + *
+     * parent_set represents the permission set parent of either another set or a member
+     * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + */ + public com.authzed.api.materialize.v0.SetReferenceOrBuilder getParentSetOrBuilder() { + if (parentSetBuilder_ != null) { + return parentSetBuilder_.getMessageOrBuilder(); + } else { + return parentSet_ == null ? + com.authzed.api.materialize.v0.SetReference.getDefaultInstance() : parentSet_; + } + } + /** + *
+     * parent_set represents the permission set parent of either another set or a member
+     * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.SetReference, com.authzed.api.materialize.v0.SetReference.Builder, com.authzed.api.materialize.v0.SetReferenceOrBuilder> + getParentSetFieldBuilder() { + if (parentSetBuilder_ == null) { + parentSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.SetReference, com.authzed.api.materialize.v0.SetReference.Builder, com.authzed.api.materialize.v0.SetReferenceOrBuilder>( + getParentSet(), + getParentForChildren(), + isClean()); + parentSet_ = null; + } + return parentSetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.SetReference, com.authzed.api.materialize.v0.SetReference.Builder, com.authzed.api.materialize.v0.SetReferenceOrBuilder> childSetBuilder_; + /** + *
+     * child_set represents the scenario where another set is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + * @return Whether the childSet field is set. + */ + @java.lang.Override + public boolean hasChildSet() { + return childCase_ == 4; + } + /** + *
+     * child_set represents the scenario where another set is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + * @return The childSet. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.SetReference getChildSet() { + if (childSetBuilder_ == null) { + if (childCase_ == 4) { + return (com.authzed.api.materialize.v0.SetReference) child_; + } + return com.authzed.api.materialize.v0.SetReference.getDefaultInstance(); + } else { + if (childCase_ == 4) { + return childSetBuilder_.getMessage(); + } + return com.authzed.api.materialize.v0.SetReference.getDefaultInstance(); + } + } + /** + *
+     * child_set represents the scenario where another set is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + */ + public Builder setChildSet(com.authzed.api.materialize.v0.SetReference value) { + if (childSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + child_ = value; + onChanged(); + } else { + childSetBuilder_.setMessage(value); + } + childCase_ = 4; + return this; + } + /** + *
+     * child_set represents the scenario where another set is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + */ + public Builder setChildSet( + com.authzed.api.materialize.v0.SetReference.Builder builderForValue) { + if (childSetBuilder_ == null) { + child_ = builderForValue.build(); + onChanged(); + } else { + childSetBuilder_.setMessage(builderForValue.build()); + } + childCase_ = 4; + return this; + } + /** + *
+     * child_set represents the scenario where another set is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + */ + public Builder mergeChildSet(com.authzed.api.materialize.v0.SetReference value) { + if (childSetBuilder_ == null) { + if (childCase_ == 4 && + child_ != com.authzed.api.materialize.v0.SetReference.getDefaultInstance()) { + child_ = com.authzed.api.materialize.v0.SetReference.newBuilder((com.authzed.api.materialize.v0.SetReference) child_) + .mergeFrom(value).buildPartial(); + } else { + child_ = value; + } + onChanged(); + } else { + if (childCase_ == 4) { + childSetBuilder_.mergeFrom(value); + } else { + childSetBuilder_.setMessage(value); + } + } + childCase_ = 4; + return this; + } + /** + *
+     * child_set represents the scenario where another set is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + */ + public Builder clearChildSet() { + if (childSetBuilder_ == null) { + if (childCase_ == 4) { + childCase_ = 0; + child_ = null; + onChanged(); + } + } else { + if (childCase_ == 4) { + childCase_ = 0; + child_ = null; + } + childSetBuilder_.clear(); + } + return this; + } + /** + *
+     * child_set represents the scenario where another set is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + */ + public com.authzed.api.materialize.v0.SetReference.Builder getChildSetBuilder() { + return getChildSetFieldBuilder().getBuilder(); + } + /** + *
+     * child_set represents the scenario where another set is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.SetReferenceOrBuilder getChildSetOrBuilder() { + if ((childCase_ == 4) && (childSetBuilder_ != null)) { + return childSetBuilder_.getMessageOrBuilder(); + } else { + if (childCase_ == 4) { + return (com.authzed.api.materialize.v0.SetReference) child_; + } + return com.authzed.api.materialize.v0.SetReference.getDefaultInstance(); + } + } + /** + *
+     * child_set represents the scenario where another set is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.SetReference, com.authzed.api.materialize.v0.SetReference.Builder, com.authzed.api.materialize.v0.SetReferenceOrBuilder> + getChildSetFieldBuilder() { + if (childSetBuilder_ == null) { + if (!(childCase_ == 4)) { + child_ = com.authzed.api.materialize.v0.SetReference.getDefaultInstance(); + } + childSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.SetReference, com.authzed.api.materialize.v0.SetReference.Builder, com.authzed.api.materialize.v0.SetReferenceOrBuilder>( + (com.authzed.api.materialize.v0.SetReference) child_, + getParentForChildren(), + isClean()); + child_ = null; + } + childCase_ = 4; + onChanged(); + return childSetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.MemberReference, com.authzed.api.materialize.v0.MemberReference.Builder, com.authzed.api.materialize.v0.MemberReferenceOrBuilder> childMemberBuilder_; + /** + *
+     * child_member represents the scenario where an specific object is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + * @return Whether the childMember field is set. + */ + @java.lang.Override + public boolean hasChildMember() { + return childCase_ == 5; + } + /** + *
+     * child_member represents the scenario where an specific object is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + * @return The childMember. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.MemberReference getChildMember() { + if (childMemberBuilder_ == null) { + if (childCase_ == 5) { + return (com.authzed.api.materialize.v0.MemberReference) child_; + } + return com.authzed.api.materialize.v0.MemberReference.getDefaultInstance(); + } else { + if (childCase_ == 5) { + return childMemberBuilder_.getMessage(); + } + return com.authzed.api.materialize.v0.MemberReference.getDefaultInstance(); + } + } + /** + *
+     * child_member represents the scenario where an specific object is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + */ + public Builder setChildMember(com.authzed.api.materialize.v0.MemberReference value) { + if (childMemberBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + child_ = value; + onChanged(); + } else { + childMemberBuilder_.setMessage(value); + } + childCase_ = 5; + return this; + } + /** + *
+     * child_member represents the scenario where an specific object is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + */ + public Builder setChildMember( + com.authzed.api.materialize.v0.MemberReference.Builder builderForValue) { + if (childMemberBuilder_ == null) { + child_ = builderForValue.build(); + onChanged(); + } else { + childMemberBuilder_.setMessage(builderForValue.build()); + } + childCase_ = 5; + return this; + } + /** + *
+     * child_member represents the scenario where an specific object is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + */ + public Builder mergeChildMember(com.authzed.api.materialize.v0.MemberReference value) { + if (childMemberBuilder_ == null) { + if (childCase_ == 5 && + child_ != com.authzed.api.materialize.v0.MemberReference.getDefaultInstance()) { + child_ = com.authzed.api.materialize.v0.MemberReference.newBuilder((com.authzed.api.materialize.v0.MemberReference) child_) + .mergeFrom(value).buildPartial(); + } else { + child_ = value; + } + onChanged(); + } else { + if (childCase_ == 5) { + childMemberBuilder_.mergeFrom(value); + } else { + childMemberBuilder_.setMessage(value); + } + } + childCase_ = 5; + return this; + } + /** + *
+     * child_member represents the scenario where an specific object is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + */ + public Builder clearChildMember() { + if (childMemberBuilder_ == null) { + if (childCase_ == 5) { + childCase_ = 0; + child_ = null; + onChanged(); + } + } else { + if (childCase_ == 5) { + childCase_ = 0; + child_ = null; + } + childMemberBuilder_.clear(); + } + return this; + } + /** + *
+     * child_member represents the scenario where an specific object is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + */ + public com.authzed.api.materialize.v0.MemberReference.Builder getChildMemberBuilder() { + return getChildMemberFieldBuilder().getBuilder(); + } + /** + *
+     * child_member represents the scenario where an specific object is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.MemberReferenceOrBuilder getChildMemberOrBuilder() { + if ((childCase_ == 5) && (childMemberBuilder_ != null)) { + return childMemberBuilder_.getMessageOrBuilder(); + } else { + if (childCase_ == 5) { + return (com.authzed.api.materialize.v0.MemberReference) child_; + } + return com.authzed.api.materialize.v0.MemberReference.getDefaultInstance(); + } + } + /** + *
+     * child_member represents the scenario where an specific object is considered member of the parent set
+     * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.MemberReference, com.authzed.api.materialize.v0.MemberReference.Builder, com.authzed.api.materialize.v0.MemberReferenceOrBuilder> + getChildMemberFieldBuilder() { + if (childMemberBuilder_ == null) { + if (!(childCase_ == 5)) { + child_ = com.authzed.api.materialize.v0.MemberReference.getDefaultInstance(); + } + childMemberBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.MemberReference, com.authzed.api.materialize.v0.MemberReference.Builder, com.authzed.api.materialize.v0.MemberReferenceOrBuilder>( + (com.authzed.api.materialize.v0.MemberReference) child_, + getParentForChildren(), + isClean()); + child_ = null; + } + childCase_ = 5; + onChanged(); + return childMemberBuilder_; + } + @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.materialize.v0.PermissionSetChange) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.PermissionSetChange) + private static final com.authzed.api.materialize.v0.PermissionSetChange DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.PermissionSetChange(); + } + + public static com.authzed.api.materialize.v0.PermissionSetChange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PermissionSetChange 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.materialize.v0.PermissionSetChange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/PermissionSetChangeOrBuilder.java b/generated/com/authzed/api/materialize/v0/PermissionSetChangeOrBuilder.java new file mode 100644 index 00000000..9e322665 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/PermissionSetChangeOrBuilder.java @@ -0,0 +1,138 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public interface PermissionSetChangeOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.PermissionSetChange) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * revision represents the revision at which the permission set change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + * @return Whether the atRevision field is set. + */ + boolean hasAtRevision(); + /** + *
+   * revision represents the revision at which the permission set change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + * @return The atRevision. + */ + com.authzed.api.v1.ZedToken getAtRevision(); + /** + *
+   * revision represents the revision at which the permission set change occurred.
+   * 
+ * + * .authzed.api.v1.ZedToken at_revision = 1 [json_name = "atRevision"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getAtRevisionOrBuilder(); + + /** + *
+   * operation represents the type of set operation that took place as part of the change
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange.SetOperation operation = 2 [json_name = "operation"]; + * @return The enum numeric value on the wire for operation. + */ + int getOperationValue(); + /** + *
+   * operation represents the type of set operation that took place as part of the change
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange.SetOperation operation = 2 [json_name = "operation"]; + * @return The operation. + */ + com.authzed.api.materialize.v0.PermissionSetChange.SetOperation getOperation(); + + /** + *
+   * parent_set represents the permission set parent of either another set or a member
+   * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + * @return Whether the parentSet field is set. + */ + boolean hasParentSet(); + /** + *
+   * parent_set represents the permission set parent of either another set or a member
+   * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + * @return The parentSet. + */ + com.authzed.api.materialize.v0.SetReference getParentSet(); + /** + *
+   * parent_set represents the permission set parent of either another set or a member
+   * 
+ * + * .authzed.api.materialize.v0.SetReference parent_set = 3 [json_name = "parentSet"]; + */ + com.authzed.api.materialize.v0.SetReferenceOrBuilder getParentSetOrBuilder(); + + /** + *
+   * child_set represents the scenario where another set is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + * @return Whether the childSet field is set. + */ + boolean hasChildSet(); + /** + *
+   * child_set represents the scenario where another set is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + * @return The childSet. + */ + com.authzed.api.materialize.v0.SetReference getChildSet(); + /** + *
+   * child_set represents the scenario where another set is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.SetReference child_set = 4 [json_name = "childSet"]; + */ + com.authzed.api.materialize.v0.SetReferenceOrBuilder getChildSetOrBuilder(); + + /** + *
+   * child_member represents the scenario where an specific object is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + * @return Whether the childMember field is set. + */ + boolean hasChildMember(); + /** + *
+   * child_member represents the scenario where an specific object is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + * @return The childMember. + */ + com.authzed.api.materialize.v0.MemberReference getChildMember(); + /** + *
+   * child_member represents the scenario where an specific object is considered member of the parent set
+   * 
+ * + * .authzed.api.materialize.v0.MemberReference child_member = 5 [json_name = "childMember"]; + */ + com.authzed.api.materialize.v0.MemberReferenceOrBuilder getChildMemberOrBuilder(); + + public com.authzed.api.materialize.v0.PermissionSetChange.ChildCase getChildCase(); +} diff --git a/generated/com/authzed/api/materialize/v0/SetReference.java b/generated/com/authzed/api/materialize/v0/SetReference.java new file mode 100644 index 00000000..7ccd2c93 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/SetReference.java @@ -0,0 +1,900 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.SetReference} + */ +public final class SetReference extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.SetReference) + SetReferenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use SetReference.newBuilder() to construct. + private SetReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SetReference() { + objectType_ = ""; + objectId_ = ""; + permissionOrRelation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SetReference(); + } + + @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.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_SetReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_SetReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.SetReference.class, com.authzed.api.materialize.v0.SetReference.Builder.class); + } + + public static final int OBJECT_TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object objectType_ = ""; + /** + *
+   * object_type is the type of object in a permission set
+   * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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; + } + } + /** + *
+   * object_type is the type of object in a permission set
+   * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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_ = ""; + /** + *
+   * object_id is the ID of a permission set
+   * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + } + /** + *
+   * object_id is the ID of a permission set
+   * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + } + + public static final int PERMISSION_OR_RELATION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object permissionOrRelation_ = ""; + /** + *
+   * permission_or_relation is the permission or relation referenced by this permission set
+   * 
+ * + * string permission_or_relation = 3 [json_name = "permissionOrRelation"]; + * @return The permissionOrRelation. + */ + @java.lang.Override + public java.lang.String getPermissionOrRelation() { + java.lang.Object ref = permissionOrRelation_; + 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(); + permissionOrRelation_ = s; + return s; + } + } + /** + *
+   * permission_or_relation is the permission or relation referenced by this permission set
+   * 
+ * + * string permission_or_relation = 3 [json_name = "permissionOrRelation"]; + * @return The bytes for permissionOrRelation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionOrRelationBytes() { + java.lang.Object ref = permissionOrRelation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permissionOrRelation_ = 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permissionOrRelation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, permissionOrRelation_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permissionOrRelation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, permissionOrRelation_); + } + 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.materialize.v0.SetReference)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.SetReference other = (com.authzed.api.materialize.v0.SetReference) obj; + + if (!getObjectType() + .equals(other.getObjectType())) return false; + if (!getObjectId() + .equals(other.getObjectId())) return false; + if (!getPermissionOrRelation() + .equals(other.getPermissionOrRelation())) 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 = (37 * hash) + PERMISSION_OR_RELATION_FIELD_NUMBER; + hash = (53 * hash) + getPermissionOrRelation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.SetReference parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.SetReference 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.materialize.v0.SetReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.SetReference 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.materialize.v0.SetReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.SetReference parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.SetReference parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.SetReference 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.materialize.v0.SetReference parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.SetReference 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.materialize.v0.SetReference parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.SetReference 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.materialize.v0.SetReference 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.SetReference} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.SetReference) + com.authzed.api.materialize.v0.SetReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_SetReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_SetReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.SetReference.class, com.authzed.api.materialize.v0.SetReference.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.SetReference.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_ = ""; + permissionOrRelation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_SetReference_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.SetReference getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.SetReference.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.SetReference build() { + com.authzed.api.materialize.v0.SetReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.SetReference buildPartial() { + com.authzed.api.materialize.v0.SetReference result = new com.authzed.api.materialize.v0.SetReference(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.SetReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.objectType_ = objectType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.objectId_ = objectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permissionOrRelation_ = permissionOrRelation_; + } + } + + @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.materialize.v0.SetReference) { + return mergeFrom((com.authzed.api.materialize.v0.SetReference)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.SetReference other) { + if (other == com.authzed.api.materialize.v0.SetReference.getDefaultInstance()) return this; + if (!other.getObjectType().isEmpty()) { + objectType_ = other.objectType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getObjectId().isEmpty()) { + objectId_ = other.objectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPermissionOrRelation().isEmpty()) { + permissionOrRelation_ = other.permissionOrRelation_; + bitField0_ |= 0x00000004; + 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 + case 26: { + permissionOrRelation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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_ = ""; + /** + *
+     * object_type is the type of object in a permission set
+     * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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; + } + } + /** + *
+     * object_type is the type of object in a permission set
+     * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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; + } + } + /** + *
+     * object_type is the type of object in a permission set
+     * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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; + } + /** + *
+     * object_type is the type of object in a permission set
+     * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @return This builder for chaining. + */ + public Builder clearObjectType() { + objectType_ = getDefaultInstance().getObjectType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * object_type is the type of object in a permission set
+     * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @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_ = ""; + /** + *
+     * object_id is the ID of a permission set
+     * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + } + /** + *
+     * object_id is the ID of a permission set
+     * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + } + /** + *
+     * object_id is the ID of a permission set
+     * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + /** + *
+     * object_id is the ID of a permission set
+     * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @return This builder for chaining. + */ + public Builder clearObjectId() { + objectId_ = getDefaultInstance().getObjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * object_id is the ID of a permission set
+     * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @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; + } + + private java.lang.Object permissionOrRelation_ = ""; + /** + *
+     * permission_or_relation is the permission or relation referenced by this permission set
+     * 
+ * + * string permission_or_relation = 3 [json_name = "permissionOrRelation"]; + * @return The permissionOrRelation. + */ + public java.lang.String getPermissionOrRelation() { + java.lang.Object ref = permissionOrRelation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permissionOrRelation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * permission_or_relation is the permission or relation referenced by this permission set
+     * 
+ * + * string permission_or_relation = 3 [json_name = "permissionOrRelation"]; + * @return The bytes for permissionOrRelation. + */ + public com.google.protobuf.ByteString + getPermissionOrRelationBytes() { + java.lang.Object ref = permissionOrRelation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permissionOrRelation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * permission_or_relation is the permission or relation referenced by this permission set
+     * 
+ * + * string permission_or_relation = 3 [json_name = "permissionOrRelation"]; + * @param value The permissionOrRelation to set. + * @return This builder for chaining. + */ + public Builder setPermissionOrRelation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permissionOrRelation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * permission_or_relation is the permission or relation referenced by this permission set
+     * 
+ * + * string permission_or_relation = 3 [json_name = "permissionOrRelation"]; + * @return This builder for chaining. + */ + public Builder clearPermissionOrRelation() { + permissionOrRelation_ = getDefaultInstance().getPermissionOrRelation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * permission_or_relation is the permission or relation referenced by this permission set
+     * 
+ * + * string permission_or_relation = 3 [json_name = "permissionOrRelation"]; + * @param value The bytes for permissionOrRelation to set. + * @return This builder for chaining. + */ + public Builder setPermissionOrRelationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permissionOrRelation_ = value; + bitField0_ |= 0x00000004; + 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.materialize.v0.SetReference) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.SetReference) + private static final com.authzed.api.materialize.v0.SetReference DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.SetReference(); + } + + public static com.authzed.api.materialize.v0.SetReference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetReference 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.materialize.v0.SetReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/SetReferenceOrBuilder.java b/generated/com/authzed/api/materialize/v0/SetReferenceOrBuilder.java new file mode 100644 index 00000000..2a7ae9ed --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/SetReferenceOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public interface SetReferenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.SetReference) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * object_type is the type of object in a permission set
+   * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @return The objectType. + */ + java.lang.String getObjectType(); + /** + *
+   * object_type is the type of object in a permission set
+   * 
+ * + * string object_type = 1 [json_name = "objectType"]; + * @return The bytes for objectType. + */ + com.google.protobuf.ByteString + getObjectTypeBytes(); + + /** + *
+   * object_id is the ID of a permission set
+   * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @return The objectId. + */ + java.lang.String getObjectId(); + /** + *
+   * object_id is the ID of a permission set
+   * 
+ * + * string object_id = 2 [json_name = "objectId"]; + * @return The bytes for objectId. + */ + com.google.protobuf.ByteString + getObjectIdBytes(); + + /** + *
+   * permission_or_relation is the permission or relation referenced by this permission set
+   * 
+ * + * string permission_or_relation = 3 [json_name = "permissionOrRelation"]; + * @return The permissionOrRelation. + */ + java.lang.String getPermissionOrRelation(); + /** + *
+   * permission_or_relation is the permission or relation referenced by this permission set
+   * 
+ * + * string permission_or_relation = 3 [json_name = "permissionOrRelation"]; + * @return The bytes for permissionOrRelation. + */ + com.google.protobuf.ByteString + getPermissionOrRelationBytes(); +} diff --git a/generated/com/authzed/api/materialize/v0/WatchPermissionSetsRequest.java b/generated/com/authzed/api/materialize/v0/WatchPermissionSetsRequest.java new file mode 100644 index 00000000..df08e17a --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchPermissionSetsRequest.java @@ -0,0 +1,649 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.WatchPermissionSetsRequest} + */ +public final class WatchPermissionSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.WatchPermissionSetsRequest) + WatchPermissionSetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use WatchPermissionSetsRequest.newBuilder() to construct. + private WatchPermissionSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WatchPermissionSetsRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WatchPermissionSetsRequest(); + } + + @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.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_WatchPermissionSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_WatchPermissionSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.WatchPermissionSetsRequest.class, com.authzed.api.materialize.v0.WatchPermissionSetsRequest.Builder.class); + } + + public static final int OPTIONAL_STARTING_AFTER_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken optionalStartingAfter_; + /** + *
+   * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+   * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + * @return Whether the optionalStartingAfter field is set. + */ + @java.lang.Override + public boolean hasOptionalStartingAfter() { + return optionalStartingAfter_ != null; + } + /** + *
+   * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+   * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + * @return The optionalStartingAfter. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getOptionalStartingAfter() { + return optionalStartingAfter_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartingAfter_; + } + /** + *
+   * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+   * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartingAfterOrBuilder() { + return optionalStartingAfter_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartingAfter_; + } + + 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 (optionalStartingAfter_ != null) { + output.writeMessage(1, getOptionalStartingAfter()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (optionalStartingAfter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getOptionalStartingAfter()); + } + 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.materialize.v0.WatchPermissionSetsRequest)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.WatchPermissionSetsRequest other = (com.authzed.api.materialize.v0.WatchPermissionSetsRequest) obj; + + if (hasOptionalStartingAfter() != other.hasOptionalStartingAfter()) return false; + if (hasOptionalStartingAfter()) { + if (!getOptionalStartingAfter() + .equals(other.getOptionalStartingAfter())) 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 (hasOptionalStartingAfter()) { + hash = (37 * hash) + OPTIONAL_STARTING_AFTER_FIELD_NUMBER; + hash = (53 * hash) + getOptionalStartingAfter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.WatchPermissionSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsRequest 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.materialize.v0.WatchPermissionSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsRequest 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.materialize.v0.WatchPermissionSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsRequest 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.materialize.v0.WatchPermissionSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsRequest 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.materialize.v0.WatchPermissionSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsRequest 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.materialize.v0.WatchPermissionSetsRequest 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.WatchPermissionSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.WatchPermissionSetsRequest) + com.authzed.api.materialize.v0.WatchPermissionSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_WatchPermissionSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_WatchPermissionSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.WatchPermissionSetsRequest.class, com.authzed.api.materialize.v0.WatchPermissionSetsRequest.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.WatchPermissionSetsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + optionalStartingAfter_ = null; + if (optionalStartingAfterBuilder_ != null) { + optionalStartingAfterBuilder_.dispose(); + optionalStartingAfterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_WatchPermissionSetsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionSetsRequest getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.WatchPermissionSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionSetsRequest build() { + com.authzed.api.materialize.v0.WatchPermissionSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionSetsRequest buildPartial() { + com.authzed.api.materialize.v0.WatchPermissionSetsRequest result = new com.authzed.api.materialize.v0.WatchPermissionSetsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.WatchPermissionSetsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.optionalStartingAfter_ = optionalStartingAfterBuilder_ == null + ? optionalStartingAfter_ + : optionalStartingAfterBuilder_.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.materialize.v0.WatchPermissionSetsRequest) { + return mergeFrom((com.authzed.api.materialize.v0.WatchPermissionSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.WatchPermissionSetsRequest other) { + if (other == com.authzed.api.materialize.v0.WatchPermissionSetsRequest.getDefaultInstance()) return this; + if (other.hasOptionalStartingAfter()) { + mergeOptionalStartingAfter(other.getOptionalStartingAfter()); + } + 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( + getOptionalStartingAfterFieldBuilder().getBuilder(), + extensionRegistry); + 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 com.authzed.api.v1.ZedToken optionalStartingAfter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> optionalStartingAfterBuilder_; + /** + *
+     * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+     * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + * @return Whether the optionalStartingAfter field is set. + */ + public boolean hasOptionalStartingAfter() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+     * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + * @return The optionalStartingAfter. + */ + public com.authzed.api.v1.ZedToken getOptionalStartingAfter() { + if (optionalStartingAfterBuilder_ == null) { + return optionalStartingAfter_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartingAfter_; + } else { + return optionalStartingAfterBuilder_.getMessage(); + } + } + /** + *
+     * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+     * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + */ + public Builder setOptionalStartingAfter(com.authzed.api.v1.ZedToken value) { + if (optionalStartingAfterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalStartingAfter_ = value; + } else { + optionalStartingAfterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+     * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + */ + public Builder setOptionalStartingAfter( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (optionalStartingAfterBuilder_ == null) { + optionalStartingAfter_ = builderForValue.build(); + } else { + optionalStartingAfterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+     * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + */ + public Builder mergeOptionalStartingAfter(com.authzed.api.v1.ZedToken value) { + if (optionalStartingAfterBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + optionalStartingAfter_ != null && + optionalStartingAfter_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getOptionalStartingAfterBuilder().mergeFrom(value); + } else { + optionalStartingAfter_ = value; + } + } else { + optionalStartingAfterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+     * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + */ + public Builder clearOptionalStartingAfter() { + bitField0_ = (bitField0_ & ~0x00000001); + optionalStartingAfter_ = null; + if (optionalStartingAfterBuilder_ != null) { + optionalStartingAfterBuilder_.dispose(); + optionalStartingAfterBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+     * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + */ + public com.authzed.api.v1.ZedToken.Builder getOptionalStartingAfterBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOptionalStartingAfterFieldBuilder().getBuilder(); + } + /** + *
+     * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+     * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartingAfterOrBuilder() { + if (optionalStartingAfterBuilder_ != null) { + return optionalStartingAfterBuilder_.getMessageOrBuilder(); + } else { + return optionalStartingAfter_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartingAfter_; + } + } + /** + *
+     * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+     * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getOptionalStartingAfterFieldBuilder() { + if (optionalStartingAfterBuilder_ == null) { + optionalStartingAfterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getOptionalStartingAfter(), + getParentForChildren(), + isClean()); + optionalStartingAfter_ = null; + } + return optionalStartingAfterBuilder_; + } + @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.materialize.v0.WatchPermissionSetsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.WatchPermissionSetsRequest) + private static final com.authzed.api.materialize.v0.WatchPermissionSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.WatchPermissionSetsRequest(); + } + + public static com.authzed.api.materialize.v0.WatchPermissionSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WatchPermissionSetsRequest 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.materialize.v0.WatchPermissionSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/WatchPermissionSetsRequestOrBuilder.java b/generated/com/authzed/api/materialize/v0/WatchPermissionSetsRequestOrBuilder.java new file mode 100644 index 00000000..956e3f81 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchPermissionSetsRequestOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public interface WatchPermissionSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.WatchPermissionSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+   * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + * @return Whether the optionalStartingAfter field is set. + */ + boolean hasOptionalStartingAfter(); + /** + *
+   * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+   * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + * @return The optionalStartingAfter. + */ + com.authzed.api.v1.ZedToken getOptionalStartingAfter(); + /** + *
+   * optional_starting_after is used to specify the SpiceDB revision to start watching from.
+   * If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 1 [json_name = "optionalStartingAfter"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartingAfterOrBuilder(); +} diff --git a/generated/com/authzed/api/materialize/v0/WatchPermissionSetsResponse.java b/generated/com/authzed/api/materialize/v0/WatchPermissionSetsResponse.java new file mode 100644 index 00000000..b680b77c --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchPermissionSetsResponse.java @@ -0,0 +1,1638 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.WatchPermissionSetsResponse} + */ +public final class WatchPermissionSetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.WatchPermissionSetsResponse) + WatchPermissionSetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use WatchPermissionSetsResponse.newBuilder() to construct. + private WatchPermissionSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WatchPermissionSetsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WatchPermissionSetsResponse(); + } + + @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.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_WatchPermissionSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_WatchPermissionSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.WatchPermissionSetsResponse.class, com.authzed.api.materialize.v0.WatchPermissionSetsResponse.Builder.class); + } + + private int responseCase_ = 0; + private java.lang.Object response_; + public enum ResponseCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CHANGE(1), + COMPLETED_REVISION(2), + LOOKUP_PERMISSION_SETS_REQUIRED(3), + BREAKING_SCHEMA_CHANGE(4), + RESPONSE_NOT_SET(0); + private final int value; + private ResponseCase(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 ResponseCase valueOf(int value) { + return forNumber(value); + } + + public static ResponseCase forNumber(int value) { + switch (value) { + case 1: return CHANGE; + case 2: return COMPLETED_REVISION; + case 3: return LOOKUP_PERMISSION_SETS_REQUIRED; + case 4: return BREAKING_SCHEMA_CHANGE; + case 0: return RESPONSE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public static final int CHANGE_FIELD_NUMBER = 1; + /** + *
+   * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the permission sets in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+   * changes originating from that revision completed.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return Whether the change field is set. + */ + @java.lang.Override + public boolean hasChange() { + return responseCase_ == 1; + } + /** + *
+   * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the permission sets in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+   * changes originating from that revision completed.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return The change. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionSetChange getChange() { + if (responseCase_ == 1) { + return (com.authzed.api.materialize.v0.PermissionSetChange) response_; + } + return com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance(); + } + /** + *
+   * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the permission sets in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+   * changes originating from that revision completed.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder getChangeOrBuilder() { + if (responseCase_ == 1) { + return (com.authzed.api.materialize.v0.PermissionSetChange) response_; + } + return com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance(); + } + + public static final int COMPLETED_REVISION_FIELD_NUMBER = 2; + /** + *
+   * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the permission sets
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return Whether the completedRevision field is set. + */ + @java.lang.Override + public boolean hasCompletedRevision() { + return responseCase_ == 2; + } + /** + *
+   * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the permission sets
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return The completedRevision. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getCompletedRevision() { + if (responseCase_ == 2) { + return (com.authzed.api.v1.ZedToken) response_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + /** + *
+   * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the permission sets
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getCompletedRevisionOrBuilder() { + if (responseCase_ == 2) { + return (com.authzed.api.v1.ZedToken) response_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + + public static final int LOOKUP_PERMISSION_SETS_REQUIRED_FIELD_NUMBER = 3; + /** + *
+   * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+   * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+   * cluster has seen its schema changed.
+   * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + * @return Whether the lookupPermissionSetsRequired field is set. + */ + @java.lang.Override + public boolean hasLookupPermissionSetsRequired() { + return responseCase_ == 3; + } + /** + *
+   * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+   * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+   * cluster has seen its schema changed.
+   * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + * @return The lookupPermissionSetsRequired. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsRequired getLookupPermissionSetsRequired() { + if (responseCase_ == 3) { + return (com.authzed.api.materialize.v0.LookupPermissionSetsRequired) response_; + } + return com.authzed.api.materialize.v0.LookupPermissionSetsRequired.getDefaultInstance(); + } + /** + *
+   * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+   * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+   * cluster has seen its schema changed.
+   * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsRequiredOrBuilder getLookupPermissionSetsRequiredOrBuilder() { + if (responseCase_ == 3) { + return (com.authzed.api.materialize.v0.LookupPermissionSetsRequired) response_; + } + return com.authzed.api.materialize.v0.LookupPermissionSetsRequired.getDefaultInstance(); + } + + public static final int BREAKING_SCHEMA_CHANGE_FIELD_NUMBER = 4; + /** + *
+   * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+   * and that the consumer should expect delays in the ingestion of new changes,
+   * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+   * will receive a LookupPermissionSetsRequired event.
+   * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + * @return Whether the breakingSchemaChange field is set. + */ + @java.lang.Override + public boolean hasBreakingSchemaChange() { + return responseCase_ == 4; + } + /** + *
+   * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+   * and that the consumer should expect delays in the ingestion of new changes,
+   * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+   * will receive a LookupPermissionSetsRequired event.
+   * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + * @return The breakingSchemaChange. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.BreakingSchemaChange getBreakingSchemaChange() { + if (responseCase_ == 4) { + return (com.authzed.api.materialize.v0.BreakingSchemaChange) response_; + } + return com.authzed.api.materialize.v0.BreakingSchemaChange.getDefaultInstance(); + } + /** + *
+   * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+   * and that the consumer should expect delays in the ingestion of new changes,
+   * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+   * will receive a LookupPermissionSetsRequired event.
+   * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.BreakingSchemaChangeOrBuilder getBreakingSchemaChangeOrBuilder() { + if (responseCase_ == 4) { + return (com.authzed.api.materialize.v0.BreakingSchemaChange) response_; + } + return com.authzed.api.materialize.v0.BreakingSchemaChange.getDefaultInstance(); + } + + 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 (responseCase_ == 1) { + output.writeMessage(1, (com.authzed.api.materialize.v0.PermissionSetChange) response_); + } + if (responseCase_ == 2) { + output.writeMessage(2, (com.authzed.api.v1.ZedToken) response_); + } + if (responseCase_ == 3) { + output.writeMessage(3, (com.authzed.api.materialize.v0.LookupPermissionSetsRequired) response_); + } + if (responseCase_ == 4) { + output.writeMessage(4, (com.authzed.api.materialize.v0.BreakingSchemaChange) response_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (responseCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.authzed.api.materialize.v0.PermissionSetChange) response_); + } + if (responseCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.authzed.api.v1.ZedToken) response_); + } + if (responseCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.authzed.api.materialize.v0.LookupPermissionSetsRequired) response_); + } + if (responseCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.authzed.api.materialize.v0.BreakingSchemaChange) response_); + } + 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.materialize.v0.WatchPermissionSetsResponse)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.WatchPermissionSetsResponse other = (com.authzed.api.materialize.v0.WatchPermissionSetsResponse) obj; + + if (!getResponseCase().equals(other.getResponseCase())) return false; + switch (responseCase_) { + case 1: + if (!getChange() + .equals(other.getChange())) return false; + break; + case 2: + if (!getCompletedRevision() + .equals(other.getCompletedRevision())) return false; + break; + case 3: + if (!getLookupPermissionSetsRequired() + .equals(other.getLookupPermissionSetsRequired())) return false; + break; + case 4: + if (!getBreakingSchemaChange() + .equals(other.getBreakingSchemaChange())) 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(); + switch (responseCase_) { + case 1: + hash = (37 * hash) + CHANGE_FIELD_NUMBER; + hash = (53 * hash) + getChange().hashCode(); + break; + case 2: + hash = (37 * hash) + COMPLETED_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getCompletedRevision().hashCode(); + break; + case 3: + hash = (37 * hash) + LOOKUP_PERMISSION_SETS_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + getLookupPermissionSetsRequired().hashCode(); + break; + case 4: + hash = (37 * hash) + BREAKING_SCHEMA_CHANGE_FIELD_NUMBER; + hash = (53 * hash) + getBreakingSchemaChange().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.WatchPermissionSetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsResponse 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.materialize.v0.WatchPermissionSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsResponse 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.materialize.v0.WatchPermissionSetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsResponse 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.materialize.v0.WatchPermissionSetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsResponse 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.materialize.v0.WatchPermissionSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionSetsResponse 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.materialize.v0.WatchPermissionSetsResponse 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.WatchPermissionSetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.WatchPermissionSetsResponse) + com.authzed.api.materialize.v0.WatchPermissionSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_WatchPermissionSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_WatchPermissionSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.WatchPermissionSetsResponse.class, com.authzed.api.materialize.v0.WatchPermissionSetsResponse.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.WatchPermissionSetsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (changeBuilder_ != null) { + changeBuilder_.clear(); + } + if (completedRevisionBuilder_ != null) { + completedRevisionBuilder_.clear(); + } + if (lookupPermissionSetsRequiredBuilder_ != null) { + lookupPermissionSetsRequiredBuilder_.clear(); + } + if (breakingSchemaChangeBuilder_ != null) { + breakingSchemaChangeBuilder_.clear(); + } + responseCase_ = 0; + response_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissionsets.internal_static_authzed_api_materialize_v0_WatchPermissionSetsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionSetsResponse getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.WatchPermissionSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionSetsResponse build() { + com.authzed.api.materialize.v0.WatchPermissionSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionSetsResponse buildPartial() { + com.authzed.api.materialize.v0.WatchPermissionSetsResponse result = new com.authzed.api.materialize.v0.WatchPermissionSetsResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.WatchPermissionSetsResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.authzed.api.materialize.v0.WatchPermissionSetsResponse result) { + result.responseCase_ = responseCase_; + result.response_ = this.response_; + if (responseCase_ == 1 && + changeBuilder_ != null) { + result.response_ = changeBuilder_.build(); + } + if (responseCase_ == 2 && + completedRevisionBuilder_ != null) { + result.response_ = completedRevisionBuilder_.build(); + } + if (responseCase_ == 3 && + lookupPermissionSetsRequiredBuilder_ != null) { + result.response_ = lookupPermissionSetsRequiredBuilder_.build(); + } + if (responseCase_ == 4 && + breakingSchemaChangeBuilder_ != null) { + result.response_ = breakingSchemaChangeBuilder_.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.materialize.v0.WatchPermissionSetsResponse) { + return mergeFrom((com.authzed.api.materialize.v0.WatchPermissionSetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.WatchPermissionSetsResponse other) { + if (other == com.authzed.api.materialize.v0.WatchPermissionSetsResponse.getDefaultInstance()) return this; + switch (other.getResponseCase()) { + case CHANGE: { + mergeChange(other.getChange()); + break; + } + case COMPLETED_REVISION: { + mergeCompletedRevision(other.getCompletedRevision()); + break; + } + case LOOKUP_PERMISSION_SETS_REQUIRED: { + mergeLookupPermissionSetsRequired(other.getLookupPermissionSetsRequired()); + break; + } + case BREAKING_SCHEMA_CHANGE: { + mergeBreakingSchemaChange(other.getBreakingSchemaChange()); + break; + } + case RESPONSE_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( + getChangeFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + getCompletedRevisionFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getLookupPermissionSetsRequiredFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getBreakingSchemaChangeFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 4; + 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 responseCase_ = 0; + private java.lang.Object response_; + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public Builder clearResponse() { + responseCase_ = 0; + response_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.PermissionSetChange, com.authzed.api.materialize.v0.PermissionSetChange.Builder, com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder> changeBuilder_; + /** + *
+     * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the permission sets in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+     * changes originating from that revision completed.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return Whether the change field is set. + */ + @java.lang.Override + public boolean hasChange() { + return responseCase_ == 1; + } + /** + *
+     * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the permission sets in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+     * changes originating from that revision completed.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return The change. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionSetChange getChange() { + if (changeBuilder_ == null) { + if (responseCase_ == 1) { + return (com.authzed.api.materialize.v0.PermissionSetChange) response_; + } + return com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance(); + } else { + if (responseCase_ == 1) { + return changeBuilder_.getMessage(); + } + return com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance(); + } + } + /** + *
+     * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the permission sets in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+     * changes originating from that revision completed.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public Builder setChange(com.authzed.api.materialize.v0.PermissionSetChange value) { + if (changeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + changeBuilder_.setMessage(value); + } + responseCase_ = 1; + return this; + } + /** + *
+     * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the permission sets in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+     * changes originating from that revision completed.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public Builder setChange( + com.authzed.api.materialize.v0.PermissionSetChange.Builder builderForValue) { + if (changeBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + changeBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 1; + return this; + } + /** + *
+     * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the permission sets in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+     * changes originating from that revision completed.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public Builder mergeChange(com.authzed.api.materialize.v0.PermissionSetChange value) { + if (changeBuilder_ == null) { + if (responseCase_ == 1 && + response_ != com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance()) { + response_ = com.authzed.api.materialize.v0.PermissionSetChange.newBuilder((com.authzed.api.materialize.v0.PermissionSetChange) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 1) { + changeBuilder_.mergeFrom(value); + } else { + changeBuilder_.setMessage(value); + } + } + responseCase_ = 1; + return this; + } + /** + *
+     * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the permission sets in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+     * changes originating from that revision completed.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public Builder clearChange() { + if (changeBuilder_ == null) { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + } + changeBuilder_.clear(); + } + return this; + } + /** + *
+     * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the permission sets in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+     * changes originating from that revision completed.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + public com.authzed.api.materialize.v0.PermissionSetChange.Builder getChangeBuilder() { + return getChangeFieldBuilder().getBuilder(); + } + /** + *
+     * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the permission sets in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+     * changes originating from that revision completed.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder getChangeOrBuilder() { + if ((responseCase_ == 1) && (changeBuilder_ != null)) { + return changeBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 1) { + return (com.authzed.api.materialize.v0.PermissionSetChange) response_; + } + return com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance(); + } + } + /** + *
+     * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the permission sets in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+     * changes originating from that revision completed.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.PermissionSetChange, com.authzed.api.materialize.v0.PermissionSetChange.Builder, com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder> + getChangeFieldBuilder() { + if (changeBuilder_ == null) { + if (!(responseCase_ == 1)) { + response_ = com.authzed.api.materialize.v0.PermissionSetChange.getDefaultInstance(); + } + changeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.PermissionSetChange, com.authzed.api.materialize.v0.PermissionSetChange.Builder, com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder>( + (com.authzed.api.materialize.v0.PermissionSetChange) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 1; + onChanged(); + return changeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> completedRevisionBuilder_; + /** + *
+     * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the permission sets
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return Whether the completedRevision field is set. + */ + @java.lang.Override + public boolean hasCompletedRevision() { + return responseCase_ == 2; + } + /** + *
+     * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the permission sets
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return The completedRevision. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getCompletedRevision() { + if (completedRevisionBuilder_ == null) { + if (responseCase_ == 2) { + return (com.authzed.api.v1.ZedToken) response_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } else { + if (responseCase_ == 2) { + return completedRevisionBuilder_.getMessage(); + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + } + /** + *
+     * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the permission sets
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + public Builder setCompletedRevision(com.authzed.api.v1.ZedToken value) { + if (completedRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + completedRevisionBuilder_.setMessage(value); + } + responseCase_ = 2; + return this; + } + /** + *
+     * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the permission sets
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + public Builder setCompletedRevision( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (completedRevisionBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + completedRevisionBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 2; + return this; + } + /** + *
+     * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the permission sets
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + public Builder mergeCompletedRevision(com.authzed.api.v1.ZedToken value) { + if (completedRevisionBuilder_ == null) { + if (responseCase_ == 2 && + response_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + response_ = com.authzed.api.v1.ZedToken.newBuilder((com.authzed.api.v1.ZedToken) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 2) { + completedRevisionBuilder_.mergeFrom(value); + } else { + completedRevisionBuilder_.setMessage(value); + } + } + responseCase_ = 2; + return this; + } + /** + *
+     * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the permission sets
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + public Builder clearCompletedRevision() { + if (completedRevisionBuilder_ == null) { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + } + completedRevisionBuilder_.clear(); + } + return this; + } + /** + *
+     * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the permission sets
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + public com.authzed.api.v1.ZedToken.Builder getCompletedRevisionBuilder() { + return getCompletedRevisionFieldBuilder().getBuilder(); + } + /** + *
+     * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the permission sets
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getCompletedRevisionOrBuilder() { + if ((responseCase_ == 2) && (completedRevisionBuilder_ != null)) { + return completedRevisionBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 2) { + return (com.authzed.api.v1.ZedToken) response_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + } + /** + *
+     * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the permission sets
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getCompletedRevisionFieldBuilder() { + if (completedRevisionBuilder_ == null) { + if (!(responseCase_ == 2)) { + response_ = com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + completedRevisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + (com.authzed.api.v1.ZedToken) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 2; + onChanged(); + return completedRevisionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.LookupPermissionSetsRequired, com.authzed.api.materialize.v0.LookupPermissionSetsRequired.Builder, com.authzed.api.materialize.v0.LookupPermissionSetsRequiredOrBuilder> lookupPermissionSetsRequiredBuilder_; + /** + *
+     * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+     * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+     * cluster has seen its schema changed.
+     * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + * @return Whether the lookupPermissionSetsRequired field is set. + */ + @java.lang.Override + public boolean hasLookupPermissionSetsRequired() { + return responseCase_ == 3; + } + /** + *
+     * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+     * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+     * cluster has seen its schema changed.
+     * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + * @return The lookupPermissionSetsRequired. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsRequired getLookupPermissionSetsRequired() { + if (lookupPermissionSetsRequiredBuilder_ == null) { + if (responseCase_ == 3) { + return (com.authzed.api.materialize.v0.LookupPermissionSetsRequired) response_; + } + return com.authzed.api.materialize.v0.LookupPermissionSetsRequired.getDefaultInstance(); + } else { + if (responseCase_ == 3) { + return lookupPermissionSetsRequiredBuilder_.getMessage(); + } + return com.authzed.api.materialize.v0.LookupPermissionSetsRequired.getDefaultInstance(); + } + } + /** + *
+     * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+     * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+     * cluster has seen its schema changed.
+     * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + */ + public Builder setLookupPermissionSetsRequired(com.authzed.api.materialize.v0.LookupPermissionSetsRequired value) { + if (lookupPermissionSetsRequiredBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + lookupPermissionSetsRequiredBuilder_.setMessage(value); + } + responseCase_ = 3; + return this; + } + /** + *
+     * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+     * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+     * cluster has seen its schema changed.
+     * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + */ + public Builder setLookupPermissionSetsRequired( + com.authzed.api.materialize.v0.LookupPermissionSetsRequired.Builder builderForValue) { + if (lookupPermissionSetsRequiredBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + lookupPermissionSetsRequiredBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 3; + return this; + } + /** + *
+     * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+     * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+     * cluster has seen its schema changed.
+     * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + */ + public Builder mergeLookupPermissionSetsRequired(com.authzed.api.materialize.v0.LookupPermissionSetsRequired value) { + if (lookupPermissionSetsRequiredBuilder_ == null) { + if (responseCase_ == 3 && + response_ != com.authzed.api.materialize.v0.LookupPermissionSetsRequired.getDefaultInstance()) { + response_ = com.authzed.api.materialize.v0.LookupPermissionSetsRequired.newBuilder((com.authzed.api.materialize.v0.LookupPermissionSetsRequired) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 3) { + lookupPermissionSetsRequiredBuilder_.mergeFrom(value); + } else { + lookupPermissionSetsRequiredBuilder_.setMessage(value); + } + } + responseCase_ = 3; + return this; + } + /** + *
+     * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+     * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+     * cluster has seen its schema changed.
+     * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + */ + public Builder clearLookupPermissionSetsRequired() { + if (lookupPermissionSetsRequiredBuilder_ == null) { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + } + lookupPermissionSetsRequiredBuilder_.clear(); + } + return this; + } + /** + *
+     * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+     * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+     * cluster has seen its schema changed.
+     * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + */ + public com.authzed.api.materialize.v0.LookupPermissionSetsRequired.Builder getLookupPermissionSetsRequiredBuilder() { + return getLookupPermissionSetsRequiredFieldBuilder().getBuilder(); + } + /** + *
+     * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+     * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+     * cluster has seen its schema changed.
+     * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.LookupPermissionSetsRequiredOrBuilder getLookupPermissionSetsRequiredOrBuilder() { + if ((responseCase_ == 3) && (lookupPermissionSetsRequiredBuilder_ != null)) { + return lookupPermissionSetsRequiredBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 3) { + return (com.authzed.api.materialize.v0.LookupPermissionSetsRequired) response_; + } + return com.authzed.api.materialize.v0.LookupPermissionSetsRequired.getDefaultInstance(); + } + } + /** + *
+     * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+     * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+     * cluster has seen its schema changed.
+     * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.LookupPermissionSetsRequired, com.authzed.api.materialize.v0.LookupPermissionSetsRequired.Builder, com.authzed.api.materialize.v0.LookupPermissionSetsRequiredOrBuilder> + getLookupPermissionSetsRequiredFieldBuilder() { + if (lookupPermissionSetsRequiredBuilder_ == null) { + if (!(responseCase_ == 3)) { + response_ = com.authzed.api.materialize.v0.LookupPermissionSetsRequired.getDefaultInstance(); + } + lookupPermissionSetsRequiredBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.LookupPermissionSetsRequired, com.authzed.api.materialize.v0.LookupPermissionSetsRequired.Builder, com.authzed.api.materialize.v0.LookupPermissionSetsRequiredOrBuilder>( + (com.authzed.api.materialize.v0.LookupPermissionSetsRequired) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 3; + onChanged(); + return lookupPermissionSetsRequiredBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.BreakingSchemaChange, com.authzed.api.materialize.v0.BreakingSchemaChange.Builder, com.authzed.api.materialize.v0.BreakingSchemaChangeOrBuilder> breakingSchemaChangeBuilder_; + /** + *
+     * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+     * and that the consumer should expect delays in the ingestion of new changes,
+     * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+     * will receive a LookupPermissionSetsRequired event.
+     * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + * @return Whether the breakingSchemaChange field is set. + */ + @java.lang.Override + public boolean hasBreakingSchemaChange() { + return responseCase_ == 4; + } + /** + *
+     * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+     * and that the consumer should expect delays in the ingestion of new changes,
+     * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+     * will receive a LookupPermissionSetsRequired event.
+     * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + * @return The breakingSchemaChange. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.BreakingSchemaChange getBreakingSchemaChange() { + if (breakingSchemaChangeBuilder_ == null) { + if (responseCase_ == 4) { + return (com.authzed.api.materialize.v0.BreakingSchemaChange) response_; + } + return com.authzed.api.materialize.v0.BreakingSchemaChange.getDefaultInstance(); + } else { + if (responseCase_ == 4) { + return breakingSchemaChangeBuilder_.getMessage(); + } + return com.authzed.api.materialize.v0.BreakingSchemaChange.getDefaultInstance(); + } + } + /** + *
+     * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+     * and that the consumer should expect delays in the ingestion of new changes,
+     * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+     * will receive a LookupPermissionSetsRequired event.
+     * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + */ + public Builder setBreakingSchemaChange(com.authzed.api.materialize.v0.BreakingSchemaChange value) { + if (breakingSchemaChangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + breakingSchemaChangeBuilder_.setMessage(value); + } + responseCase_ = 4; + return this; + } + /** + *
+     * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+     * and that the consumer should expect delays in the ingestion of new changes,
+     * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+     * will receive a LookupPermissionSetsRequired event.
+     * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + */ + public Builder setBreakingSchemaChange( + com.authzed.api.materialize.v0.BreakingSchemaChange.Builder builderForValue) { + if (breakingSchemaChangeBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + breakingSchemaChangeBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 4; + return this; + } + /** + *
+     * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+     * and that the consumer should expect delays in the ingestion of new changes,
+     * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+     * will receive a LookupPermissionSetsRequired event.
+     * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + */ + public Builder mergeBreakingSchemaChange(com.authzed.api.materialize.v0.BreakingSchemaChange value) { + if (breakingSchemaChangeBuilder_ == null) { + if (responseCase_ == 4 && + response_ != com.authzed.api.materialize.v0.BreakingSchemaChange.getDefaultInstance()) { + response_ = com.authzed.api.materialize.v0.BreakingSchemaChange.newBuilder((com.authzed.api.materialize.v0.BreakingSchemaChange) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 4) { + breakingSchemaChangeBuilder_.mergeFrom(value); + } else { + breakingSchemaChangeBuilder_.setMessage(value); + } + } + responseCase_ = 4; + return this; + } + /** + *
+     * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+     * and that the consumer should expect delays in the ingestion of new changes,
+     * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+     * will receive a LookupPermissionSetsRequired event.
+     * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + */ + public Builder clearBreakingSchemaChange() { + if (breakingSchemaChangeBuilder_ == null) { + if (responseCase_ == 4) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 4) { + responseCase_ = 0; + response_ = null; + } + breakingSchemaChangeBuilder_.clear(); + } + return this; + } + /** + *
+     * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+     * and that the consumer should expect delays in the ingestion of new changes,
+     * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+     * will receive a LookupPermissionSetsRequired event.
+     * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + */ + public com.authzed.api.materialize.v0.BreakingSchemaChange.Builder getBreakingSchemaChangeBuilder() { + return getBreakingSchemaChangeFieldBuilder().getBuilder(); + } + /** + *
+     * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+     * and that the consumer should expect delays in the ingestion of new changes,
+     * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+     * will receive a LookupPermissionSetsRequired event.
+     * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.BreakingSchemaChangeOrBuilder getBreakingSchemaChangeOrBuilder() { + if ((responseCase_ == 4) && (breakingSchemaChangeBuilder_ != null)) { + return breakingSchemaChangeBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 4) { + return (com.authzed.api.materialize.v0.BreakingSchemaChange) response_; + } + return com.authzed.api.materialize.v0.BreakingSchemaChange.getDefaultInstance(); + } + } + /** + *
+     * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+     * and that the consumer should expect delays in the ingestion of new changes,
+     * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+     * will receive a LookupPermissionSetsRequired event.
+     * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.BreakingSchemaChange, com.authzed.api.materialize.v0.BreakingSchemaChange.Builder, com.authzed.api.materialize.v0.BreakingSchemaChangeOrBuilder> + getBreakingSchemaChangeFieldBuilder() { + if (breakingSchemaChangeBuilder_ == null) { + if (!(responseCase_ == 4)) { + response_ = com.authzed.api.materialize.v0.BreakingSchemaChange.getDefaultInstance(); + } + breakingSchemaChangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.BreakingSchemaChange, com.authzed.api.materialize.v0.BreakingSchemaChange.Builder, com.authzed.api.materialize.v0.BreakingSchemaChangeOrBuilder>( + (com.authzed.api.materialize.v0.BreakingSchemaChange) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 4; + onChanged(); + return breakingSchemaChangeBuilder_; + } + @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.materialize.v0.WatchPermissionSetsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.WatchPermissionSetsResponse) + private static final com.authzed.api.materialize.v0.WatchPermissionSetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.WatchPermissionSetsResponse(); + } + + public static com.authzed.api.materialize.v0.WatchPermissionSetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WatchPermissionSetsResponse 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.materialize.v0.WatchPermissionSetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/WatchPermissionSetsResponseOrBuilder.java b/generated/com/authzed/api/materialize/v0/WatchPermissionSetsResponseOrBuilder.java new file mode 100644 index 00000000..8f423835 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchPermissionSetsResponseOrBuilder.java @@ -0,0 +1,152 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public interface WatchPermissionSetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.WatchPermissionSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the permission sets in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+   * changes originating from that revision completed.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return Whether the change field is set. + */ + boolean hasChange(); + /** + *
+   * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the permission sets in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+   * changes originating from that revision completed.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + * @return The change. + */ + com.authzed.api.materialize.v0.PermissionSetChange getChange(); + /** + *
+   * change is the permission set delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the permission sets in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider the set of
+   * changes originating from that revision completed.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionSetChange change = 1 [json_name = "change"]; + */ + com.authzed.api.materialize.v0.PermissionSetChangeOrBuilder getChangeOrBuilder(); + + /** + *
+   * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the permission sets
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return Whether the completedRevision field is set. + */ + boolean hasCompletedRevision(); + /** + *
+   * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the permission sets
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return The completedRevision. + */ + com.authzed.api.v1.ZedToken getCompletedRevision(); + /** + *
+   * completed_revision is the revision token that indicates the completion of a set of changes. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the permission sets
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getCompletedRevisionOrBuilder(); + + /** + *
+   * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+   * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+   * cluster has seen its schema changed.
+   * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + * @return Whether the lookupPermissionSetsRequired field is set. + */ + boolean hasLookupPermissionSetsRequired(); + /** + *
+   * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+   * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+   * cluster has seen its schema changed.
+   * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + * @return The lookupPermissionSetsRequired. + */ + com.authzed.api.materialize.v0.LookupPermissionSetsRequired getLookupPermissionSetsRequired(); + /** + *
+   * lookup_permission_sets_required is a signal that the consumer should perform a LookupPermissionSets call because
+   * the permission set snapshot needs to be rebuilt from scratch. This typically happens when the origin SpiceDB
+   * cluster has seen its schema changed.
+   * 
+ * + * .authzed.api.materialize.v0.LookupPermissionSetsRequired lookup_permission_sets_required = 3 [json_name = "lookupPermissionSetsRequired"]; + */ + com.authzed.api.materialize.v0.LookupPermissionSetsRequiredOrBuilder getLookupPermissionSetsRequiredOrBuilder(); + + /** + *
+   * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+   * and that the consumer should expect delays in the ingestion of new changes,
+   * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+   * will receive a LookupPermissionSetsRequired event.
+   * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + * @return Whether the breakingSchemaChange field is set. + */ + boolean hasBreakingSchemaChange(); + /** + *
+   * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+   * and that the consumer should expect delays in the ingestion of new changes,
+   * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+   * will receive a LookupPermissionSetsRequired event.
+   * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + * @return The breakingSchemaChange. + */ + com.authzed.api.materialize.v0.BreakingSchemaChange getBreakingSchemaChange(); + /** + *
+   * breaking_schema_change is a signal that a breaking schema change has been written to the origin SpiceDB cluster,
+   * and that the consumer should expect delays in the ingestion of new changes,
+   * because the permission set snapshot needs to be rebuilt from scratch. Once the snapshot is ready, the consumer
+   * will receive a LookupPermissionSetsRequired event.
+   * 
+ * + * .authzed.api.materialize.v0.BreakingSchemaChange breaking_schema_change = 4 [json_name = "breakingSchemaChange"]; + */ + com.authzed.api.materialize.v0.BreakingSchemaChangeOrBuilder getBreakingSchemaChangeOrBuilder(); + + public com.authzed.api.materialize.v0.WatchPermissionSetsResponse.ResponseCase getResponseCase(); +} diff --git a/generated/com/authzed/api/materialize/v0/WatchPermissionSetsServiceGrpc.java b/generated/com/authzed/api/materialize/v0/WatchPermissionSetsServiceGrpc.java new file mode 100644 index 00000000..32e81443 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchPermissionSetsServiceGrpc.java @@ -0,0 +1,470 @@ +package com.authzed.api.materialize.v0; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: authzed/api/materialize/v0/watchpermissionsets.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class WatchPermissionSetsServiceGrpc { + + private WatchPermissionSetsServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "authzed.api.materialize.v0.WatchPermissionSetsService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getWatchPermissionSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WatchPermissionSets", + requestType = com.authzed.api.materialize.v0.WatchPermissionSetsRequest.class, + responseType = com.authzed.api.materialize.v0.WatchPermissionSetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getWatchPermissionSetsMethod() { + io.grpc.MethodDescriptor getWatchPermissionSetsMethod; + if ((getWatchPermissionSetsMethod = WatchPermissionSetsServiceGrpc.getWatchPermissionSetsMethod) == null) { + synchronized (WatchPermissionSetsServiceGrpc.class) { + if ((getWatchPermissionSetsMethod = WatchPermissionSetsServiceGrpc.getWatchPermissionSetsMethod) == null) { + WatchPermissionSetsServiceGrpc.getWatchPermissionSetsMethod = getWatchPermissionSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WatchPermissionSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.materialize.v0.WatchPermissionSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.materialize.v0.WatchPermissionSetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new WatchPermissionSetsServiceMethodDescriptorSupplier("WatchPermissionSets")) + .build(); + } + } + } + return getWatchPermissionSetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getLookupPermissionSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LookupPermissionSets", + requestType = com.authzed.api.materialize.v0.LookupPermissionSetsRequest.class, + responseType = com.authzed.api.materialize.v0.LookupPermissionSetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getLookupPermissionSetsMethod() { + io.grpc.MethodDescriptor getLookupPermissionSetsMethod; + if ((getLookupPermissionSetsMethod = WatchPermissionSetsServiceGrpc.getLookupPermissionSetsMethod) == null) { + synchronized (WatchPermissionSetsServiceGrpc.class) { + if ((getLookupPermissionSetsMethod = WatchPermissionSetsServiceGrpc.getLookupPermissionSetsMethod) == null) { + WatchPermissionSetsServiceGrpc.getLookupPermissionSetsMethod = getLookupPermissionSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LookupPermissionSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.materialize.v0.LookupPermissionSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.materialize.v0.LookupPermissionSetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new WatchPermissionSetsServiceMethodDescriptorSupplier("LookupPermissionSets")) + .build(); + } + } + } + return getLookupPermissionSetsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static WatchPermissionSetsServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchPermissionSetsServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionSetsServiceStub(channel, callOptions); + } + }; + return WatchPermissionSetsServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static WatchPermissionSetsServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchPermissionSetsServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionSetsServiceBlockingStub(channel, callOptions); + } + }; + return WatchPermissionSetsServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static WatchPermissionSetsServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchPermissionSetsServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionSetsServiceFutureStub(channel, callOptions); + } + }; + return WatchPermissionSetsServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public interface AsyncService { + + /** + *
+     * WatchPermissionSets returns a stream of changes to the sets which can be used to compute the watched permissions.
+     * WatchPermissionSets lets consumers achieve the same thing as WatchPermissions, but trades off a simpler usage model with
+     * significantly lower computational requirements. Unlike WatchPermissions, this method returns changes to the sets of permissions,
+     * rather than the individual permissions. Permission sets are a normalized form of the computed permissions, which
+     * means that the consumer must perform an extra computation over this representation to obtain the final computed
+     * permissions, typically by intersecting the provided sets.
+     * For example, this would look like a JOIN between the
+     * materialize permission sets table in a target relation database, the table with the resources to authorize access
+     * to, and the table with the subject (e.g. a user).
+     * In exchange, the number of changes issued by WatchPermissionSets will be several orders of magnitude less than those
+     * emitted by WatchPermissions, which has several implications:
+     * - significantly less resources to compute the sets
+     * - significantly less messages to stream over the network
+     * - significantly less events to ingest on the consumer side
+     * - less ingestion lag from the origin SpiceDB mutation
+     * The type of scenarios WatchPermissionSets is particularly well suited is when a single change
+     * in the origin SpiceDB can yield millions of changes. For example, in the GitHub authorization model, assigning a role
+     * to a top-level team of an organization with hundreds of thousands of employees can lead to an explosion of
+     * permission change events that would require a lot of computational resources to process, both on Materialize and
+     * the consumer side.
+     * WatchPermissionSets is thus recommended for any larger scale use case where the fan-out in permission changes that
+     * emerges from a specific schema and data shape is too large to handle effectively.
+     * The API does not offer a sharding mechanism and thus there should only be one consumer per target system.
+     * Implementing an active-active HA consumer setup over the same target system will require coordinating which
+     * revisions have been consumed in order to prevent transitioning to an inconsistent state.
+     * 
+ */ + default void watchPermissionSets(com.authzed.api.materialize.v0.WatchPermissionSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWatchPermissionSetsMethod(), responseObserver); + } + + /** + *
+     * LookupPermissionSets returns the current state of the permission sets which can be used to derive the computed permissions.
+     * It's typically used to backfill the state of the permission sets in the consumer side.
+     * It's a cursored API and the consumer is responsible to keep track of the cursor and use it on each subsequent call.
+     * Each stream will return <N> permission sets defined by the specified request limit. The server will keep streaming until
+     * the sets per stream is hit, or the current state of the sets is reached,
+     * whatever happens first, and then close the stream. The server will indicate there are no more changes to stream
+     * through the `completed_members` in the cursor.
+     * There may be many elements to stream, and so the consumer should be prepared to resume the stream from the last
+     * cursor received. Once completed, the consumer may start streaming permission set changes using WatchPermissionSets
+     * and the revision token from the last LookupPermissionSets response.
+     * 
+ */ + default void lookupPermissionSets(com.authzed.api.materialize.v0.LookupPermissionSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLookupPermissionSetsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service WatchPermissionSetsService. + */ + public static abstract class WatchPermissionSetsServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return WatchPermissionSetsServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service WatchPermissionSetsService. + */ + public static final class WatchPermissionSetsServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private WatchPermissionSetsServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchPermissionSetsServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionSetsServiceStub(channel, callOptions); + } + + /** + *
+     * WatchPermissionSets returns a stream of changes to the sets which can be used to compute the watched permissions.
+     * WatchPermissionSets lets consumers achieve the same thing as WatchPermissions, but trades off a simpler usage model with
+     * significantly lower computational requirements. Unlike WatchPermissions, this method returns changes to the sets of permissions,
+     * rather than the individual permissions. Permission sets are a normalized form of the computed permissions, which
+     * means that the consumer must perform an extra computation over this representation to obtain the final computed
+     * permissions, typically by intersecting the provided sets.
+     * For example, this would look like a JOIN between the
+     * materialize permission sets table in a target relation database, the table with the resources to authorize access
+     * to, and the table with the subject (e.g. a user).
+     * In exchange, the number of changes issued by WatchPermissionSets will be several orders of magnitude less than those
+     * emitted by WatchPermissions, which has several implications:
+     * - significantly less resources to compute the sets
+     * - significantly less messages to stream over the network
+     * - significantly less events to ingest on the consumer side
+     * - less ingestion lag from the origin SpiceDB mutation
+     * The type of scenarios WatchPermissionSets is particularly well suited is when a single change
+     * in the origin SpiceDB can yield millions of changes. For example, in the GitHub authorization model, assigning a role
+     * to a top-level team of an organization with hundreds of thousands of employees can lead to an explosion of
+     * permission change events that would require a lot of computational resources to process, both on Materialize and
+     * the consumer side.
+     * WatchPermissionSets is thus recommended for any larger scale use case where the fan-out in permission changes that
+     * emerges from a specific schema and data shape is too large to handle effectively.
+     * The API does not offer a sharding mechanism and thus there should only be one consumer per target system.
+     * Implementing an active-active HA consumer setup over the same target system will require coordinating which
+     * revisions have been consumed in order to prevent transitioning to an inconsistent state.
+     * 
+ */ + public void watchPermissionSets(com.authzed.api.materialize.v0.WatchPermissionSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getWatchPermissionSetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * LookupPermissionSets returns the current state of the permission sets which can be used to derive the computed permissions.
+     * It's typically used to backfill the state of the permission sets in the consumer side.
+     * It's a cursored API and the consumer is responsible to keep track of the cursor and use it on each subsequent call.
+     * Each stream will return <N> permission sets defined by the specified request limit. The server will keep streaming until
+     * the sets per stream is hit, or the current state of the sets is reached,
+     * whatever happens first, and then close the stream. The server will indicate there are no more changes to stream
+     * through the `completed_members` in the cursor.
+     * There may be many elements to stream, and so the consumer should be prepared to resume the stream from the last
+     * cursor received. Once completed, the consumer may start streaming permission set changes using WatchPermissionSets
+     * and the revision token from the last LookupPermissionSets response.
+     * 
+ */ + public void lookupPermissionSets(com.authzed.api.materialize.v0.LookupPermissionSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getLookupPermissionSetsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service WatchPermissionSetsService. + */ + public static final class WatchPermissionSetsServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private WatchPermissionSetsServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchPermissionSetsServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionSetsServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * WatchPermissionSets returns a stream of changes to the sets which can be used to compute the watched permissions.
+     * WatchPermissionSets lets consumers achieve the same thing as WatchPermissions, but trades off a simpler usage model with
+     * significantly lower computational requirements. Unlike WatchPermissions, this method returns changes to the sets of permissions,
+     * rather than the individual permissions. Permission sets are a normalized form of the computed permissions, which
+     * means that the consumer must perform an extra computation over this representation to obtain the final computed
+     * permissions, typically by intersecting the provided sets.
+     * For example, this would look like a JOIN between the
+     * materialize permission sets table in a target relation database, the table with the resources to authorize access
+     * to, and the table with the subject (e.g. a user).
+     * In exchange, the number of changes issued by WatchPermissionSets will be several orders of magnitude less than those
+     * emitted by WatchPermissions, which has several implications:
+     * - significantly less resources to compute the sets
+     * - significantly less messages to stream over the network
+     * - significantly less events to ingest on the consumer side
+     * - less ingestion lag from the origin SpiceDB mutation
+     * The type of scenarios WatchPermissionSets is particularly well suited is when a single change
+     * in the origin SpiceDB can yield millions of changes. For example, in the GitHub authorization model, assigning a role
+     * to a top-level team of an organization with hundreds of thousands of employees can lead to an explosion of
+     * permission change events that would require a lot of computational resources to process, both on Materialize and
+     * the consumer side.
+     * WatchPermissionSets is thus recommended for any larger scale use case where the fan-out in permission changes that
+     * emerges from a specific schema and data shape is too large to handle effectively.
+     * The API does not offer a sharding mechanism and thus there should only be one consumer per target system.
+     * Implementing an active-active HA consumer setup over the same target system will require coordinating which
+     * revisions have been consumed in order to prevent transitioning to an inconsistent state.
+     * 
+ */ + public java.util.Iterator watchPermissionSets( + com.authzed.api.materialize.v0.WatchPermissionSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getWatchPermissionSetsMethod(), getCallOptions(), request); + } + + /** + *
+     * LookupPermissionSets returns the current state of the permission sets which can be used to derive the computed permissions.
+     * It's typically used to backfill the state of the permission sets in the consumer side.
+     * It's a cursored API and the consumer is responsible to keep track of the cursor and use it on each subsequent call.
+     * Each stream will return <N> permission sets defined by the specified request limit. The server will keep streaming until
+     * the sets per stream is hit, or the current state of the sets is reached,
+     * whatever happens first, and then close the stream. The server will indicate there are no more changes to stream
+     * through the `completed_members` in the cursor.
+     * There may be many elements to stream, and so the consumer should be prepared to resume the stream from the last
+     * cursor received. Once completed, the consumer may start streaming permission set changes using WatchPermissionSets
+     * and the revision token from the last LookupPermissionSets response.
+     * 
+ */ + public java.util.Iterator lookupPermissionSets( + com.authzed.api.materialize.v0.LookupPermissionSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getLookupPermissionSetsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service WatchPermissionSetsService. + */ + public static final class WatchPermissionSetsServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private WatchPermissionSetsServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchPermissionSetsServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionSetsServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_WATCH_PERMISSION_SETS = 0; + private static final int METHODID_LOOKUP_PERMISSION_SETS = 1; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_WATCH_PERMISSION_SETS: + serviceImpl.watchPermissionSets((com.authzed.api.materialize.v0.WatchPermissionSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LOOKUP_PERMISSION_SETS: + serviceImpl.lookupPermissionSets((com.authzed.api.materialize.v0.LookupPermissionSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getWatchPermissionSetsMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.authzed.api.materialize.v0.WatchPermissionSetsRequest, + com.authzed.api.materialize.v0.WatchPermissionSetsResponse>( + service, METHODID_WATCH_PERMISSION_SETS))) + .addMethod( + getLookupPermissionSetsMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.authzed.api.materialize.v0.LookupPermissionSetsRequest, + com.authzed.api.materialize.v0.LookupPermissionSetsResponse>( + service, METHODID_LOOKUP_PERMISSION_SETS))) + .build(); + } + + private static abstract class WatchPermissionSetsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + WatchPermissionSetsServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissionsets.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("WatchPermissionSetsService"); + } + } + + private static final class WatchPermissionSetsServiceFileDescriptorSupplier + extends WatchPermissionSetsServiceBaseDescriptorSupplier { + WatchPermissionSetsServiceFileDescriptorSupplier() {} + } + + private static final class WatchPermissionSetsServiceMethodDescriptorSupplier + extends WatchPermissionSetsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + WatchPermissionSetsServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (WatchPermissionSetsServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new WatchPermissionSetsServiceFileDescriptorSupplier()) + .addMethod(getWatchPermissionSetsMethod()) + .addMethod(getLookupPermissionSetsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/generated/com/authzed/api/materialize/v0/WatchPermissionsRequest.java b/generated/com/authzed/api/materialize/v0/WatchPermissionsRequest.java new file mode 100644 index 00000000..e30aace7 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchPermissionsRequest.java @@ -0,0 +1,1118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissions.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.WatchPermissionsRequest} + */ +public final class WatchPermissionsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.WatchPermissionsRequest) + WatchPermissionsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use WatchPermissionsRequest.newBuilder() to construct. + private WatchPermissionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WatchPermissionsRequest() { + permissions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WatchPermissionsRequest(); + } + + @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.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchPermissionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchPermissionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.WatchPermissionsRequest.class, com.authzed.api.materialize.v0.WatchPermissionsRequest.Builder.class); + } + + public static final int PERMISSIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List permissions_; + /** + *
+   * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+   * be a subset or equal to the permissions that were enabled for the service.
+   * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + @java.lang.Override + public java.util.List getPermissionsList() { + return permissions_; + } + /** + *
+   * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+   * be a subset or equal to the permissions that were enabled for the service.
+   * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + @java.lang.Override + public java.util.List + getPermissionsOrBuilderList() { + return permissions_; + } + /** + *
+   * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+   * be a subset or equal to the permissions that were enabled for the service.
+   * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + @java.lang.Override + public int getPermissionsCount() { + return permissions_.size(); + } + /** + *
+   * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+   * be a subset or equal to the permissions that were enabled for the service.
+   * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.WatchedPermission getPermissions(int index) { + return permissions_.get(index); + } + /** + *
+   * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+   * be a subset or equal to the permissions that were enabled for the service.
+   * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.WatchedPermissionOrBuilder getPermissionsOrBuilder( + int index) { + return permissions_.get(index); + } + + public static final int OPTIONAL_STARTING_AFTER_FIELD_NUMBER = 2; + private com.authzed.api.v1.ZedToken optionalStartingAfter_; + /** + *
+   * optional_starting_after is the revision token to start watching from. If not provided, the stream
+   * will start from the current revision at the moment of the request.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + * @return Whether the optionalStartingAfter field is set. + */ + @java.lang.Override + public boolean hasOptionalStartingAfter() { + return optionalStartingAfter_ != null; + } + /** + *
+   * optional_starting_after is the revision token to start watching from. If not provided, the stream
+   * will start from the current revision at the moment of the request.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + * @return The optionalStartingAfter. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getOptionalStartingAfter() { + return optionalStartingAfter_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartingAfter_; + } + /** + *
+   * optional_starting_after is the revision token to start watching from. If not provided, the stream
+   * will start from the current revision at the moment of the request.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartingAfterOrBuilder() { + return optionalStartingAfter_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartingAfter_; + } + + 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 < permissions_.size(); i++) { + output.writeMessage(1, permissions_.get(i)); + } + if (optionalStartingAfter_ != null) { + output.writeMessage(2, getOptionalStartingAfter()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < permissions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, permissions_.get(i)); + } + if (optionalStartingAfter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOptionalStartingAfter()); + } + 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.materialize.v0.WatchPermissionsRequest)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.WatchPermissionsRequest other = (com.authzed.api.materialize.v0.WatchPermissionsRequest) obj; + + if (!getPermissionsList() + .equals(other.getPermissionsList())) return false; + if (hasOptionalStartingAfter() != other.hasOptionalStartingAfter()) return false; + if (hasOptionalStartingAfter()) { + if (!getOptionalStartingAfter() + .equals(other.getOptionalStartingAfter())) 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 (getPermissionsCount() > 0) { + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissionsList().hashCode(); + } + if (hasOptionalStartingAfter()) { + hash = (37 * hash) + OPTIONAL_STARTING_AFTER_FIELD_NUMBER; + hash = (53 * hash) + getOptionalStartingAfter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.WatchPermissionsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionsRequest 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.materialize.v0.WatchPermissionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionsRequest 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.materialize.v0.WatchPermissionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.WatchPermissionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionsRequest 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.materialize.v0.WatchPermissionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionsRequest 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.materialize.v0.WatchPermissionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionsRequest 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.materialize.v0.WatchPermissionsRequest 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.WatchPermissionsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.WatchPermissionsRequest) + com.authzed.api.materialize.v0.WatchPermissionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchPermissionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchPermissionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.WatchPermissionsRequest.class, com.authzed.api.materialize.v0.WatchPermissionsRequest.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.WatchPermissionsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (permissionsBuilder_ == null) { + permissions_ = java.util.Collections.emptyList(); + } else { + permissions_ = null; + permissionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + optionalStartingAfter_ = null; + if (optionalStartingAfterBuilder_ != null) { + optionalStartingAfterBuilder_.dispose(); + optionalStartingAfterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchPermissionsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionsRequest getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.WatchPermissionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionsRequest build() { + com.authzed.api.materialize.v0.WatchPermissionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionsRequest buildPartial() { + com.authzed.api.materialize.v0.WatchPermissionsRequest result = new com.authzed.api.materialize.v0.WatchPermissionsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.materialize.v0.WatchPermissionsRequest result) { + if (permissionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + permissions_ = java.util.Collections.unmodifiableList(permissions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.permissions_ = permissions_; + } else { + result.permissions_ = permissionsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.materialize.v0.WatchPermissionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optionalStartingAfter_ = optionalStartingAfterBuilder_ == null + ? optionalStartingAfter_ + : optionalStartingAfterBuilder_.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.materialize.v0.WatchPermissionsRequest) { + return mergeFrom((com.authzed.api.materialize.v0.WatchPermissionsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.WatchPermissionsRequest other) { + if (other == com.authzed.api.materialize.v0.WatchPermissionsRequest.getDefaultInstance()) return this; + if (permissionsBuilder_ == null) { + if (!other.permissions_.isEmpty()) { + if (permissions_.isEmpty()) { + permissions_ = other.permissions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePermissionsIsMutable(); + permissions_.addAll(other.permissions_); + } + onChanged(); + } + } else { + if (!other.permissions_.isEmpty()) { + if (permissionsBuilder_.isEmpty()) { + permissionsBuilder_.dispose(); + permissionsBuilder_ = null; + permissions_ = other.permissions_; + bitField0_ = (bitField0_ & ~0x00000001); + permissionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPermissionsFieldBuilder() : null; + } else { + permissionsBuilder_.addAllMessages(other.permissions_); + } + } + } + if (other.hasOptionalStartingAfter()) { + mergeOptionalStartingAfter(other.getOptionalStartingAfter()); + } + 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.materialize.v0.WatchedPermission m = + input.readMessage( + com.authzed.api.materialize.v0.WatchedPermission.parser(), + extensionRegistry); + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.add(m); + } else { + permissionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + getOptionalStartingAfterFieldBuilder().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.util.List permissions_ = + java.util.Collections.emptyList(); + private void ensurePermissionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + permissions_ = new java.util.ArrayList(permissions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.materialize.v0.WatchedPermission, com.authzed.api.materialize.v0.WatchedPermission.Builder, com.authzed.api.materialize.v0.WatchedPermissionOrBuilder> permissionsBuilder_; + + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public java.util.List getPermissionsList() { + if (permissionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(permissions_); + } else { + return permissionsBuilder_.getMessageList(); + } + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public int getPermissionsCount() { + if (permissionsBuilder_ == null) { + return permissions_.size(); + } else { + return permissionsBuilder_.getCount(); + } + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public com.authzed.api.materialize.v0.WatchedPermission getPermissions(int index) { + if (permissionsBuilder_ == null) { + return permissions_.get(index); + } else { + return permissionsBuilder_.getMessage(index); + } + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public Builder setPermissions( + int index, com.authzed.api.materialize.v0.WatchedPermission value) { + if (permissionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.set(index, value); + onChanged(); + } else { + permissionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public Builder setPermissions( + int index, com.authzed.api.materialize.v0.WatchedPermission.Builder builderForValue) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.set(index, builderForValue.build()); + onChanged(); + } else { + permissionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public Builder addPermissions(com.authzed.api.materialize.v0.WatchedPermission value) { + if (permissionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(value); + onChanged(); + } else { + permissionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public Builder addPermissions( + int index, com.authzed.api.materialize.v0.WatchedPermission value) { + if (permissionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(index, value); + onChanged(); + } else { + permissionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public Builder addPermissions( + com.authzed.api.materialize.v0.WatchedPermission.Builder builderForValue) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.add(builderForValue.build()); + onChanged(); + } else { + permissionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public Builder addPermissions( + int index, com.authzed.api.materialize.v0.WatchedPermission.Builder builderForValue) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.add(index, builderForValue.build()); + onChanged(); + } else { + permissionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public Builder addAllPermissions( + java.lang.Iterable values) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, permissions_); + onChanged(); + } else { + permissionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public Builder clearPermissions() { + if (permissionsBuilder_ == null) { + permissions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + permissionsBuilder_.clear(); + } + return this; + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public Builder removePermissions(int index) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.remove(index); + onChanged(); + } else { + permissionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public com.authzed.api.materialize.v0.WatchedPermission.Builder getPermissionsBuilder( + int index) { + return getPermissionsFieldBuilder().getBuilder(index); + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public com.authzed.api.materialize.v0.WatchedPermissionOrBuilder getPermissionsOrBuilder( + int index) { + if (permissionsBuilder_ == null) { + return permissions_.get(index); } else { + return permissionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public java.util.List + getPermissionsOrBuilderList() { + if (permissionsBuilder_ != null) { + return permissionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(permissions_); + } + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public com.authzed.api.materialize.v0.WatchedPermission.Builder addPermissionsBuilder() { + return getPermissionsFieldBuilder().addBuilder( + com.authzed.api.materialize.v0.WatchedPermission.getDefaultInstance()); + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public com.authzed.api.materialize.v0.WatchedPermission.Builder addPermissionsBuilder( + int index) { + return getPermissionsFieldBuilder().addBuilder( + index, com.authzed.api.materialize.v0.WatchedPermission.getDefaultInstance()); + } + /** + *
+     * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+     * be a subset or equal to the permissions that were enabled for the service.
+     * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + public java.util.List + getPermissionsBuilderList() { + return getPermissionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.materialize.v0.WatchedPermission, com.authzed.api.materialize.v0.WatchedPermission.Builder, com.authzed.api.materialize.v0.WatchedPermissionOrBuilder> + getPermissionsFieldBuilder() { + if (permissionsBuilder_ == null) { + permissionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.materialize.v0.WatchedPermission, com.authzed.api.materialize.v0.WatchedPermission.Builder, com.authzed.api.materialize.v0.WatchedPermissionOrBuilder>( + permissions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + permissions_ = null; + } + return permissionsBuilder_; + } + + private com.authzed.api.v1.ZedToken optionalStartingAfter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> optionalStartingAfterBuilder_; + /** + *
+     * optional_starting_after is the revision token to start watching from. If not provided, the stream
+     * will start from the current revision at the moment of the request.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + * @return Whether the optionalStartingAfter field is set. + */ + public boolean hasOptionalStartingAfter() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * optional_starting_after is the revision token to start watching from. If not provided, the stream
+     * will start from the current revision at the moment of the request.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + * @return The optionalStartingAfter. + */ + public com.authzed.api.v1.ZedToken getOptionalStartingAfter() { + if (optionalStartingAfterBuilder_ == null) { + return optionalStartingAfter_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartingAfter_; + } else { + return optionalStartingAfterBuilder_.getMessage(); + } + } + /** + *
+     * optional_starting_after is the revision token to start watching from. If not provided, the stream
+     * will start from the current revision at the moment of the request.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + */ + public Builder setOptionalStartingAfter(com.authzed.api.v1.ZedToken value) { + if (optionalStartingAfterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalStartingAfter_ = value; + } else { + optionalStartingAfterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_starting_after is the revision token to start watching from. If not provided, the stream
+     * will start from the current revision at the moment of the request.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + */ + public Builder setOptionalStartingAfter( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (optionalStartingAfterBuilder_ == null) { + optionalStartingAfter_ = builderForValue.build(); + } else { + optionalStartingAfterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_starting_after is the revision token to start watching from. If not provided, the stream
+     * will start from the current revision at the moment of the request.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + */ + public Builder mergeOptionalStartingAfter(com.authzed.api.v1.ZedToken value) { + if (optionalStartingAfterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + optionalStartingAfter_ != null && + optionalStartingAfter_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getOptionalStartingAfterBuilder().mergeFrom(value); + } else { + optionalStartingAfter_ = value; + } + } else { + optionalStartingAfterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_starting_after is the revision token to start watching from. If not provided, the stream
+     * will start from the current revision at the moment of the request.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + */ + public Builder clearOptionalStartingAfter() { + bitField0_ = (bitField0_ & ~0x00000002); + optionalStartingAfter_ = null; + if (optionalStartingAfterBuilder_ != null) { + optionalStartingAfterBuilder_.dispose(); + optionalStartingAfterBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_starting_after is the revision token to start watching from. If not provided, the stream
+     * will start from the current revision at the moment of the request.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + */ + public com.authzed.api.v1.ZedToken.Builder getOptionalStartingAfterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOptionalStartingAfterFieldBuilder().getBuilder(); + } + /** + *
+     * optional_starting_after is the revision token to start watching from. If not provided, the stream
+     * will start from the current revision at the moment of the request.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartingAfterOrBuilder() { + if (optionalStartingAfterBuilder_ != null) { + return optionalStartingAfterBuilder_.getMessageOrBuilder(); + } else { + return optionalStartingAfter_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartingAfter_; + } + } + /** + *
+     * optional_starting_after is the revision token to start watching from. If not provided, the stream
+     * will start from the current revision at the moment of the request.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getOptionalStartingAfterFieldBuilder() { + if (optionalStartingAfterBuilder_ == null) { + optionalStartingAfterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getOptionalStartingAfter(), + getParentForChildren(), + isClean()); + optionalStartingAfter_ = null; + } + return optionalStartingAfterBuilder_; + } + @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.materialize.v0.WatchPermissionsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.WatchPermissionsRequest) + private static final com.authzed.api.materialize.v0.WatchPermissionsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.WatchPermissionsRequest(); + } + + public static com.authzed.api.materialize.v0.WatchPermissionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WatchPermissionsRequest 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.materialize.v0.WatchPermissionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/WatchPermissionsRequestOrBuilder.java b/generated/com/authzed/api/materialize/v0/WatchPermissionsRequestOrBuilder.java new file mode 100644 index 00000000..017889b7 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchPermissionsRequestOrBuilder.java @@ -0,0 +1,88 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissions.proto + +package com.authzed.api.materialize.v0; + +public interface WatchPermissionsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.WatchPermissionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+   * be a subset or equal to the permissions that were enabled for the service.
+   * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + java.util.List + getPermissionsList(); + /** + *
+   * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+   * be a subset or equal to the permissions that were enabled for the service.
+   * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + com.authzed.api.materialize.v0.WatchedPermission getPermissions(int index); + /** + *
+   * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+   * be a subset or equal to the permissions that were enabled for the service.
+   * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + int getPermissionsCount(); + /** + *
+   * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+   * be a subset or equal to the permissions that were enabled for the service.
+   * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + java.util.List + getPermissionsOrBuilderList(); + /** + *
+   * permissions is a list of permissions to watch for changes. At least one permission must be specified, and it must
+   * be a subset or equal to the permissions that were enabled for the service.
+   * 
+ * + * repeated .authzed.api.materialize.v0.WatchedPermission permissions = 1 [json_name = "permissions"]; + */ + com.authzed.api.materialize.v0.WatchedPermissionOrBuilder getPermissionsOrBuilder( + int index); + + /** + *
+   * optional_starting_after is the revision token to start watching from. If not provided, the stream
+   * will start from the current revision at the moment of the request.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + * @return Whether the optionalStartingAfter field is set. + */ + boolean hasOptionalStartingAfter(); + /** + *
+   * optional_starting_after is the revision token to start watching from. If not provided, the stream
+   * will start from the current revision at the moment of the request.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + * @return The optionalStartingAfter. + */ + com.authzed.api.v1.ZedToken getOptionalStartingAfter(); + /** + *
+   * optional_starting_after is the revision token to start watching from. If not provided, the stream
+   * will start from the current revision at the moment of the request.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_starting_after = 2 [json_name = "optionalStartingAfter"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartingAfterOrBuilder(); +} diff --git a/generated/com/authzed/api/materialize/v0/WatchPermissionsResponse.java b/generated/com/authzed/api/materialize/v0/WatchPermissionsResponse.java new file mode 100644 index 00000000..2dce6509 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchPermissionsResponse.java @@ -0,0 +1,1078 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissions.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.WatchPermissionsResponse} + */ +public final class WatchPermissionsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.WatchPermissionsResponse) + WatchPermissionsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use WatchPermissionsResponse.newBuilder() to construct. + private WatchPermissionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WatchPermissionsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WatchPermissionsResponse(); + } + + @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.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchPermissionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchPermissionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.WatchPermissionsResponse.class, com.authzed.api.materialize.v0.WatchPermissionsResponse.Builder.class); + } + + private int responseCase_ = 0; + private java.lang.Object response_; + public enum ResponseCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CHANGE(1), + COMPLETED_REVISION(2), + RESPONSE_NOT_SET(0); + private final int value; + private ResponseCase(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 ResponseCase valueOf(int value) { + return forNumber(value); + } + + public static ResponseCase forNumber(int value) { + switch (value) { + case 1: return CHANGE; + case 2: return COMPLETED_REVISION; + case 0: return RESPONSE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public static final int CHANGE_FIELD_NUMBER = 1; + /** + *
+   * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the computed permissions in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+   * originating from that revision.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + * @return Whether the change field is set. + */ + @java.lang.Override + public boolean hasChange() { + return responseCase_ == 1; + } + /** + *
+   * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the computed permissions in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+   * originating from that revision.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + * @return The change. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionChange getChange() { + if (responseCase_ == 1) { + return (com.authzed.api.materialize.v0.PermissionChange) response_; + } + return com.authzed.api.materialize.v0.PermissionChange.getDefaultInstance(); + } + /** + *
+   * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the computed permissions in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+   * originating from that revision.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionChangeOrBuilder getChangeOrBuilder() { + if (responseCase_ == 1) { + return (com.authzed.api.materialize.v0.PermissionChange) response_; + } + return com.authzed.api.materialize.v0.PermissionChange.getDefaultInstance(); + } + + public static final int COMPLETED_REVISION_FIELD_NUMBER = 2; + /** + *
+   * completed_revision is the revision token that indicates all changes originating from a revision have been
+   * streamed and thus the revision should be considered completed. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the computed permissions
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return Whether the completedRevision field is set. + */ + @java.lang.Override + public boolean hasCompletedRevision() { + return responseCase_ == 2; + } + /** + *
+   * completed_revision is the revision token that indicates all changes originating from a revision have been
+   * streamed and thus the revision should be considered completed. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the computed permissions
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return The completedRevision. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getCompletedRevision() { + if (responseCase_ == 2) { + return (com.authzed.api.v1.ZedToken) response_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + /** + *
+   * completed_revision is the revision token that indicates all changes originating from a revision have been
+   * streamed and thus the revision should be considered completed. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the computed permissions
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getCompletedRevisionOrBuilder() { + if (responseCase_ == 2) { + return (com.authzed.api.v1.ZedToken) response_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + + 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 (responseCase_ == 1) { + output.writeMessage(1, (com.authzed.api.materialize.v0.PermissionChange) response_); + } + if (responseCase_ == 2) { + output.writeMessage(2, (com.authzed.api.v1.ZedToken) response_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (responseCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.authzed.api.materialize.v0.PermissionChange) response_); + } + if (responseCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.authzed.api.v1.ZedToken) response_); + } + 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.materialize.v0.WatchPermissionsResponse)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.WatchPermissionsResponse other = (com.authzed.api.materialize.v0.WatchPermissionsResponse) obj; + + if (!getResponseCase().equals(other.getResponseCase())) return false; + switch (responseCase_) { + case 1: + if (!getChange() + .equals(other.getChange())) return false; + break; + case 2: + if (!getCompletedRevision() + .equals(other.getCompletedRevision())) 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(); + switch (responseCase_) { + case 1: + hash = (37 * hash) + CHANGE_FIELD_NUMBER; + hash = (53 * hash) + getChange().hashCode(); + break; + case 2: + hash = (37 * hash) + COMPLETED_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getCompletedRevision().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.WatchPermissionsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionsResponse 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.materialize.v0.WatchPermissionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionsResponse 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.materialize.v0.WatchPermissionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchPermissionsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.WatchPermissionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionsResponse 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.materialize.v0.WatchPermissionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionsResponse 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.materialize.v0.WatchPermissionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchPermissionsResponse 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.materialize.v0.WatchPermissionsResponse 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.WatchPermissionsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.WatchPermissionsResponse) + com.authzed.api.materialize.v0.WatchPermissionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchPermissionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchPermissionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.WatchPermissionsResponse.class, com.authzed.api.materialize.v0.WatchPermissionsResponse.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.WatchPermissionsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (changeBuilder_ != null) { + changeBuilder_.clear(); + } + if (completedRevisionBuilder_ != null) { + completedRevisionBuilder_.clear(); + } + responseCase_ = 0; + response_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchPermissionsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionsResponse getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.WatchPermissionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionsResponse build() { + com.authzed.api.materialize.v0.WatchPermissionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchPermissionsResponse buildPartial() { + com.authzed.api.materialize.v0.WatchPermissionsResponse result = new com.authzed.api.materialize.v0.WatchPermissionsResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.WatchPermissionsResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.authzed.api.materialize.v0.WatchPermissionsResponse result) { + result.responseCase_ = responseCase_; + result.response_ = this.response_; + if (responseCase_ == 1 && + changeBuilder_ != null) { + result.response_ = changeBuilder_.build(); + } + if (responseCase_ == 2 && + completedRevisionBuilder_ != null) { + result.response_ = completedRevisionBuilder_.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.materialize.v0.WatchPermissionsResponse) { + return mergeFrom((com.authzed.api.materialize.v0.WatchPermissionsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.WatchPermissionsResponse other) { + if (other == com.authzed.api.materialize.v0.WatchPermissionsResponse.getDefaultInstance()) return this; + switch (other.getResponseCase()) { + case CHANGE: { + mergeChange(other.getChange()); + break; + } + case COMPLETED_REVISION: { + mergeCompletedRevision(other.getCompletedRevision()); + break; + } + case RESPONSE_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( + getChangeFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + getCompletedRevisionFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 2; + 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 responseCase_ = 0; + private java.lang.Object response_; + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public Builder clearResponse() { + responseCase_ = 0; + response_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.PermissionChange, com.authzed.api.materialize.v0.PermissionChange.Builder, com.authzed.api.materialize.v0.PermissionChangeOrBuilder> changeBuilder_; + /** + *
+     * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the computed permissions in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+     * originating from that revision.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + * @return Whether the change field is set. + */ + @java.lang.Override + public boolean hasChange() { + return responseCase_ == 1; + } + /** + *
+     * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the computed permissions in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+     * originating from that revision.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + * @return The change. + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionChange getChange() { + if (changeBuilder_ == null) { + if (responseCase_ == 1) { + return (com.authzed.api.materialize.v0.PermissionChange) response_; + } + return com.authzed.api.materialize.v0.PermissionChange.getDefaultInstance(); + } else { + if (responseCase_ == 1) { + return changeBuilder_.getMessage(); + } + return com.authzed.api.materialize.v0.PermissionChange.getDefaultInstance(); + } + } + /** + *
+     * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the computed permissions in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+     * originating from that revision.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + */ + public Builder setChange(com.authzed.api.materialize.v0.PermissionChange value) { + if (changeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + changeBuilder_.setMessage(value); + } + responseCase_ = 1; + return this; + } + /** + *
+     * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the computed permissions in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+     * originating from that revision.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + */ + public Builder setChange( + com.authzed.api.materialize.v0.PermissionChange.Builder builderForValue) { + if (changeBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + changeBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 1; + return this; + } + /** + *
+     * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the computed permissions in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+     * originating from that revision.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + */ + public Builder mergeChange(com.authzed.api.materialize.v0.PermissionChange value) { + if (changeBuilder_ == null) { + if (responseCase_ == 1 && + response_ != com.authzed.api.materialize.v0.PermissionChange.getDefaultInstance()) { + response_ = com.authzed.api.materialize.v0.PermissionChange.newBuilder((com.authzed.api.materialize.v0.PermissionChange) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 1) { + changeBuilder_.mergeFrom(value); + } else { + changeBuilder_.setMessage(value); + } + } + responseCase_ = 1; + return this; + } + /** + *
+     * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the computed permissions in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+     * originating from that revision.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + */ + public Builder clearChange() { + if (changeBuilder_ == null) { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + } + changeBuilder_.clear(); + } + return this; + } + /** + *
+     * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the computed permissions in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+     * originating from that revision.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + */ + public com.authzed.api.materialize.v0.PermissionChange.Builder getChangeBuilder() { + return getChangeFieldBuilder().getBuilder(); + } + /** + *
+     * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the computed permissions in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+     * originating from that revision.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + */ + @java.lang.Override + public com.authzed.api.materialize.v0.PermissionChangeOrBuilder getChangeOrBuilder() { + if ((responseCase_ == 1) && (changeBuilder_ != null)) { + return changeBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 1) { + return (com.authzed.api.materialize.v0.PermissionChange) response_; + } + return com.authzed.api.materialize.v0.PermissionChange.getDefaultInstance(); + } + } + /** + *
+     * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+     * The consumer should apply this change to the current state of the computed permissions in their target system.
+     * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+     * originating from that revision.
+     * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+     * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.PermissionChange, com.authzed.api.materialize.v0.PermissionChange.Builder, com.authzed.api.materialize.v0.PermissionChangeOrBuilder> + getChangeFieldBuilder() { + if (changeBuilder_ == null) { + if (!(responseCase_ == 1)) { + response_ = com.authzed.api.materialize.v0.PermissionChange.getDefaultInstance(); + } + changeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.materialize.v0.PermissionChange, com.authzed.api.materialize.v0.PermissionChange.Builder, com.authzed.api.materialize.v0.PermissionChangeOrBuilder>( + (com.authzed.api.materialize.v0.PermissionChange) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 1; + onChanged(); + return changeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> completedRevisionBuilder_; + /** + *
+     * completed_revision is the revision token that indicates all changes originating from a revision have been
+     * streamed and thus the revision should be considered completed. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the computed permissions
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return Whether the completedRevision field is set. + */ + @java.lang.Override + public boolean hasCompletedRevision() { + return responseCase_ == 2; + } + /** + *
+     * completed_revision is the revision token that indicates all changes originating from a revision have been
+     * streamed and thus the revision should be considered completed. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the computed permissions
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return The completedRevision. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getCompletedRevision() { + if (completedRevisionBuilder_ == null) { + if (responseCase_ == 2) { + return (com.authzed.api.v1.ZedToken) response_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } else { + if (responseCase_ == 2) { + return completedRevisionBuilder_.getMessage(); + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + } + /** + *
+     * completed_revision is the revision token that indicates all changes originating from a revision have been
+     * streamed and thus the revision should be considered completed. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the computed permissions
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + public Builder setCompletedRevision(com.authzed.api.v1.ZedToken value) { + if (completedRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + completedRevisionBuilder_.setMessage(value); + } + responseCase_ = 2; + return this; + } + /** + *
+     * completed_revision is the revision token that indicates all changes originating from a revision have been
+     * streamed and thus the revision should be considered completed. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the computed permissions
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + public Builder setCompletedRevision( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (completedRevisionBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + completedRevisionBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 2; + return this; + } + /** + *
+     * completed_revision is the revision token that indicates all changes originating from a revision have been
+     * streamed and thus the revision should be considered completed. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the computed permissions
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + public Builder mergeCompletedRevision(com.authzed.api.v1.ZedToken value) { + if (completedRevisionBuilder_ == null) { + if (responseCase_ == 2 && + response_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + response_ = com.authzed.api.v1.ZedToken.newBuilder((com.authzed.api.v1.ZedToken) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 2) { + completedRevisionBuilder_.mergeFrom(value); + } else { + completedRevisionBuilder_.setMessage(value); + } + } + responseCase_ = 2; + return this; + } + /** + *
+     * completed_revision is the revision token that indicates all changes originating from a revision have been
+     * streamed and thus the revision should be considered completed. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the computed permissions
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + public Builder clearCompletedRevision() { + if (completedRevisionBuilder_ == null) { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + } + completedRevisionBuilder_.clear(); + } + return this; + } + /** + *
+     * completed_revision is the revision token that indicates all changes originating from a revision have been
+     * streamed and thus the revision should be considered completed. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the computed permissions
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + public com.authzed.api.v1.ZedToken.Builder getCompletedRevisionBuilder() { + return getCompletedRevisionFieldBuilder().getBuilder(); + } + /** + *
+     * completed_revision is the revision token that indicates all changes originating from a revision have been
+     * streamed and thus the revision should be considered completed. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the computed permissions
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getCompletedRevisionOrBuilder() { + if ((responseCase_ == 2) && (completedRevisionBuilder_ != null)) { + return completedRevisionBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 2) { + return (com.authzed.api.v1.ZedToken) response_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + } + /** + *
+     * completed_revision is the revision token that indicates all changes originating from a revision have been
+     * streamed and thus the revision should be considered completed. It may also be
+     * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+     * not yield any effective changes in the computed permissions
+     * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getCompletedRevisionFieldBuilder() { + if (completedRevisionBuilder_ == null) { + if (!(responseCase_ == 2)) { + response_ = com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + completedRevisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + (com.authzed.api.v1.ZedToken) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 2; + onChanged(); + return completedRevisionBuilder_; + } + @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.materialize.v0.WatchPermissionsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.WatchPermissionsResponse) + private static final com.authzed.api.materialize.v0.WatchPermissionsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.WatchPermissionsResponse(); + } + + public static com.authzed.api.materialize.v0.WatchPermissionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WatchPermissionsResponse 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.materialize.v0.WatchPermissionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/WatchPermissionsResponseOrBuilder.java b/generated/com/authzed/api/materialize/v0/WatchPermissionsResponseOrBuilder.java new file mode 100644 index 00000000..e744e7e7 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchPermissionsResponseOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissions.proto + +package com.authzed.api.materialize.v0; + +public interface WatchPermissionsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.WatchPermissionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the computed permissions in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+   * originating from that revision.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + * @return Whether the change field is set. + */ + boolean hasChange(); + /** + *
+   * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the computed permissions in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+   * originating from that revision.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + * @return The change. + */ + com.authzed.api.materialize.v0.PermissionChange getChange(); + /** + *
+   * change is the computed permission delta that has occurred as result of a mutation in origin SpiceDB.
+   * The consumer should apply this change to the current state of the computed permissions in their target system.
+   * Once an event arrives with completed_revision instead, the consumer shall consider there are not more changes
+   * originating from that revision.
+   * The consumer should keep track of the revision in order to resume streaming in the event of consumer restarts.
+   * 
+ * + * .authzed.api.materialize.v0.PermissionChange change = 1 [json_name = "change"]; + */ + com.authzed.api.materialize.v0.PermissionChangeOrBuilder getChangeOrBuilder(); + + /** + *
+   * completed_revision is the revision token that indicates all changes originating from a revision have been
+   * streamed and thus the revision should be considered completed. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the computed permissions
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return Whether the completedRevision field is set. + */ + boolean hasCompletedRevision(); + /** + *
+   * completed_revision is the revision token that indicates all changes originating from a revision have been
+   * streamed and thus the revision should be considered completed. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the computed permissions
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + * @return The completedRevision. + */ + com.authzed.api.v1.ZedToken getCompletedRevision(); + /** + *
+   * completed_revision is the revision token that indicates all changes originating from a revision have been
+   * streamed and thus the revision should be considered completed. It may also be
+   * received without accompanying set of changes, indicating that a mutation in the origin SpiceDB cluster did
+   * not yield any effective changes in the computed permissions
+   * 
+ * + * .authzed.api.v1.ZedToken completed_revision = 2 [json_name = "completedRevision"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getCompletedRevisionOrBuilder(); + + public com.authzed.api.materialize.v0.WatchPermissionsResponse.ResponseCase getResponseCase(); +} diff --git a/generated/com/authzed/api/materialize/v0/WatchPermissionsServiceGrpc.java b/generated/com/authzed/api/materialize/v0/WatchPermissionsServiceGrpc.java new file mode 100644 index 00000000..5a4a6dd6 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchPermissionsServiceGrpc.java @@ -0,0 +1,328 @@ +package com.authzed.api.materialize.v0; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: authzed/api/materialize/v0/watchpermissions.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class WatchPermissionsServiceGrpc { + + private WatchPermissionsServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "authzed.api.materialize.v0.WatchPermissionsService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getWatchPermissionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WatchPermissions", + requestType = com.authzed.api.materialize.v0.WatchPermissionsRequest.class, + responseType = com.authzed.api.materialize.v0.WatchPermissionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getWatchPermissionsMethod() { + io.grpc.MethodDescriptor getWatchPermissionsMethod; + if ((getWatchPermissionsMethod = WatchPermissionsServiceGrpc.getWatchPermissionsMethod) == null) { + synchronized (WatchPermissionsServiceGrpc.class) { + if ((getWatchPermissionsMethod = WatchPermissionsServiceGrpc.getWatchPermissionsMethod) == null) { + WatchPermissionsServiceGrpc.getWatchPermissionsMethod = getWatchPermissionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WatchPermissions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.materialize.v0.WatchPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.materialize.v0.WatchPermissionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new WatchPermissionsServiceMethodDescriptorSupplier("WatchPermissions")) + .build(); + } + } + } + return getWatchPermissionsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static WatchPermissionsServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchPermissionsServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionsServiceStub(channel, callOptions); + } + }; + return WatchPermissionsServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static WatchPermissionsServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchPermissionsServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionsServiceBlockingStub(channel, callOptions); + } + }; + return WatchPermissionsServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static WatchPermissionsServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchPermissionsServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionsServiceFutureStub(channel, callOptions); + } + }; + return WatchPermissionsServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public interface AsyncService { + + /** + *
+     * WatchPermissions returns a stream of PermissionChange events for the given permissions.
+     * WatchPermissions is a long-running RPC, and will stream events until the client
+     * closes the connection or the server terminates the stream. The consumer is responsible of
+     * keeping track of the last seen revision and resuming the stream from that point in the event
+     * of disconnection or client-side restarts.
+     * The API does not offer a sharding mechanism and thus there should only be one consumer per target system.
+     * Implementing an active-active HA consumer setup over the same target system will require coordinating which
+     * revisions have been consumed in order to prevent transitioning to an inconsistent state.
+     * Usage of WatchPermissions requires to be explicitly enabled on the service, including the permissions to be
+     * watched. It requires more resources and is less performant than WatchPermissionsSets. It's usage
+     * is only recommended when performing the set intersections of WatchPermissionSets in the client side is not viable
+     * or there is a strict application requirement to use consume the computed permissions.
+     * 
+ */ + default void watchPermissions(com.authzed.api.materialize.v0.WatchPermissionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWatchPermissionsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service WatchPermissionsService. + */ + public static abstract class WatchPermissionsServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return WatchPermissionsServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service WatchPermissionsService. + */ + public static final class WatchPermissionsServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private WatchPermissionsServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchPermissionsServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionsServiceStub(channel, callOptions); + } + + /** + *
+     * WatchPermissions returns a stream of PermissionChange events for the given permissions.
+     * WatchPermissions is a long-running RPC, and will stream events until the client
+     * closes the connection or the server terminates the stream. The consumer is responsible of
+     * keeping track of the last seen revision and resuming the stream from that point in the event
+     * of disconnection or client-side restarts.
+     * The API does not offer a sharding mechanism and thus there should only be one consumer per target system.
+     * Implementing an active-active HA consumer setup over the same target system will require coordinating which
+     * revisions have been consumed in order to prevent transitioning to an inconsistent state.
+     * Usage of WatchPermissions requires to be explicitly enabled on the service, including the permissions to be
+     * watched. It requires more resources and is less performant than WatchPermissionsSets. It's usage
+     * is only recommended when performing the set intersections of WatchPermissionSets in the client side is not viable
+     * or there is a strict application requirement to use consume the computed permissions.
+     * 
+ */ + public void watchPermissions(com.authzed.api.materialize.v0.WatchPermissionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getWatchPermissionsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service WatchPermissionsService. + */ + public static final class WatchPermissionsServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private WatchPermissionsServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchPermissionsServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionsServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * WatchPermissions returns a stream of PermissionChange events for the given permissions.
+     * WatchPermissions is a long-running RPC, and will stream events until the client
+     * closes the connection or the server terminates the stream. The consumer is responsible of
+     * keeping track of the last seen revision and resuming the stream from that point in the event
+     * of disconnection or client-side restarts.
+     * The API does not offer a sharding mechanism and thus there should only be one consumer per target system.
+     * Implementing an active-active HA consumer setup over the same target system will require coordinating which
+     * revisions have been consumed in order to prevent transitioning to an inconsistent state.
+     * Usage of WatchPermissions requires to be explicitly enabled on the service, including the permissions to be
+     * watched. It requires more resources and is less performant than WatchPermissionsSets. It's usage
+     * is only recommended when performing the set intersections of WatchPermissionSets in the client side is not viable
+     * or there is a strict application requirement to use consume the computed permissions.
+     * 
+ */ + public java.util.Iterator watchPermissions( + com.authzed.api.materialize.v0.WatchPermissionsRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getWatchPermissionsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service WatchPermissionsService. + */ + public static final class WatchPermissionsServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private WatchPermissionsServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchPermissionsServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchPermissionsServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_WATCH_PERMISSIONS = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_WATCH_PERMISSIONS: + serviceImpl.watchPermissions((com.authzed.api.materialize.v0.WatchPermissionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getWatchPermissionsMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.authzed.api.materialize.v0.WatchPermissionsRequest, + com.authzed.api.materialize.v0.WatchPermissionsResponse>( + service, METHODID_WATCH_PERMISSIONS))) + .build(); + } + + private static abstract class WatchPermissionsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + WatchPermissionsServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissions.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("WatchPermissionsService"); + } + } + + private static final class WatchPermissionsServiceFileDescriptorSupplier + extends WatchPermissionsServiceBaseDescriptorSupplier { + WatchPermissionsServiceFileDescriptorSupplier() {} + } + + private static final class WatchPermissionsServiceMethodDescriptorSupplier + extends WatchPermissionsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + WatchPermissionsServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (WatchPermissionsServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new WatchPermissionsServiceFileDescriptorSupplier()) + .addMethod(getWatchPermissionsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/generated/com/authzed/api/materialize/v0/WatchedPermission.java b/generated/com/authzed/api/materialize/v0/WatchedPermission.java new file mode 100644 index 00000000..656d0394 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchedPermission.java @@ -0,0 +1,1064 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissions.proto + +package com.authzed.api.materialize.v0; + +/** + * Protobuf type {@code authzed.api.materialize.v0.WatchedPermission} + */ +public final class WatchedPermission extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.materialize.v0.WatchedPermission) + WatchedPermissionOrBuilder { +private static final long serialVersionUID = 0L; + // Use WatchedPermission.newBuilder() to construct. + private WatchedPermission(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WatchedPermission() { + resourceType_ = ""; + permission_ = ""; + subjectType_ = ""; + optionalSubjectRelation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WatchedPermission(); + } + + @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.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchedPermission_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchedPermission_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.WatchedPermission.class, com.authzed.api.materialize.v0.WatchedPermission.Builder.class); + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + /** + *
+   * resource_type is the type of the resource to watch for changes.
+   * 
+ * + * string resource_type = 1 [json_name = "resourceType"]; + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + /** + *
+   * resource_type is the type of the resource to watch for changes.
+   * 
+ * + * string resource_type = 1 [json_name = "resourceType"]; + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object permission_ = ""; + /** + *
+   * permission is the permission to watch for changes.
+   * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + *
+   * permission is the permission to watch for changes.
+   * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_TYPE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object subjectType_ = ""; + /** + *
+   * subject_type is the type of the subject to watch for changes.
+   * 
+ * + * string subject_type = 3 [json_name = "subjectType"]; + * @return The subjectType. + */ + @java.lang.Override + public java.lang.String getSubjectType() { + java.lang.Object ref = subjectType_; + 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(); + subjectType_ = s; + return s; + } + } + /** + *
+   * subject_type is the type of the subject to watch for changes.
+   * 
+ * + * string subject_type = 3 [json_name = "subjectType"]; + * @return The bytes for subjectType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectTypeBytes() { + java.lang.Object ref = subjectType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_SUBJECT_RELATION_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalSubjectRelation_ = ""; + /** + *
+   * optional_subject_relation is the relation on the subject to watch for changes.
+   * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The optionalSubjectRelation. + */ + @java.lang.Override + public java.lang.String getOptionalSubjectRelation() { + java.lang.Object ref = optionalSubjectRelation_; + 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(); + optionalSubjectRelation_ = s; + return s; + } + } + /** + *
+   * optional_subject_relation is the relation on the subject to watch for changes.
+   * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The bytes for optionalSubjectRelation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalSubjectRelationBytes() { + java.lang.Object ref = optionalSubjectRelation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalSubjectRelation_ = 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(resourceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permission_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalSubjectRelation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, optionalSubjectRelation_); + } + 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(resourceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, permission_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalSubjectRelation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, optionalSubjectRelation_); + } + 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.materialize.v0.WatchedPermission)) { + return super.equals(obj); + } + com.authzed.api.materialize.v0.WatchedPermission other = (com.authzed.api.materialize.v0.WatchedPermission) obj; + + if (!getResourceType() + .equals(other.getResourceType())) return false; + if (!getPermission() + .equals(other.getPermission())) return false; + if (!getSubjectType() + .equals(other.getSubjectType())) return false; + if (!getOptionalSubjectRelation() + .equals(other.getOptionalSubjectRelation())) 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) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().hashCode(); + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + hash = (37 * hash) + SUBJECT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getSubjectType().hashCode(); + hash = (37 * hash) + OPTIONAL_SUBJECT_RELATION_FIELD_NUMBER; + hash = (53 * hash) + getOptionalSubjectRelation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.materialize.v0.WatchedPermission parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchedPermission 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.materialize.v0.WatchedPermission parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchedPermission 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.materialize.v0.WatchedPermission parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.materialize.v0.WatchedPermission parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.materialize.v0.WatchedPermission parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchedPermission 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.materialize.v0.WatchedPermission parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchedPermission 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.materialize.v0.WatchedPermission parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.materialize.v0.WatchedPermission 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.materialize.v0.WatchedPermission 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; + } + /** + * Protobuf type {@code authzed.api.materialize.v0.WatchedPermission} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.materialize.v0.WatchedPermission) + com.authzed.api.materialize.v0.WatchedPermissionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchedPermission_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchedPermission_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.materialize.v0.WatchedPermission.class, com.authzed.api.materialize.v0.WatchedPermission.Builder.class); + } + + // Construct using com.authzed.api.materialize.v0.WatchedPermission.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceType_ = ""; + permission_ = ""; + subjectType_ = ""; + optionalSubjectRelation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.materialize.v0.Watchpermissions.internal_static_authzed_api_materialize_v0_WatchedPermission_descriptor; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchedPermission getDefaultInstanceForType() { + return com.authzed.api.materialize.v0.WatchedPermission.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchedPermission build() { + com.authzed.api.materialize.v0.WatchedPermission result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.materialize.v0.WatchedPermission buildPartial() { + com.authzed.api.materialize.v0.WatchedPermission result = new com.authzed.api.materialize.v0.WatchedPermission(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.materialize.v0.WatchedPermission result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.permission_ = permission_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subjectType_ = subjectType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.optionalSubjectRelation_ = optionalSubjectRelation_; + } + } + + @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.materialize.v0.WatchedPermission) { + return mergeFrom((com.authzed.api.materialize.v0.WatchedPermission)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.materialize.v0.WatchedPermission other) { + if (other == com.authzed.api.materialize.v0.WatchedPermission.getDefaultInstance()) return this; + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSubjectType().isEmpty()) { + subjectType_ = other.subjectType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOptionalSubjectRelation().isEmpty()) { + optionalSubjectRelation_ = other.optionalSubjectRelation_; + bitField0_ |= 0x00000008; + 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: { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + permission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + subjectType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + optionalSubjectRelation_ = 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 bitField0_; + + private java.lang.Object resourceType_ = ""; + /** + *
+     * resource_type is the type of the resource to watch for changes.
+     * 
+ * + * string resource_type = 1 [json_name = "resourceType"]; + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * resource_type is the type of the resource to watch for changes.
+     * 
+ * + * string resource_type = 1 [json_name = "resourceType"]; + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString + getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * resource_type is the type of the resource to watch for changes.
+     * 
+ * + * string resource_type = 1 [json_name = "resourceType"]; + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * resource_type is the type of the resource to watch for changes.
+     * 
+ * + * string resource_type = 1 [json_name = "resourceType"]; + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * resource_type is the type of the resource to watch for changes.
+     * 
+ * + * string resource_type = 1 [json_name = "resourceType"]; + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object permission_ = ""; + /** + *
+     * permission is the permission to watch for changes.
+     * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * permission is the permission to watch for changes.
+     * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * permission is the permission to watch for changes.
+     * 
+ * + * string permission = 2 [json_name = "permission"]; + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * permission is the permission to watch for changes.
+     * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return This builder for chaining. + */ + public Builder clearPermission() { + permission_ = getDefaultInstance().getPermission(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * permission is the permission to watch for changes.
+     * 
+ * + * string permission = 2 [json_name = "permission"]; + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object subjectType_ = ""; + /** + *
+     * subject_type is the type of the subject to watch for changes.
+     * 
+ * + * string subject_type = 3 [json_name = "subjectType"]; + * @return The subjectType. + */ + public java.lang.String getSubjectType() { + java.lang.Object ref = subjectType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * subject_type is the type of the subject to watch for changes.
+     * 
+ * + * string subject_type = 3 [json_name = "subjectType"]; + * @return The bytes for subjectType. + */ + public com.google.protobuf.ByteString + getSubjectTypeBytes() { + java.lang.Object ref = subjectType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * subject_type is the type of the subject to watch for changes.
+     * 
+ * + * string subject_type = 3 [json_name = "subjectType"]; + * @param value The subjectType to set. + * @return This builder for chaining. + */ + public Builder setSubjectType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subjectType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * subject_type is the type of the subject to watch for changes.
+     * 
+ * + * string subject_type = 3 [json_name = "subjectType"]; + * @return This builder for chaining. + */ + public Builder clearSubjectType() { + subjectType_ = getDefaultInstance().getSubjectType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * subject_type is the type of the subject to watch for changes.
+     * 
+ * + * string subject_type = 3 [json_name = "subjectType"]; + * @param value The bytes for subjectType to set. + * @return This builder for chaining. + */ + public Builder setSubjectTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subjectType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object optionalSubjectRelation_ = ""; + /** + *
+     * optional_subject_relation is the relation on the subject to watch for changes.
+     * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The optionalSubjectRelation. + */ + public java.lang.String getOptionalSubjectRelation() { + java.lang.Object ref = optionalSubjectRelation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalSubjectRelation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_subject_relation is the relation on the subject to watch for changes.
+     * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The bytes for optionalSubjectRelation. + */ + public com.google.protobuf.ByteString + getOptionalSubjectRelationBytes() { + java.lang.Object ref = optionalSubjectRelation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalSubjectRelation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_subject_relation is the relation on the subject to watch for changes.
+     * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @param value The optionalSubjectRelation to set. + * @return This builder for chaining. + */ + public Builder setOptionalSubjectRelation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalSubjectRelation_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * optional_subject_relation is the relation on the subject to watch for changes.
+     * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return This builder for chaining. + */ + public Builder clearOptionalSubjectRelation() { + optionalSubjectRelation_ = getDefaultInstance().getOptionalSubjectRelation(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * optional_subject_relation is the relation on the subject to watch for changes.
+     * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @param value The bytes for optionalSubjectRelation to set. + * @return This builder for chaining. + */ + public Builder setOptionalSubjectRelationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalSubjectRelation_ = 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.materialize.v0.WatchedPermission) + } + + // @@protoc_insertion_point(class_scope:authzed.api.materialize.v0.WatchedPermission) + private static final com.authzed.api.materialize.v0.WatchedPermission DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.materialize.v0.WatchedPermission(); + } + + public static com.authzed.api.materialize.v0.WatchedPermission getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WatchedPermission 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.materialize.v0.WatchedPermission getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/materialize/v0/WatchedPermissionOrBuilder.java b/generated/com/authzed/api/materialize/v0/WatchedPermissionOrBuilder.java new file mode 100644 index 00000000..303265b3 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/WatchedPermissionOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissions.proto + +package com.authzed.api.materialize.v0; + +public interface WatchedPermissionOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.materialize.v0.WatchedPermission) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * resource_type is the type of the resource to watch for changes.
+   * 
+ * + * string resource_type = 1 [json_name = "resourceType"]; + * @return The resourceType. + */ + java.lang.String getResourceType(); + /** + *
+   * resource_type is the type of the resource to watch for changes.
+   * 
+ * + * string resource_type = 1 [json_name = "resourceType"]; + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString + getResourceTypeBytes(); + + /** + *
+   * permission is the permission to watch for changes.
+   * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The permission. + */ + java.lang.String getPermission(); + /** + *
+   * permission is the permission to watch for changes.
+   * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + *
+   * subject_type is the type of the subject to watch for changes.
+   * 
+ * + * string subject_type = 3 [json_name = "subjectType"]; + * @return The subjectType. + */ + java.lang.String getSubjectType(); + /** + *
+   * subject_type is the type of the subject to watch for changes.
+   * 
+ * + * string subject_type = 3 [json_name = "subjectType"]; + * @return The bytes for subjectType. + */ + com.google.protobuf.ByteString + getSubjectTypeBytes(); + + /** + *
+   * optional_subject_relation is the relation on the subject to watch for changes.
+   * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The optionalSubjectRelation. + */ + java.lang.String getOptionalSubjectRelation(); + /** + *
+   * optional_subject_relation is the relation on the subject to watch for changes.
+   * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The bytes for optionalSubjectRelation. + */ + com.google.protobuf.ByteString + getOptionalSubjectRelationBytes(); +} diff --git a/generated/com/authzed/api/materialize/v0/Watchpermissions.java b/generated/com/authzed/api/materialize/v0/Watchpermissions.java new file mode 100644 index 00000000..1968f6e8 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/Watchpermissions.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissions.proto + +package com.authzed.api.materialize.v0; + +public final class Watchpermissions { + private Watchpermissions() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_WatchPermissionsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_WatchPermissionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_WatchedPermission_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_WatchedPermission_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_WatchPermissionsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_WatchPermissionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_PermissionChange_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_PermissionChange_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1authzed/api/materialize/v0/watchpermis" + + "sions.proto\022\032authzed.api.materialize.v0\032" + + "\031authzed/api/v1/core.proto\"\274\001\n\027WatchPerm" + + "issionsRequest\022O\n\013permissions\030\001 \003(\0132-.au" + + "thzed.api.materialize.v0.WatchedPermissi" + + "onR\013permissions\022P\n\027optional_starting_aft" + + "er\030\002 \001(\0132\030.authzed.api.v1.ZedTokenR\025opti" + + "onalStartingAfter\"\267\001\n\021WatchedPermission\022" + + "#\n\rresource_type\030\001 \001(\tR\014resourceType\022\036\n\n" + + "permission\030\002 \001(\tR\npermission\022!\n\014subject_" + + "type\030\003 \001(\tR\013subjectType\022:\n\031optional_subj" + + "ect_relation\030\004 \001(\tR\027optionalSubjectRelat" + + "ion\"\271\001\n\030WatchPermissionsResponse\022F\n\006chan" + + "ge\030\001 \001(\0132,.authzed.api.materialize.v0.Pe" + + "rmissionChangeH\000R\006change\022I\n\022completed_re" + + "vision\030\002 \001(\0132\030.authzed.api.v1.ZedTokenH\000" + + "R\021completedRevisionB\n\n\010response\"\351\003\n\020Perm" + + "issionChange\0224\n\010revision\030\001 \001(\0132\030.authzed" + + ".api.v1.ZedTokenR\010revision\022;\n\010resource\030\002" + + " \001(\0132\037.authzed.api.v1.ObjectReferenceR\010r" + + "esource\022\036\n\npermission\030\003 \001(\tR\npermission\022" + + ":\n\007subject\030\004 \001(\0132 .authzed.api.v1.Subjec" + + "tReferenceR\007subject\022c\n\016permissionship\030\005 " + + "\001(\0162;.authzed.api.materialize.v0.Permiss" + + "ionChange.PermissionshipR\016permissionship" + + "\"\240\001\n\016Permissionship\022\036\n\032PERMISSIONSHIP_UN" + + "SPECIFIED\020\000\022 \n\034PERMISSIONSHIP_NO_PERMISS" + + "ION\020\001\022!\n\035PERMISSIONSHIP_HAS_PERMISSION\020\002" + + "\022)\n%PERMISSIONSHIP_CONDITIONAL_PERMISSIO" + + "N\020\0032\235\001\n\027WatchPermissionsService\022\201\001\n\020Watc" + + "hPermissions\0223.authzed.api.materialize.v" + + "0.WatchPermissionsRequest\0324.authzed.api." + + "materialize.v0.WatchPermissionsResponse\"" + + "\0000\001Bb\n\036com.authzed.api.materialize.v0P\001Z" + + ">github.com/authzed/authzed-go/proto/aut" + + "hzed/api/materialize/v0b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.authzed.api.v1.Core.getDescriptor(), + }); + internal_static_authzed_api_materialize_v0_WatchPermissionsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_materialize_v0_WatchPermissionsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_WatchPermissionsRequest_descriptor, + new java.lang.String[] { "Permissions", "OptionalStartingAfter", }); + internal_static_authzed_api_materialize_v0_WatchedPermission_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_materialize_v0_WatchedPermission_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_WatchedPermission_descriptor, + new java.lang.String[] { "ResourceType", "Permission", "SubjectType", "OptionalSubjectRelation", }); + internal_static_authzed_api_materialize_v0_WatchPermissionsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authzed_api_materialize_v0_WatchPermissionsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_WatchPermissionsResponse_descriptor, + new java.lang.String[] { "Change", "CompletedRevision", "Response", }); + internal_static_authzed_api_materialize_v0_PermissionChange_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_authzed_api_materialize_v0_PermissionChange_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_PermissionChange_descriptor, + new java.lang.String[] { "Revision", "Resource", "Permission", "Subject", "Permissionship", }); + com.authzed.api.v1.Core.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/materialize/v0/Watchpermissionsets.java b/generated/com/authzed/api/materialize/v0/Watchpermissionsets.java new file mode 100644 index 00000000..377bb4f5 --- /dev/null +++ b/generated/com/authzed/api/materialize/v0/Watchpermissionsets.java @@ -0,0 +1,213 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/materialize/v0/watchpermissionsets.proto + +package com.authzed.api.materialize.v0; + +public final class Watchpermissionsets { + private Watchpermissionsets() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_WatchPermissionSetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_WatchPermissionSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_WatchPermissionSetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_WatchPermissionSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_Cursor_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_Cursor_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_LookupPermissionSetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_LookupPermissionSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_PermissionSetChange_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_PermissionSetChange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_SetReference_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_SetReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_MemberReference_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_MemberReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequired_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequired_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_materialize_v0_BreakingSchemaChange_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_materialize_v0_BreakingSchemaChange_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n4authzed/api/materialize/v0/watchpermis" + + "sionsets.proto\022\032authzed.api.materialize." + + "v0\032\031authzed/api/v1/core.proto\"n\n\032WatchPe" + + "rmissionSetsRequest\022P\n\027optional_starting" + + "_after\030\001 \001(\0132\030.authzed.api.v1.ZedTokenR\025" + + "optionalStartingAfter\"\255\003\n\033WatchPermissio" + + "nSetsResponse\022I\n\006change\030\001 \001(\0132/.authzed." + + "api.materialize.v0.PermissionSetChangeH\000" + + "R\006change\022I\n\022completed_revision\030\002 \001(\0132\030.a" + + "uthzed.api.v1.ZedTokenH\000R\021completedRevis" + + "ion\022\201\001\n\037lookup_permission_sets_required\030" + + "\003 \001(\01328.authzed.api.materialize.v0.Looku" + + "pPermissionSetsRequiredH\000R\034lookupPermiss" + + "ionSetsRequired\022h\n\026breaking_schema_chang" + + "e\030\004 \001(\01320.authzed.api.materialize.v0.Bre" + + "akingSchemaChangeH\000R\024breakingSchemaChang" + + "eB\n\n\010response\"\305\001\n\006Cursor\022\024\n\005limit\030\001 \001(\rR" + + "\005limit\022.\n\005token\030\004 \001(\0132\030.authzed.api.v1.Z" + + "edTokenR\005token\022%\n\016starting_index\030\005 \001(\rR\r" + + "startingIndex\022+\n\021completed_members\030\006 \001(\010" + + "R\020completedMembers\022!\n\014starting_key\030\007 \001(\t" + + "R\013startingKey\"\350\001\n\033LookupPermissionSetsRe" + + "quest\022\024\n\005limit\030\001 \001(\rR\005limit\022J\n\024optional_" + + "at_revision\030\002 \001(\0132\030.authzed.api.v1.ZedTo" + + "kenR\022optionalAtRevision\022g\n\036optional_star" + + "ting_after_cursor\030\004 \001(\0132\".authzed.api.ma" + + "terialize.v0.CursorR\033optionalStartingAft" + + "erCursor\"\243\001\n\034LookupPermissionSetsRespons" + + "e\022G\n\006change\030\001 \001(\0132/.authzed.api.material" + + "ize.v0.PermissionSetChangeR\006change\022:\n\006cu" + + "rsor\030\002 \001(\0132\".authzed.api.materialize.v0." + + "CursorR\006cursor\"\374\003\n\023PermissionSetChange\0229" + + "\n\013at_revision\030\001 \001(\0132\030.authzed.api.v1.Zed" + + "TokenR\natRevision\022Z\n\toperation\030\002 \001(\0162<.a" + + "uthzed.api.materialize.v0.PermissionSetC" + + "hange.SetOperationR\toperation\022G\n\nparent_" + + "set\030\003 \001(\0132(.authzed.api.materialize.v0.S" + + "etReferenceR\tparentSet\022G\n\tchild_set\030\004 \001(" + + "\0132(.authzed.api.materialize.v0.SetRefere" + + "nceH\000R\010childSet\022P\n\014child_member\030\005 \001(\0132+." + + "authzed.api.materialize.v0.MemberReferen" + + "ceH\000R\013childMember\"a\n\014SetOperation\022\035\n\031SET" + + "_OPERATION_UNSPECIFIED\020\000\022\027\n\023SET_OPERATIO" + + "N_ADDED\020\001\022\031\n\025SET_OPERATION_REMOVED\020\002B\007\n\005" + + "child\"\202\001\n\014SetReference\022\037\n\013object_type\030\001 " + + "\001(\tR\nobjectType\022\033\n\tobject_id\030\002 \001(\tR\010obje" + + "ctId\0224\n\026permission_or_relation\030\003 \001(\tR\024pe" + + "rmissionOrRelation\"\226\001\n\017MemberReference\022\037" + + "\n\013object_type\030\001 \001(\tR\nobjectType\022\033\n\tobjec" + + "t_id\030\002 \001(\tR\010objectId\022E\n\037optional_permiss" + + "ion_or_relation\030\003 \001(\tR\034optionalPermissio" + + "nOrRelation\"f\n\034LookupPermissionSetsRequi" + + "red\022F\n\022required_lookup_at\030\001 \001(\0132\030.authze" + + "d.api.v1.ZedTokenR\020requiredLookupAt\"M\n\024B" + + "reakingSchemaChange\0225\n\tchange_at\030\001 \001(\0132\030" + + ".authzed.api.v1.ZedTokenR\010changeAt2\271\002\n\032W" + + "atchPermissionSetsService\022\212\001\n\023WatchPermi" + + "ssionSets\0226.authzed.api.materialize.v0.W" + + "atchPermissionSetsRequest\0327.authzed.api." + + "materialize.v0.WatchPermissionSetsRespon" + + "se\"\0000\001\022\215\001\n\024LookupPermissionSets\0227.authze" + + "d.api.materialize.v0.LookupPermissionSet" + + "sRequest\0328.authzed.api.materialize.v0.Lo" + + "okupPermissionSetsResponse\"\0000\001Bb\n\036com.au" + + "thzed.api.materialize.v0P\001Z>github.com/a" + + "uthzed/authzed-go/proto/authzed/api/mate" + + "rialize/v0b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.authzed.api.v1.Core.getDescriptor(), + }); + internal_static_authzed_api_materialize_v0_WatchPermissionSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_materialize_v0_WatchPermissionSetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_WatchPermissionSetsRequest_descriptor, + new java.lang.String[] { "OptionalStartingAfter", }); + internal_static_authzed_api_materialize_v0_WatchPermissionSetsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_materialize_v0_WatchPermissionSetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_WatchPermissionSetsResponse_descriptor, + new java.lang.String[] { "Change", "CompletedRevision", "LookupPermissionSetsRequired", "BreakingSchemaChange", "Response", }); + internal_static_authzed_api_materialize_v0_Cursor_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authzed_api_materialize_v0_Cursor_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_Cursor_descriptor, + new java.lang.String[] { "Limit", "Token", "StartingIndex", "CompletedMembers", "StartingKey", }); + internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequest_descriptor, + new java.lang.String[] { "Limit", "OptionalAtRevision", "OptionalStartingAfterCursor", }); + internal_static_authzed_api_materialize_v0_LookupPermissionSetsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_authzed_api_materialize_v0_LookupPermissionSetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_LookupPermissionSetsResponse_descriptor, + new java.lang.String[] { "Change", "Cursor", }); + internal_static_authzed_api_materialize_v0_PermissionSetChange_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_authzed_api_materialize_v0_PermissionSetChange_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_PermissionSetChange_descriptor, + new java.lang.String[] { "AtRevision", "Operation", "ParentSet", "ChildSet", "ChildMember", "Child", }); + internal_static_authzed_api_materialize_v0_SetReference_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_authzed_api_materialize_v0_SetReference_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_SetReference_descriptor, + new java.lang.String[] { "ObjectType", "ObjectId", "PermissionOrRelation", }); + internal_static_authzed_api_materialize_v0_MemberReference_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_authzed_api_materialize_v0_MemberReference_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_MemberReference_descriptor, + new java.lang.String[] { "ObjectType", "ObjectId", "OptionalPermissionOrRelation", }); + internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequired_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequired_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_LookupPermissionSetsRequired_descriptor, + new java.lang.String[] { "RequiredLookupAt", }); + internal_static_authzed_api_materialize_v0_BreakingSchemaChange_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_authzed_api_materialize_v0_BreakingSchemaChange_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_materialize_v0_BreakingSchemaChange_descriptor, + new java.lang.String[] { "ChangeAt", }); + com.authzed.api.v1.Core.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/v0/Core.java b/generated/com/authzed/api/v0/Core.java new file mode 100644 index 00000000..5ffaa0ea --- /dev/null +++ b/generated/com/authzed/api/v0/Core.java @@ -0,0 +1,3363 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v0/core.proto + +package com.authzed.api.v0; + +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 RelationTupleOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.RelationTuple) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Each tupleset specifies keys of a set of relation tuples. The set can
+     * include a single tuple key, or all tuples with a given object ID or
+     * userset in a namespace, optionally constrained by a relation name.
+     * examples:
+     * doc:readme#viewer@group:eng#member (fully specified)
+     * doc:*#*#group:eng#member (all tuples that this userset relates to)
+     * doc:12345#*#* (all tuples with a direct relationship to a document)
+     * doc:12345#writer#* (all tuples with direct write relationship with the
+     * document) doc:#writer#group:eng#member (all tuples that eng group has write
+     * relationship)
+     * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + * @return Whether the objectAndRelation field is set. + */ + boolean hasObjectAndRelation(); + /** + *
+     * Each tupleset specifies keys of a set of relation tuples. The set can
+     * include a single tuple key, or all tuples with a given object ID or
+     * userset in a namespace, optionally constrained by a relation name.
+     * examples:
+     * doc:readme#viewer@group:eng#member (fully specified)
+     * doc:*#*#group:eng#member (all tuples that this userset relates to)
+     * doc:12345#*#* (all tuples with a direct relationship to a document)
+     * doc:12345#writer#* (all tuples with direct write relationship with the
+     * document) doc:#writer#group:eng#member (all tuples that eng group has write
+     * relationship)
+     * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + * @return The objectAndRelation. + */ + com.authzed.api.v0.Core.ObjectAndRelation getObjectAndRelation(); + /** + *
+     * Each tupleset specifies keys of a set of relation tuples. The set can
+     * include a single tuple key, or all tuples with a given object ID or
+     * userset in a namespace, optionally constrained by a relation name.
+     * examples:
+     * doc:readme#viewer@group:eng#member (fully specified)
+     * doc:*#*#group:eng#member (all tuples that this userset relates to)
+     * doc:12345#*#* (all tuples with a direct relationship to a document)
+     * doc:12345#writer#* (all tuples with direct write relationship with the
+     * document) doc:#writer#group:eng#member (all tuples that eng group has write
+     * relationship)
+     * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + */ + com.authzed.api.v0.Core.ObjectAndRelationOrBuilder getObjectAndRelationOrBuilder(); + + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + * @return The user. + */ + com.authzed.api.v0.Core.User getUser(); + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + */ + com.authzed.api.v0.Core.UserOrBuilder getUserOrBuilder(); + } + /** + * Protobuf type {@code authzed.api.v0.RelationTuple} + */ + public static final class RelationTuple extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.RelationTuple) + RelationTupleOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelationTuple.newBuilder() to construct. + private RelationTuple(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelationTuple() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelationTuple(); + } + + @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.v0.Core.internal_static_authzed_api_v0_RelationTuple_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_RelationTuple_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Core.RelationTuple.class, com.authzed.api.v0.Core.RelationTuple.Builder.class); + } + + public static final int OBJECT_AND_RELATION_FIELD_NUMBER = 1; + private com.authzed.api.v0.Core.ObjectAndRelation objectAndRelation_; + /** + *
+     * Each tupleset specifies keys of a set of relation tuples. The set can
+     * include a single tuple key, or all tuples with a given object ID or
+     * userset in a namespace, optionally constrained by a relation name.
+     * examples:
+     * doc:readme#viewer@group:eng#member (fully specified)
+     * doc:*#*#group:eng#member (all tuples that this userset relates to)
+     * doc:12345#*#* (all tuples with a direct relationship to a document)
+     * doc:12345#writer#* (all tuples with direct write relationship with the
+     * document) doc:#writer#group:eng#member (all tuples that eng group has write
+     * relationship)
+     * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + * @return Whether the objectAndRelation field is set. + */ + @java.lang.Override + public boolean hasObjectAndRelation() { + return objectAndRelation_ != null; + } + /** + *
+     * Each tupleset specifies keys of a set of relation tuples. The set can
+     * include a single tuple key, or all tuples with a given object ID or
+     * userset in a namespace, optionally constrained by a relation name.
+     * examples:
+     * doc:readme#viewer@group:eng#member (fully specified)
+     * doc:*#*#group:eng#member (all tuples that this userset relates to)
+     * doc:12345#*#* (all tuples with a direct relationship to a document)
+     * doc:12345#writer#* (all tuples with direct write relationship with the
+     * document) doc:#writer#group:eng#member (all tuples that eng group has write
+     * relationship)
+     * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + * @return The objectAndRelation. + */ + @java.lang.Override + public com.authzed.api.v0.Core.ObjectAndRelation getObjectAndRelation() { + return objectAndRelation_ == null ? com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance() : objectAndRelation_; + } + /** + *
+     * Each tupleset specifies keys of a set of relation tuples. The set can
+     * include a single tuple key, or all tuples with a given object ID or
+     * userset in a namespace, optionally constrained by a relation name.
+     * examples:
+     * doc:readme#viewer@group:eng#member (fully specified)
+     * doc:*#*#group:eng#member (all tuples that this userset relates to)
+     * doc:12345#*#* (all tuples with a direct relationship to a document)
+     * doc:12345#writer#* (all tuples with direct write relationship with the
+     * document) doc:#writer#group:eng#member (all tuples that eng group has write
+     * relationship)
+     * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v0.Core.ObjectAndRelationOrBuilder getObjectAndRelationOrBuilder() { + return objectAndRelation_ == null ? com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance() : objectAndRelation_; + } + + public static final int USER_FIELD_NUMBER = 2; + private com.authzed.api.v0.Core.User user_; + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + * @return The user. + */ + @java.lang.Override + public com.authzed.api.v0.Core.User getUser() { + return user_ == null ? com.authzed.api.v0.Core.User.getDefaultInstance() : user_; + } + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v0.Core.UserOrBuilder getUserOrBuilder() { + return user_ == null ? com.authzed.api.v0.Core.User.getDefaultInstance() : user_; + } + + 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 (objectAndRelation_ != null) { + output.writeMessage(1, getObjectAndRelation()); + } + if (user_ != null) { + output.writeMessage(2, getUser()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (objectAndRelation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getObjectAndRelation()); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + 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.v0.Core.RelationTuple)) { + return super.equals(obj); + } + com.authzed.api.v0.Core.RelationTuple other = (com.authzed.api.v0.Core.RelationTuple) obj; + + if (hasObjectAndRelation() != other.hasObjectAndRelation()) return false; + if (hasObjectAndRelation()) { + if (!getObjectAndRelation() + .equals(other.getObjectAndRelation())) return false; + } + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) 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 (hasObjectAndRelation()) { + hash = (37 * hash) + OBJECT_AND_RELATION_FIELD_NUMBER; + hash = (53 * hash) + getObjectAndRelation().hashCode(); + } + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Core.RelationTuple parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.RelationTuple 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.v0.Core.RelationTuple parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.RelationTuple 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.v0.Core.RelationTuple parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.RelationTuple parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Core.RelationTuple parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.RelationTuple 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.v0.Core.RelationTuple parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.RelationTuple 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.v0.Core.RelationTuple parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.RelationTuple 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.v0.Core.RelationTuple 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; + } + /** + * Protobuf type {@code authzed.api.v0.RelationTuple} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.RelationTuple) + com.authzed.api.v0.Core.RelationTupleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_RelationTuple_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_RelationTuple_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Core.RelationTuple.class, com.authzed.api.v0.Core.RelationTuple.Builder.class); + } + + // Construct using com.authzed.api.v0.Core.RelationTuple.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + objectAndRelation_ = null; + if (objectAndRelationBuilder_ != null) { + objectAndRelationBuilder_.dispose(); + objectAndRelationBuilder_ = null; + } + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_RelationTuple_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Core.RelationTuple getDefaultInstanceForType() { + return com.authzed.api.v0.Core.RelationTuple.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Core.RelationTuple build() { + com.authzed.api.v0.Core.RelationTuple result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Core.RelationTuple buildPartial() { + com.authzed.api.v0.Core.RelationTuple result = new com.authzed.api.v0.Core.RelationTuple(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Core.RelationTuple result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.objectAndRelation_ = objectAndRelationBuilder_ == null + ? objectAndRelation_ + : objectAndRelationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.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.v0.Core.RelationTuple) { + return mergeFrom((com.authzed.api.v0.Core.RelationTuple)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Core.RelationTuple other) { + if (other == com.authzed.api.v0.Core.RelationTuple.getDefaultInstance()) return this; + if (other.hasObjectAndRelation()) { + mergeObjectAndRelation(other.getObjectAndRelation()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + 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( + getObjectAndRelationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().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 com.authzed.api.v0.Core.ObjectAndRelation objectAndRelation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.ObjectAndRelation, com.authzed.api.v0.Core.ObjectAndRelation.Builder, com.authzed.api.v0.Core.ObjectAndRelationOrBuilder> objectAndRelationBuilder_; + /** + *
+       * Each tupleset specifies keys of a set of relation tuples. The set can
+       * include a single tuple key, or all tuples with a given object ID or
+       * userset in a namespace, optionally constrained by a relation name.
+       * examples:
+       * doc:readme#viewer@group:eng#member (fully specified)
+       * doc:*#*#group:eng#member (all tuples that this userset relates to)
+       * doc:12345#*#* (all tuples with a direct relationship to a document)
+       * doc:12345#writer#* (all tuples with direct write relationship with the
+       * document) doc:#writer#group:eng#member (all tuples that eng group has write
+       * relationship)
+       * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + * @return Whether the objectAndRelation field is set. + */ + public boolean hasObjectAndRelation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+       * Each tupleset specifies keys of a set of relation tuples. The set can
+       * include a single tuple key, or all tuples with a given object ID or
+       * userset in a namespace, optionally constrained by a relation name.
+       * examples:
+       * doc:readme#viewer@group:eng#member (fully specified)
+       * doc:*#*#group:eng#member (all tuples that this userset relates to)
+       * doc:12345#*#* (all tuples with a direct relationship to a document)
+       * doc:12345#writer#* (all tuples with direct write relationship with the
+       * document) doc:#writer#group:eng#member (all tuples that eng group has write
+       * relationship)
+       * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + * @return The objectAndRelation. + */ + public com.authzed.api.v0.Core.ObjectAndRelation getObjectAndRelation() { + if (objectAndRelationBuilder_ == null) { + return objectAndRelation_ == null ? com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance() : objectAndRelation_; + } else { + return objectAndRelationBuilder_.getMessage(); + } + } + /** + *
+       * Each tupleset specifies keys of a set of relation tuples. The set can
+       * include a single tuple key, or all tuples with a given object ID or
+       * userset in a namespace, optionally constrained by a relation name.
+       * examples:
+       * doc:readme#viewer@group:eng#member (fully specified)
+       * doc:*#*#group:eng#member (all tuples that this userset relates to)
+       * doc:12345#*#* (all tuples with a direct relationship to a document)
+       * doc:12345#writer#* (all tuples with direct write relationship with the
+       * document) doc:#writer#group:eng#member (all tuples that eng group has write
+       * relationship)
+       * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + */ + public Builder setObjectAndRelation(com.authzed.api.v0.Core.ObjectAndRelation value) { + if (objectAndRelationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + objectAndRelation_ = value; + } else { + objectAndRelationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Each tupleset specifies keys of a set of relation tuples. The set can
+       * include a single tuple key, or all tuples with a given object ID or
+       * userset in a namespace, optionally constrained by a relation name.
+       * examples:
+       * doc:readme#viewer@group:eng#member (fully specified)
+       * doc:*#*#group:eng#member (all tuples that this userset relates to)
+       * doc:12345#*#* (all tuples with a direct relationship to a document)
+       * doc:12345#writer#* (all tuples with direct write relationship with the
+       * document) doc:#writer#group:eng#member (all tuples that eng group has write
+       * relationship)
+       * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + */ + public Builder setObjectAndRelation( + com.authzed.api.v0.Core.ObjectAndRelation.Builder builderForValue) { + if (objectAndRelationBuilder_ == null) { + objectAndRelation_ = builderForValue.build(); + } else { + objectAndRelationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Each tupleset specifies keys of a set of relation tuples. The set can
+       * include a single tuple key, or all tuples with a given object ID or
+       * userset in a namespace, optionally constrained by a relation name.
+       * examples:
+       * doc:readme#viewer@group:eng#member (fully specified)
+       * doc:*#*#group:eng#member (all tuples that this userset relates to)
+       * doc:12345#*#* (all tuples with a direct relationship to a document)
+       * doc:12345#writer#* (all tuples with direct write relationship with the
+       * document) doc:#writer#group:eng#member (all tuples that eng group has write
+       * relationship)
+       * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + */ + public Builder mergeObjectAndRelation(com.authzed.api.v0.Core.ObjectAndRelation value) { + if (objectAndRelationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + objectAndRelation_ != null && + objectAndRelation_ != com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance()) { + getObjectAndRelationBuilder().mergeFrom(value); + } else { + objectAndRelation_ = value; + } + } else { + objectAndRelationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Each tupleset specifies keys of a set of relation tuples. The set can
+       * include a single tuple key, or all tuples with a given object ID or
+       * userset in a namespace, optionally constrained by a relation name.
+       * examples:
+       * doc:readme#viewer@group:eng#member (fully specified)
+       * doc:*#*#group:eng#member (all tuples that this userset relates to)
+       * doc:12345#*#* (all tuples with a direct relationship to a document)
+       * doc:12345#writer#* (all tuples with direct write relationship with the
+       * document) doc:#writer#group:eng#member (all tuples that eng group has write
+       * relationship)
+       * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + */ + public Builder clearObjectAndRelation() { + bitField0_ = (bitField0_ & ~0x00000001); + objectAndRelation_ = null; + if (objectAndRelationBuilder_ != null) { + objectAndRelationBuilder_.dispose(); + objectAndRelationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Each tupleset specifies keys of a set of relation tuples. The set can
+       * include a single tuple key, or all tuples with a given object ID or
+       * userset in a namespace, optionally constrained by a relation name.
+       * examples:
+       * doc:readme#viewer@group:eng#member (fully specified)
+       * doc:*#*#group:eng#member (all tuples that this userset relates to)
+       * doc:12345#*#* (all tuples with a direct relationship to a document)
+       * doc:12345#writer#* (all tuples with direct write relationship with the
+       * document) doc:#writer#group:eng#member (all tuples that eng group has write
+       * relationship)
+       * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + */ + public com.authzed.api.v0.Core.ObjectAndRelation.Builder getObjectAndRelationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getObjectAndRelationFieldBuilder().getBuilder(); + } + /** + *
+       * Each tupleset specifies keys of a set of relation tuples. The set can
+       * include a single tuple key, or all tuples with a given object ID or
+       * userset in a namespace, optionally constrained by a relation name.
+       * examples:
+       * doc:readme#viewer@group:eng#member (fully specified)
+       * doc:*#*#group:eng#member (all tuples that this userset relates to)
+       * doc:12345#*#* (all tuples with a direct relationship to a document)
+       * doc:12345#writer#* (all tuples with direct write relationship with the
+       * document) doc:#writer#group:eng#member (all tuples that eng group has write
+       * relationship)
+       * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + */ + public com.authzed.api.v0.Core.ObjectAndRelationOrBuilder getObjectAndRelationOrBuilder() { + if (objectAndRelationBuilder_ != null) { + return objectAndRelationBuilder_.getMessageOrBuilder(); + } else { + return objectAndRelation_ == null ? + com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance() : objectAndRelation_; + } + } + /** + *
+       * Each tupleset specifies keys of a set of relation tuples. The set can
+       * include a single tuple key, or all tuples with a given object ID or
+       * userset in a namespace, optionally constrained by a relation name.
+       * examples:
+       * doc:readme#viewer@group:eng#member (fully specified)
+       * doc:*#*#group:eng#member (all tuples that this userset relates to)
+       * doc:12345#*#* (all tuples with a direct relationship to a document)
+       * doc:12345#writer#* (all tuples with direct write relationship with the
+       * document) doc:#writer#group:eng#member (all tuples that eng group has write
+       * relationship)
+       * 
+ * + * .authzed.api.v0.ObjectAndRelation object_and_relation = 1 [json_name = "objectAndRelation", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.ObjectAndRelation, com.authzed.api.v0.Core.ObjectAndRelation.Builder, com.authzed.api.v0.Core.ObjectAndRelationOrBuilder> + getObjectAndRelationFieldBuilder() { + if (objectAndRelationBuilder_ == null) { + objectAndRelationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.ObjectAndRelation, com.authzed.api.v0.Core.ObjectAndRelation.Builder, com.authzed.api.v0.Core.ObjectAndRelationOrBuilder>( + getObjectAndRelation(), + getParentForChildren(), + isClean()); + objectAndRelation_ = null; + } + return objectAndRelationBuilder_; + } + + private com.authzed.api.v0.Core.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.User, com.authzed.api.v0.Core.User.Builder, com.authzed.api.v0.Core.UserOrBuilder> userBuilder_; + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + * @return The user. + */ + public com.authzed.api.v0.Core.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? com.authzed.api.v0.Core.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + */ + public Builder setUser(com.authzed.api.v0.Core.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + */ + public Builder setUser( + com.authzed.api.v0.Core.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + */ + public Builder mergeUser(com.authzed.api.v0.Core.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != com.authzed.api.v0.Core.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + */ + public com.authzed.api.v0.Core.User.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + */ + public com.authzed.api.v0.Core.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + com.authzed.api.v0.Core.User.getDefaultInstance() : user_; + } + } + /** + * .authzed.api.v0.User user = 2 [json_name = "user", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.User, com.authzed.api.v0.Core.User.Builder, com.authzed.api.v0.Core.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.User, com.authzed.api.v0.Core.User.Builder, com.authzed.api.v0.Core.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + @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.v0.RelationTuple) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.RelationTuple) + private static final com.authzed.api.v0.Core.RelationTuple DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Core.RelationTuple(); + } + + public static com.authzed.api.v0.Core.RelationTuple getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelationTuple 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.v0.Core.RelationTuple getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ObjectAndRelationOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.ObjectAndRelation) + com.google.protobuf.MessageOrBuilder { + + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The namespace. + */ + java.lang.String getNamespace(); + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The bytes for namespace. + */ + com.google.protobuf.ByteString + getNamespaceBytes(); + + /** + * string object_id = 2 [json_name = "objectId", (.validate.rules) = { ... } + * @return The objectId. + */ + java.lang.String getObjectId(); + /** + * string object_id = 2 [json_name = "objectId", (.validate.rules) = { ... } + * @return The bytes for objectId. + */ + com.google.protobuf.ByteString + getObjectIdBytes(); + + /** + * string relation = 3 [json_name = "relation", (.validate.rules) = { ... } + * @return The relation. + */ + java.lang.String getRelation(); + /** + * string relation = 3 [json_name = "relation", (.validate.rules) = { ... } + * @return The bytes for relation. + */ + com.google.protobuf.ByteString + getRelationBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.ObjectAndRelation} + */ + public static final class ObjectAndRelation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.ObjectAndRelation) + ObjectAndRelationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectAndRelation.newBuilder() to construct. + private ObjectAndRelation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ObjectAndRelation() { + namespace_ = ""; + objectId_ = ""; + relation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ObjectAndRelation(); + } + + @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.v0.Core.internal_static_authzed_api_v0_ObjectAndRelation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_ObjectAndRelation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Core.ObjectAndRelation.class, com.authzed.api.v0.Core.ObjectAndRelation.Builder.class); + } + + public static final int NAMESPACE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object namespace_ = ""; + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The namespace. + */ + @java.lang.Override + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + 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(); + namespace_ = s; + return s; + } + } + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The bytes for namespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespace_ = 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 [json_name = "objectId", (.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 [json_name = "objectId", (.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; + } + } + + public static final int RELATION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object relation_ = ""; + /** + * string relation = 3 [json_name = "relation", (.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; + } + } + /** + * string relation = 3 [json_name = "relation", (.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; + } + } + + 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(namespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, relation_); + } + 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(namespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, relation_); + } + 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.v0.Core.ObjectAndRelation)) { + return super.equals(obj); + } + com.authzed.api.v0.Core.ObjectAndRelation other = (com.authzed.api.v0.Core.ObjectAndRelation) obj; + + if (!getNamespace() + .equals(other.getNamespace())) return false; + if (!getObjectId() + .equals(other.getObjectId())) return false; + if (!getRelation() + .equals(other.getRelation())) 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) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + hash = (37 * hash) + OBJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getObjectId().hashCode(); + hash = (37 * hash) + RELATION_FIELD_NUMBER; + hash = (53 * hash) + getRelation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Core.ObjectAndRelation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.ObjectAndRelation 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.v0.Core.ObjectAndRelation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.ObjectAndRelation 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.v0.Core.ObjectAndRelation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.ObjectAndRelation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Core.ObjectAndRelation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.ObjectAndRelation 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.v0.Core.ObjectAndRelation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.ObjectAndRelation 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.v0.Core.ObjectAndRelation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.ObjectAndRelation 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.v0.Core.ObjectAndRelation 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; + } + /** + * Protobuf type {@code authzed.api.v0.ObjectAndRelation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.ObjectAndRelation) + com.authzed.api.v0.Core.ObjectAndRelationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_ObjectAndRelation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_ObjectAndRelation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Core.ObjectAndRelation.class, com.authzed.api.v0.Core.ObjectAndRelation.Builder.class); + } + + // Construct using com.authzed.api.v0.Core.ObjectAndRelation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + namespace_ = ""; + objectId_ = ""; + relation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_ObjectAndRelation_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Core.ObjectAndRelation getDefaultInstanceForType() { + return com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Core.ObjectAndRelation build() { + com.authzed.api.v0.Core.ObjectAndRelation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Core.ObjectAndRelation buildPartial() { + com.authzed.api.v0.Core.ObjectAndRelation result = new com.authzed.api.v0.Core.ObjectAndRelation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Core.ObjectAndRelation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.namespace_ = namespace_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.objectId_ = objectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.relation_ = relation_; + } + } + + @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.v0.Core.ObjectAndRelation) { + return mergeFrom((com.authzed.api.v0.Core.ObjectAndRelation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Core.ObjectAndRelation other) { + if (other == com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance()) return this; + if (!other.getNamespace().isEmpty()) { + namespace_ = other.namespace_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getObjectId().isEmpty()) { + objectId_ = other.objectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRelation().isEmpty()) { + relation_ = other.relation_; + bitField0_ |= 0x00000004; + 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: { + namespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + objectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + relation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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 namespace_ = ""; + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The namespace. + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The bytes for namespace. + */ + public com.google.protobuf.ByteString + getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @param value The namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespace( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + namespace_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearNamespace() { + namespace_ = getDefaultInstance().getNamespace(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @param value The bytes for namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespaceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + namespace_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object objectId_ = ""; + /** + * string object_id = 2 [json_name = "objectId", (.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 [json_name = "objectId", (.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 [json_name = "objectId", (.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 [json_name = "objectId", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearObjectId() { + objectId_ = getDefaultInstance().getObjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string object_id = 2 [json_name = "objectId", (.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; + } + + private java.lang.Object relation_ = ""; + /** + * string relation = 3 [json_name = "relation", (.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; + } + } + /** + * string relation = 3 [json_name = "relation", (.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; + } + } + /** + * string relation = 3 [json_name = "relation", (.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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string relation = 3 [json_name = "relation", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearRelation() { + relation_ = getDefaultInstance().getRelation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string relation = 3 [json_name = "relation", (.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_ |= 0x00000004; + 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.v0.ObjectAndRelation) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.ObjectAndRelation) + private static final com.authzed.api.v0.Core.ObjectAndRelation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Core.ObjectAndRelation(); + } + + public static com.authzed.api.v0.Core.ObjectAndRelation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectAndRelation 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.v0.Core.ObjectAndRelation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RelationReferenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.RelationReference) + com.google.protobuf.MessageOrBuilder { + + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The namespace. + */ + java.lang.String getNamespace(); + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The bytes for namespace. + */ + com.google.protobuf.ByteString + getNamespaceBytes(); + + /** + * string relation = 3 [json_name = "relation", (.validate.rules) = { ... } + * @return The relation. + */ + java.lang.String getRelation(); + /** + * string relation = 3 [json_name = "relation", (.validate.rules) = { ... } + * @return The bytes for relation. + */ + com.google.protobuf.ByteString + getRelationBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.RelationReference} + */ + public static final class RelationReference extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.RelationReference) + RelationReferenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelationReference.newBuilder() to construct. + private RelationReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelationReference() { + namespace_ = ""; + relation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelationReference(); + } + + @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.v0.Core.internal_static_authzed_api_v0_RelationReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_RelationReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Core.RelationReference.class, com.authzed.api.v0.Core.RelationReference.Builder.class); + } + + public static final int NAMESPACE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object namespace_ = ""; + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The namespace. + */ + @java.lang.Override + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + 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(); + namespace_ = s; + return s; + } + } + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The bytes for namespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object relation_ = ""; + /** + * string relation = 3 [json_name = "relation", (.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; + } + } + /** + * string relation = 3 [json_name = "relation", (.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; + } + } + + 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(namespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, relation_); + } + 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(namespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, relation_); + } + 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.v0.Core.RelationReference)) { + return super.equals(obj); + } + com.authzed.api.v0.Core.RelationReference other = (com.authzed.api.v0.Core.RelationReference) obj; + + if (!getNamespace() + .equals(other.getNamespace())) return false; + if (!getRelation() + .equals(other.getRelation())) 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) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + hash = (37 * hash) + RELATION_FIELD_NUMBER; + hash = (53 * hash) + getRelation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Core.RelationReference parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.RelationReference 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.v0.Core.RelationReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.RelationReference 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.v0.Core.RelationReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.RelationReference parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Core.RelationReference parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.RelationReference 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.v0.Core.RelationReference parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.RelationReference 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.v0.Core.RelationReference parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.RelationReference 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.v0.Core.RelationReference 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; + } + /** + * Protobuf type {@code authzed.api.v0.RelationReference} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.RelationReference) + com.authzed.api.v0.Core.RelationReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_RelationReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_RelationReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Core.RelationReference.class, com.authzed.api.v0.Core.RelationReference.Builder.class); + } + + // Construct using com.authzed.api.v0.Core.RelationReference.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + namespace_ = ""; + relation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_RelationReference_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Core.RelationReference getDefaultInstanceForType() { + return com.authzed.api.v0.Core.RelationReference.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Core.RelationReference build() { + com.authzed.api.v0.Core.RelationReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Core.RelationReference buildPartial() { + com.authzed.api.v0.Core.RelationReference result = new com.authzed.api.v0.Core.RelationReference(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Core.RelationReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.namespace_ = namespace_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relation_ = relation_; + } + } + + @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.v0.Core.RelationReference) { + return mergeFrom((com.authzed.api.v0.Core.RelationReference)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Core.RelationReference other) { + if (other == com.authzed.api.v0.Core.RelationReference.getDefaultInstance()) return this; + if (!other.getNamespace().isEmpty()) { + namespace_ = other.namespace_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRelation().isEmpty()) { + relation_ = other.relation_; + 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: { + namespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: { + relation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + 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 namespace_ = ""; + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The namespace. + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return The bytes for namespace. + */ + public com.google.protobuf.ByteString + getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @param value The namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespace( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + namespace_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearNamespace() { + namespace_ = getDefaultInstance().getNamespace(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string namespace = 1 [json_name = "namespace", (.validate.rules) = { ... } + * @param value The bytes for namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespaceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + namespace_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object relation_ = ""; + /** + * string relation = 3 [json_name = "relation", (.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; + } + } + /** + * string relation = 3 [json_name = "relation", (.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; + } + } + /** + * string relation = 3 [json_name = "relation", (.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; + } + /** + * string relation = 3 [json_name = "relation", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearRelation() { + relation_ = getDefaultInstance().getRelation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string relation = 3 [json_name = "relation", (.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; + } + @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.v0.RelationReference) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.RelationReference) + private static final com.authzed.api.v0.Core.RelationReference DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Core.RelationReference(); + } + + public static com.authzed.api.v0.Core.RelationReference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelationReference 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.v0.Core.RelationReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UserOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.User) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + * @return Whether the userset field is set. + */ + boolean hasUserset(); + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + * @return The userset. + */ + com.authzed.api.v0.Core.ObjectAndRelation getUserset(); + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + */ + com.authzed.api.v0.Core.ObjectAndRelationOrBuilder getUsersetOrBuilder(); + + public com.authzed.api.v0.Core.User.UserOneofCase getUserOneofCase(); + } + /** + * Protobuf type {@code authzed.api.v0.User} + */ + public static final class User extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.User) + UserOrBuilder { + private static final long serialVersionUID = 0L; + // Use User.newBuilder() to construct. + private User(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private User() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new User(); + } + + @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.v0.Core.internal_static_authzed_api_v0_User_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Core.User.class, com.authzed.api.v0.Core.User.Builder.class); + } + + private int userOneofCase_ = 0; + private java.lang.Object userOneof_; + public enum UserOneofCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USERSET(2), + USERONEOF_NOT_SET(0); + private final int value; + private UserOneofCase(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 UserOneofCase valueOf(int value) { + return forNumber(value); + } + + public static UserOneofCase forNumber(int value) { + switch (value) { + case 2: return USERSET; + case 0: return USERONEOF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public UserOneofCase + getUserOneofCase() { + return UserOneofCase.forNumber( + userOneofCase_); + } + + public static final int USERSET_FIELD_NUMBER = 2; + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + * @return Whether the userset field is set. + */ + @java.lang.Override + public boolean hasUserset() { + return userOneofCase_ == 2; + } + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + * @return The userset. + */ + @java.lang.Override + public com.authzed.api.v0.Core.ObjectAndRelation getUserset() { + if (userOneofCase_ == 2) { + return (com.authzed.api.v0.Core.ObjectAndRelation) userOneof_; + } + return com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance(); + } + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v0.Core.ObjectAndRelationOrBuilder getUsersetOrBuilder() { + if (userOneofCase_ == 2) { + return (com.authzed.api.v0.Core.ObjectAndRelation) userOneof_; + } + return com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance(); + } + + 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 (userOneofCase_ == 2) { + output.writeMessage(2, (com.authzed.api.v0.Core.ObjectAndRelation) userOneof_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userOneofCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.authzed.api.v0.Core.ObjectAndRelation) userOneof_); + } + 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.v0.Core.User)) { + return super.equals(obj); + } + com.authzed.api.v0.Core.User other = (com.authzed.api.v0.Core.User) obj; + + if (!getUserOneofCase().equals(other.getUserOneofCase())) return false; + switch (userOneofCase_) { + case 2: + if (!getUserset() + .equals(other.getUserset())) 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(); + switch (userOneofCase_) { + case 2: + hash = (37 * hash) + USERSET_FIELD_NUMBER; + hash = (53 * hash) + getUserset().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Core.User parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.User 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.v0.Core.User parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.User 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.v0.Core.User parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Core.User parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Core.User parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.User 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.v0.Core.User parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.User 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.v0.Core.User parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Core.User 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.v0.Core.User 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; + } + /** + * Protobuf type {@code authzed.api.v0.User} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.User) + com.authzed.api.v0.Core.UserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_User_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Core.User.class, com.authzed.api.v0.Core.User.Builder.class); + } + + // Construct using com.authzed.api.v0.Core.User.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (usersetBuilder_ != null) { + usersetBuilder_.clear(); + } + userOneofCase_ = 0; + userOneof_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Core.internal_static_authzed_api_v0_User_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Core.User getDefaultInstanceForType() { + return com.authzed.api.v0.Core.User.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Core.User build() { + com.authzed.api.v0.Core.User result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Core.User buildPartial() { + com.authzed.api.v0.Core.User result = new com.authzed.api.v0.Core.User(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Core.User result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.authzed.api.v0.Core.User result) { + result.userOneofCase_ = userOneofCase_; + result.userOneof_ = this.userOneof_; + if (userOneofCase_ == 2 && + usersetBuilder_ != null) { + result.userOneof_ = usersetBuilder_.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.v0.Core.User) { + return mergeFrom((com.authzed.api.v0.Core.User)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Core.User other) { + if (other == com.authzed.api.v0.Core.User.getDefaultInstance()) return this; + switch (other.getUserOneofCase()) { + case USERSET: { + mergeUserset(other.getUserset()); + break; + } + case USERONEOF_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 18: { + input.readMessage( + getUsersetFieldBuilder().getBuilder(), + extensionRegistry); + userOneofCase_ = 2; + 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 userOneofCase_ = 0; + private java.lang.Object userOneof_; + public UserOneofCase + getUserOneofCase() { + return UserOneofCase.forNumber( + userOneofCase_); + } + + public Builder clearUserOneof() { + userOneofCase_ = 0; + userOneof_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.ObjectAndRelation, com.authzed.api.v0.Core.ObjectAndRelation.Builder, com.authzed.api.v0.Core.ObjectAndRelationOrBuilder> usersetBuilder_; + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + * @return Whether the userset field is set. + */ + @java.lang.Override + public boolean hasUserset() { + return userOneofCase_ == 2; + } + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + * @return The userset. + */ + @java.lang.Override + public com.authzed.api.v0.Core.ObjectAndRelation getUserset() { + if (usersetBuilder_ == null) { + if (userOneofCase_ == 2) { + return (com.authzed.api.v0.Core.ObjectAndRelation) userOneof_; + } + return com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance(); + } else { + if (userOneofCase_ == 2) { + return usersetBuilder_.getMessage(); + } + return com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance(); + } + } + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + */ + public Builder setUserset(com.authzed.api.v0.Core.ObjectAndRelation value) { + if (usersetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userOneof_ = value; + onChanged(); + } else { + usersetBuilder_.setMessage(value); + } + userOneofCase_ = 2; + return this; + } + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + */ + public Builder setUserset( + com.authzed.api.v0.Core.ObjectAndRelation.Builder builderForValue) { + if (usersetBuilder_ == null) { + userOneof_ = builderForValue.build(); + onChanged(); + } else { + usersetBuilder_.setMessage(builderForValue.build()); + } + userOneofCase_ = 2; + return this; + } + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + */ + public Builder mergeUserset(com.authzed.api.v0.Core.ObjectAndRelation value) { + if (usersetBuilder_ == null) { + if (userOneofCase_ == 2 && + userOneof_ != com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance()) { + userOneof_ = com.authzed.api.v0.Core.ObjectAndRelation.newBuilder((com.authzed.api.v0.Core.ObjectAndRelation) userOneof_) + .mergeFrom(value).buildPartial(); + } else { + userOneof_ = value; + } + onChanged(); + } else { + if (userOneofCase_ == 2) { + usersetBuilder_.mergeFrom(value); + } else { + usersetBuilder_.setMessage(value); + } + } + userOneofCase_ = 2; + return this; + } + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + */ + public Builder clearUserset() { + if (usersetBuilder_ == null) { + if (userOneofCase_ == 2) { + userOneofCase_ = 0; + userOneof_ = null; + onChanged(); + } + } else { + if (userOneofCase_ == 2) { + userOneofCase_ = 0; + userOneof_ = null; + } + usersetBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + */ + public com.authzed.api.v0.Core.ObjectAndRelation.Builder getUsersetBuilder() { + return getUsersetFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v0.Core.ObjectAndRelationOrBuilder getUsersetOrBuilder() { + if ((userOneofCase_ == 2) && (usersetBuilder_ != null)) { + return usersetBuilder_.getMessageOrBuilder(); + } else { + if (userOneofCase_ == 2) { + return (com.authzed.api.v0.Core.ObjectAndRelation) userOneof_; + } + return com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance(); + } + } + /** + * .authzed.api.v0.ObjectAndRelation userset = 2 [json_name = "userset", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.ObjectAndRelation, com.authzed.api.v0.Core.ObjectAndRelation.Builder, com.authzed.api.v0.Core.ObjectAndRelationOrBuilder> + getUsersetFieldBuilder() { + if (usersetBuilder_ == null) { + if (!(userOneofCase_ == 2)) { + userOneof_ = com.authzed.api.v0.Core.ObjectAndRelation.getDefaultInstance(); + } + usersetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.ObjectAndRelation, com.authzed.api.v0.Core.ObjectAndRelation.Builder, com.authzed.api.v0.Core.ObjectAndRelationOrBuilder>( + (com.authzed.api.v0.Core.ObjectAndRelation) userOneof_, + getParentForChildren(), + isClean()); + userOneof_ = null; + } + userOneofCase_ = 2; + onChanged(); + return usersetBuilder_; + } + @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.v0.User) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.User) + private static final com.authzed.api.v0.Core.User DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Core.User(); + } + + public static com.authzed.api.v0.Core.User getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public User 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.v0.Core.User getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_RelationTuple_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_RelationTuple_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_ObjectAndRelation_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_ObjectAndRelation_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_RelationReference_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_RelationReference_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_User_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_User_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/v0/core.proto\022\016authzed.api" + + ".v0\032\027validate/validate.proto\"\240\001\n\rRelatio" + + "nTuple\022[\n\023object_and_relation\030\001 \001(\0132!.au" + + "thzed.api.v0.ObjectAndRelationB\010\372B\005\212\001\002\020\001" + + "R\021objectAndRelation\0222\n\004user\030\002 \001(\0132\024.auth" + + "zed.api.v0.UserB\010\372B\005\212\001\002\020\001R\004user\"\235\002\n\021Obje" + + "ctAndRelation\022f\n\tnamespace\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]$R\tnamespace\022R\n" + + "\tobject_id\030\002 \001(\tB5\372B2r0(\200\0012+^(([a-zA-Z0-" + + "9_][a-zA-Z0-9/_|-]{0,127})|\\*)$R\010objectI" + + "d\022L\n\010relation\030\003 \001(\tB0\372B-r+(@2\'^(\\.\\.\\.|[" + + "a-z][a-z0-9_]{1,62}[a-z0-9])$R\010relation\"" + + "\311\001\n\021RelationReference\022f\n\tnamespace\030\001 \001(\t" + + "BH\372BErC(\200\0012>^([a-z][a-z0-9_]{1,61}[a-z0-" + + "9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$R\tname" + + "space\022L\n\010relation\030\003 \001(\tB0\372B-r+(@2\'^(\\.\\." + + "\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$R\010relat" + + "ion\"b\n\004User\022G\n\007userset\030\002 \001(\0132!.authzed.a" + + "pi.v0.ObjectAndRelationB\010\372B\005\212\001\002\020\001H\000R\007use" + + "rsetB\021\n\nuser_oneof\022\003\370B\001BH\n\022com.authzed.a" + + "pi.v0Z2github.com/authzed/authzed-go/pro" + + "to/authzed/api/v0b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.envoyproxy.pgv.validate.Validate.getDescriptor(), + }); + internal_static_authzed_api_v0_RelationTuple_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_v0_RelationTuple_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_RelationTuple_descriptor, + new java.lang.String[] { "ObjectAndRelation", "User", }); + internal_static_authzed_api_v0_ObjectAndRelation_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_v0_ObjectAndRelation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_ObjectAndRelation_descriptor, + new java.lang.String[] { "Namespace", "ObjectId", "Relation", }); + internal_static_authzed_api_v0_RelationReference_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authzed_api_v0_RelationReference_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_RelationReference_descriptor, + new java.lang.String[] { "Namespace", "Relation", }); + internal_static_authzed_api_v0_User_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_authzed_api_v0_User_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_User_descriptor, + new java.lang.String[] { "Userset", "UserOneof", }); + 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); + io.envoyproxy.pgv.validate.Validate.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/v0/Developer.java b/generated/com/authzed/api/v0/Developer.java new file mode 100644 index 00000000..26f29d49 --- /dev/null +++ b/generated/com/authzed/api/v0/Developer.java @@ -0,0 +1,14159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v0/developer.proto + +package com.authzed.api.v0; + +public final class Developer { + private Developer() {} + 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 FormatSchemaRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.FormatSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string schema = 1 [json_name = "schema"]; + * @return The schema. + */ + java.lang.String getSchema(); + /** + * string schema = 1 [json_name = "schema"]; + * @return The bytes for schema. + */ + com.google.protobuf.ByteString + getSchemaBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.FormatSchemaRequest} + */ + public static final class FormatSchemaRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.FormatSchemaRequest) + FormatSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use FormatSchemaRequest.newBuilder() to construct. + private FormatSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FormatSchemaRequest() { + schema_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FormatSchemaRequest(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_FormatSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_FormatSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.FormatSchemaRequest.class, com.authzed.api.v0.Developer.FormatSchemaRequest.Builder.class); + } + + public static final int SCHEMA_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object schema_ = ""; + /** + * string schema = 1 [json_name = "schema"]; + * @return The schema. + */ + @java.lang.Override + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + 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(); + schema_ = s; + return s; + } + } + /** + * string schema = 1 [json_name = "schema"]; + * @return The bytes for schema. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = 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(schema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_); + } + 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(schema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_); + } + 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.v0.Developer.FormatSchemaRequest)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.FormatSchemaRequest other = (com.authzed.api.v0.Developer.FormatSchemaRequest) obj; + + if (!getSchema() + .equals(other.getSchema())) 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) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.FormatSchemaRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.FormatSchemaRequest 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.v0.Developer.FormatSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.FormatSchemaRequest 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.v0.Developer.FormatSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.FormatSchemaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.FormatSchemaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.FormatSchemaRequest 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.v0.Developer.FormatSchemaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.FormatSchemaRequest 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.v0.Developer.FormatSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.FormatSchemaRequest 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.v0.Developer.FormatSchemaRequest 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; + } + /** + * Protobuf type {@code authzed.api.v0.FormatSchemaRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.FormatSchemaRequest) + com.authzed.api.v0.Developer.FormatSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_FormatSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_FormatSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.FormatSchemaRequest.class, com.authzed.api.v0.Developer.FormatSchemaRequest.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.FormatSchemaRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schema_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_FormatSchemaRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.FormatSchemaRequest getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.FormatSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.FormatSchemaRequest build() { + com.authzed.api.v0.Developer.FormatSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.FormatSchemaRequest buildPartial() { + com.authzed.api.v0.Developer.FormatSchemaRequest result = new com.authzed.api.v0.Developer.FormatSchemaRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Developer.FormatSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schema_ = schema_; + } + } + + @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.v0.Developer.FormatSchemaRequest) { + return mergeFrom((com.authzed.api.v0.Developer.FormatSchemaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.FormatSchemaRequest other) { + if (other == com.authzed.api.v0.Developer.FormatSchemaRequest.getDefaultInstance()) return this; + if (!other.getSchema().isEmpty()) { + schema_ = other.schema_; + 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: { + schema_ = 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 schema_ = ""; + /** + * string schema = 1 [json_name = "schema"]; + * @return The schema. + */ + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string schema = 1 [json_name = "schema"]; + * @return The bytes for schema. + */ + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string schema = 1 [json_name = "schema"]; + * @param value The schema to set. + * @return This builder for chaining. + */ + public Builder setSchema( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string schema = 1 [json_name = "schema"]; + * @return This builder for chaining. + */ + public Builder clearSchema() { + schema_ = getDefaultInstance().getSchema(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string schema = 1 [json_name = "schema"]; + * @param value The bytes for schema to set. + * @return This builder for chaining. + */ + public Builder setSchemaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schema_ = 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.v0.FormatSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.FormatSchemaRequest) + private static final com.authzed.api.v0.Developer.FormatSchemaRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.FormatSchemaRequest(); + } + + public static com.authzed.api.v0.Developer.FormatSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FormatSchemaRequest 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.v0.Developer.FormatSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FormatSchemaResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.FormatSchemaResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return The error. + */ + com.authzed.api.v0.Developer.DeveloperError getError(); + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getErrorOrBuilder(); + + /** + * string formatted_schema = 2 [json_name = "formattedSchema"]; + * @return The formattedSchema. + */ + java.lang.String getFormattedSchema(); + /** + * string formatted_schema = 2 [json_name = "formattedSchema"]; + * @return The bytes for formattedSchema. + */ + com.google.protobuf.ByteString + getFormattedSchemaBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.FormatSchemaResponse} + */ + public static final class FormatSchemaResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.FormatSchemaResponse) + FormatSchemaResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use FormatSchemaResponse.newBuilder() to construct. + private FormatSchemaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FormatSchemaResponse() { + formattedSchema_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FormatSchemaResponse(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_FormatSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_FormatSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.FormatSchemaResponse.class, com.authzed.api.v0.Developer.FormatSchemaResponse.Builder.class); + } + + public static final int ERROR_FIELD_NUMBER = 1; + private com.authzed.api.v0.Developer.DeveloperError error_; + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return The error. + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError getError() { + return error_ == null ? com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getErrorOrBuilder() { + return error_ == null ? com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } + + public static final int FORMATTED_SCHEMA_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object formattedSchema_ = ""; + /** + * string formatted_schema = 2 [json_name = "formattedSchema"]; + * @return The formattedSchema. + */ + @java.lang.Override + public java.lang.String getFormattedSchema() { + java.lang.Object ref = formattedSchema_; + 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(); + formattedSchema_ = s; + return s; + } + } + /** + * string formatted_schema = 2 [json_name = "formattedSchema"]; + * @return The bytes for formattedSchema. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFormattedSchemaBytes() { + java.lang.Object ref = formattedSchema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + formattedSchema_ = 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 (error_ != null) { + output.writeMessage(1, getError()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(formattedSchema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, formattedSchema_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getError()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(formattedSchema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, formattedSchema_); + } + 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.v0.Developer.FormatSchemaResponse)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.FormatSchemaResponse other = (com.authzed.api.v0.Developer.FormatSchemaResponse) obj; + + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (!getFormattedSchema() + .equals(other.getFormattedSchema())) 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 (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (37 * hash) + FORMATTED_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getFormattedSchema().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.FormatSchemaResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.FormatSchemaResponse 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.v0.Developer.FormatSchemaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.FormatSchemaResponse 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.v0.Developer.FormatSchemaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.FormatSchemaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.FormatSchemaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.FormatSchemaResponse 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.v0.Developer.FormatSchemaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.FormatSchemaResponse 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.v0.Developer.FormatSchemaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.FormatSchemaResponse 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.v0.Developer.FormatSchemaResponse 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; + } + /** + * Protobuf type {@code authzed.api.v0.FormatSchemaResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.FormatSchemaResponse) + com.authzed.api.v0.Developer.FormatSchemaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_FormatSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_FormatSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.FormatSchemaResponse.class, com.authzed.api.v0.Developer.FormatSchemaResponse.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.FormatSchemaResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + formattedSchema_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_FormatSchemaResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.FormatSchemaResponse getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.FormatSchemaResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.FormatSchemaResponse build() { + com.authzed.api.v0.Developer.FormatSchemaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.FormatSchemaResponse buildPartial() { + com.authzed.api.v0.Developer.FormatSchemaResponse result = new com.authzed.api.v0.Developer.FormatSchemaResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Developer.FormatSchemaResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.error_ = errorBuilder_ == null + ? error_ + : errorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.formattedSchema_ = formattedSchema_; + } + } + + @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.v0.Developer.FormatSchemaResponse) { + return mergeFrom((com.authzed.api.v0.Developer.FormatSchemaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.FormatSchemaResponse other) { + if (other == com.authzed.api.v0.Developer.FormatSchemaResponse.getDefaultInstance()) return this; + if (other.hasError()) { + mergeError(other.getError()); + } + if (!other.getFormattedSchema().isEmpty()) { + formattedSchema_ = other.formattedSchema_; + 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( + getErrorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + formattedSchema_ = 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.v0.Developer.DeveloperError error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> errorBuilder_; + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return The error. + */ + public com.authzed.api.v0.Developer.DeveloperError getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public Builder setError(com.authzed.api.v0.Developer.DeveloperError value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public Builder setError( + com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public Builder mergeError(com.authzed.api.v0.Developer.DeveloperError value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + error_ != null && + error_ != com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000001); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder getErrorBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + + private java.lang.Object formattedSchema_ = ""; + /** + * string formatted_schema = 2 [json_name = "formattedSchema"]; + * @return The formattedSchema. + */ + public java.lang.String getFormattedSchema() { + java.lang.Object ref = formattedSchema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + formattedSchema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string formatted_schema = 2 [json_name = "formattedSchema"]; + * @return The bytes for formattedSchema. + */ + public com.google.protobuf.ByteString + getFormattedSchemaBytes() { + java.lang.Object ref = formattedSchema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + formattedSchema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string formatted_schema = 2 [json_name = "formattedSchema"]; + * @param value The formattedSchema to set. + * @return This builder for chaining. + */ + public Builder setFormattedSchema( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + formattedSchema_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string formatted_schema = 2 [json_name = "formattedSchema"]; + * @return This builder for chaining. + */ + public Builder clearFormattedSchema() { + formattedSchema_ = getDefaultInstance().getFormattedSchema(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string formatted_schema = 2 [json_name = "formattedSchema"]; + * @param value The bytes for formattedSchema to set. + * @return This builder for chaining. + */ + public Builder setFormattedSchemaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + formattedSchema_ = 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.v0.FormatSchemaResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.FormatSchemaResponse) + private static final com.authzed.api.v0.Developer.FormatSchemaResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.FormatSchemaResponse(); + } + + public static com.authzed.api.v0.Developer.FormatSchemaResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FormatSchemaResponse 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.v0.Developer.FormatSchemaResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UpgradeSchemaRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.UpgradeSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @return A list containing the namespaceConfigs. + */ + java.util.List + getNamespaceConfigsList(); + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @return The count of namespaceConfigs. + */ + int getNamespaceConfigsCount(); + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @param index The index of the element to return. + * @return The namespaceConfigs at the given index. + */ + java.lang.String getNamespaceConfigs(int index); + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @param index The index of the value to return. + * @return The bytes of the namespaceConfigs at the given index. + */ + com.google.protobuf.ByteString + getNamespaceConfigsBytes(int index); + } + /** + * Protobuf type {@code authzed.api.v0.UpgradeSchemaRequest} + */ + public static final class UpgradeSchemaRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.UpgradeSchemaRequest) + UpgradeSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeSchemaRequest.newBuilder() to construct. + private UpgradeSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpgradeSchemaRequest() { + namespaceConfigs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpgradeSchemaRequest(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_UpgradeSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_UpgradeSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.UpgradeSchemaRequest.class, com.authzed.api.v0.Developer.UpgradeSchemaRequest.Builder.class); + } + + public static final int NAMESPACE_CONFIGS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList namespaceConfigs_; + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @return A list containing the namespaceConfigs. + */ + public com.google.protobuf.ProtocolStringList + getNamespaceConfigsList() { + return namespaceConfigs_; + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @return The count of namespaceConfigs. + */ + public int getNamespaceConfigsCount() { + return namespaceConfigs_.size(); + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @param index The index of the element to return. + * @return The namespaceConfigs at the given index. + */ + public java.lang.String getNamespaceConfigs(int index) { + return namespaceConfigs_.get(index); + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @param index The index of the value to return. + * @return The bytes of the namespaceConfigs at the given index. + */ + public com.google.protobuf.ByteString + getNamespaceConfigsBytes(int index) { + return namespaceConfigs_.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 < namespaceConfigs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespaceConfigs_.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 < namespaceConfigs_.size(); i++) { + dataSize += computeStringSizeNoTag(namespaceConfigs_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamespaceConfigsList().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.v0.Developer.UpgradeSchemaRequest)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.UpgradeSchemaRequest other = (com.authzed.api.v0.Developer.UpgradeSchemaRequest) obj; + + if (!getNamespaceConfigsList() + .equals(other.getNamespaceConfigsList())) 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 (getNamespaceConfigsCount() > 0) { + hash = (37 * hash) + NAMESPACE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getNamespaceConfigsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.UpgradeSchemaRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaRequest 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.v0.Developer.UpgradeSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaRequest 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.v0.Developer.UpgradeSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaRequest 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.v0.Developer.UpgradeSchemaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaRequest 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.v0.Developer.UpgradeSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaRequest 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.v0.Developer.UpgradeSchemaRequest 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; + } + /** + * Protobuf type {@code authzed.api.v0.UpgradeSchemaRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.UpgradeSchemaRequest) + com.authzed.api.v0.Developer.UpgradeSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_UpgradeSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_UpgradeSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.UpgradeSchemaRequest.class, com.authzed.api.v0.Developer.UpgradeSchemaRequest.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.UpgradeSchemaRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + namespaceConfigs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_UpgradeSchemaRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.UpgradeSchemaRequest getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.UpgradeSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.UpgradeSchemaRequest build() { + com.authzed.api.v0.Developer.UpgradeSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.UpgradeSchemaRequest buildPartial() { + com.authzed.api.v0.Developer.UpgradeSchemaRequest result = new com.authzed.api.v0.Developer.UpgradeSchemaRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v0.Developer.UpgradeSchemaRequest result) { + if (((bitField0_ & 0x00000001) != 0)) { + namespaceConfigs_ = namespaceConfigs_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.namespaceConfigs_ = namespaceConfigs_; + } + + private void buildPartial0(com.authzed.api.v0.Developer.UpgradeSchemaRequest 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.v0.Developer.UpgradeSchemaRequest) { + return mergeFrom((com.authzed.api.v0.Developer.UpgradeSchemaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.UpgradeSchemaRequest other) { + if (other == com.authzed.api.v0.Developer.UpgradeSchemaRequest.getDefaultInstance()) return this; + if (!other.namespaceConfigs_.isEmpty()) { + if (namespaceConfigs_.isEmpty()) { + namespaceConfigs_ = other.namespaceConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamespaceConfigsIsMutable(); + namespaceConfigs_.addAll(other.namespaceConfigs_); + } + 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(); + ensureNamespaceConfigsIsMutable(); + namespaceConfigs_.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 namespaceConfigs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureNamespaceConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + namespaceConfigs_ = new com.google.protobuf.LazyStringArrayList(namespaceConfigs_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @return A list containing the namespaceConfigs. + */ + public com.google.protobuf.ProtocolStringList + getNamespaceConfigsList() { + return namespaceConfigs_.getUnmodifiableView(); + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @return The count of namespaceConfigs. + */ + public int getNamespaceConfigsCount() { + return namespaceConfigs_.size(); + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @param index The index of the element to return. + * @return The namespaceConfigs at the given index. + */ + public java.lang.String getNamespaceConfigs(int index) { + return namespaceConfigs_.get(index); + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @param index The index of the value to return. + * @return The bytes of the namespaceConfigs at the given index. + */ + public com.google.protobuf.ByteString + getNamespaceConfigsBytes(int index) { + return namespaceConfigs_.getByteString(index); + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @param index The index to set the value at. + * @param value The namespaceConfigs to set. + * @return This builder for chaining. + */ + public Builder setNamespaceConfigs( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamespaceConfigsIsMutable(); + namespaceConfigs_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @param value The namespaceConfigs to add. + * @return This builder for chaining. + */ + public Builder addNamespaceConfigs( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamespaceConfigsIsMutable(); + namespaceConfigs_.add(value); + onChanged(); + return this; + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @param values The namespaceConfigs to add. + * @return This builder for chaining. + */ + public Builder addAllNamespaceConfigs( + java.lang.Iterable values) { + ensureNamespaceConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, namespaceConfigs_); + onChanged(); + return this; + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @return This builder for chaining. + */ + public Builder clearNamespaceConfigs() { + namespaceConfigs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string namespace_configs = 1 [json_name = "namespaceConfigs"]; + * @param value The bytes of the namespaceConfigs to add. + * @return This builder for chaining. + */ + public Builder addNamespaceConfigsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureNamespaceConfigsIsMutable(); + namespaceConfigs_.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.v0.UpgradeSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.UpgradeSchemaRequest) + private static final com.authzed.api.v0.Developer.UpgradeSchemaRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.UpgradeSchemaRequest(); + } + + public static com.authzed.api.v0.Developer.UpgradeSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeSchemaRequest 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.v0.Developer.UpgradeSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UpgradeSchemaResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.UpgradeSchemaResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return The error. + */ + com.authzed.api.v0.Developer.DeveloperError getError(); + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getErrorOrBuilder(); + + /** + * string upgraded_schema = 2 [json_name = "upgradedSchema"]; + * @return The upgradedSchema. + */ + java.lang.String getUpgradedSchema(); + /** + * string upgraded_schema = 2 [json_name = "upgradedSchema"]; + * @return The bytes for upgradedSchema. + */ + com.google.protobuf.ByteString + getUpgradedSchemaBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.UpgradeSchemaResponse} + */ + public static final class UpgradeSchemaResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.UpgradeSchemaResponse) + UpgradeSchemaResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeSchemaResponse.newBuilder() to construct. + private UpgradeSchemaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpgradeSchemaResponse() { + upgradedSchema_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpgradeSchemaResponse(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_UpgradeSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_UpgradeSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.UpgradeSchemaResponse.class, com.authzed.api.v0.Developer.UpgradeSchemaResponse.Builder.class); + } + + public static final int ERROR_FIELD_NUMBER = 1; + private com.authzed.api.v0.Developer.DeveloperError error_; + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return The error. + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError getError() { + return error_ == null ? com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getErrorOrBuilder() { + return error_ == null ? com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } + + public static final int UPGRADED_SCHEMA_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object upgradedSchema_ = ""; + /** + * string upgraded_schema = 2 [json_name = "upgradedSchema"]; + * @return The upgradedSchema. + */ + @java.lang.Override + public java.lang.String getUpgradedSchema() { + java.lang.Object ref = upgradedSchema_; + 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(); + upgradedSchema_ = s; + return s; + } + } + /** + * string upgraded_schema = 2 [json_name = "upgradedSchema"]; + * @return The bytes for upgradedSchema. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUpgradedSchemaBytes() { + java.lang.Object ref = upgradedSchema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + upgradedSchema_ = 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 (error_ != null) { + output.writeMessage(1, getError()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(upgradedSchema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, upgradedSchema_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getError()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(upgradedSchema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, upgradedSchema_); + } + 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.v0.Developer.UpgradeSchemaResponse)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.UpgradeSchemaResponse other = (com.authzed.api.v0.Developer.UpgradeSchemaResponse) obj; + + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (!getUpgradedSchema() + .equals(other.getUpgradedSchema())) 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 (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (37 * hash) + UPGRADED_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getUpgradedSchema().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.UpgradeSchemaResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaResponse 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.v0.Developer.UpgradeSchemaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaResponse 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.v0.Developer.UpgradeSchemaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaResponse 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.v0.Developer.UpgradeSchemaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaResponse 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.v0.Developer.UpgradeSchemaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.UpgradeSchemaResponse 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.v0.Developer.UpgradeSchemaResponse 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; + } + /** + * Protobuf type {@code authzed.api.v0.UpgradeSchemaResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.UpgradeSchemaResponse) + com.authzed.api.v0.Developer.UpgradeSchemaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_UpgradeSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_UpgradeSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.UpgradeSchemaResponse.class, com.authzed.api.v0.Developer.UpgradeSchemaResponse.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.UpgradeSchemaResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + upgradedSchema_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_UpgradeSchemaResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.UpgradeSchemaResponse getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.UpgradeSchemaResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.UpgradeSchemaResponse build() { + com.authzed.api.v0.Developer.UpgradeSchemaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.UpgradeSchemaResponse buildPartial() { + com.authzed.api.v0.Developer.UpgradeSchemaResponse result = new com.authzed.api.v0.Developer.UpgradeSchemaResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Developer.UpgradeSchemaResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.error_ = errorBuilder_ == null + ? error_ + : errorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.upgradedSchema_ = upgradedSchema_; + } + } + + @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.v0.Developer.UpgradeSchemaResponse) { + return mergeFrom((com.authzed.api.v0.Developer.UpgradeSchemaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.UpgradeSchemaResponse other) { + if (other == com.authzed.api.v0.Developer.UpgradeSchemaResponse.getDefaultInstance()) return this; + if (other.hasError()) { + mergeError(other.getError()); + } + if (!other.getUpgradedSchema().isEmpty()) { + upgradedSchema_ = other.upgradedSchema_; + 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( + getErrorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + upgradedSchema_ = 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.v0.Developer.DeveloperError error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> errorBuilder_; + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + * @return The error. + */ + public com.authzed.api.v0.Developer.DeveloperError getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public Builder setError(com.authzed.api.v0.Developer.DeveloperError value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public Builder setError( + com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public Builder mergeError(com.authzed.api.v0.Developer.DeveloperError value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + error_ != null && + error_ != com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000001); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder getErrorBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } + } + /** + * .authzed.api.v0.DeveloperError error = 1 [json_name = "error"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + + private java.lang.Object upgradedSchema_ = ""; + /** + * string upgraded_schema = 2 [json_name = "upgradedSchema"]; + * @return The upgradedSchema. + */ + public java.lang.String getUpgradedSchema() { + java.lang.Object ref = upgradedSchema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upgradedSchema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string upgraded_schema = 2 [json_name = "upgradedSchema"]; + * @return The bytes for upgradedSchema. + */ + public com.google.protobuf.ByteString + getUpgradedSchemaBytes() { + java.lang.Object ref = upgradedSchema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + upgradedSchema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string upgraded_schema = 2 [json_name = "upgradedSchema"]; + * @param value The upgradedSchema to set. + * @return This builder for chaining. + */ + public Builder setUpgradedSchema( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + upgradedSchema_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string upgraded_schema = 2 [json_name = "upgradedSchema"]; + * @return This builder for chaining. + */ + public Builder clearUpgradedSchema() { + upgradedSchema_ = getDefaultInstance().getUpgradedSchema(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string upgraded_schema = 2 [json_name = "upgradedSchema"]; + * @param value The bytes for upgradedSchema to set. + * @return This builder for chaining. + */ + public Builder setUpgradedSchemaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + upgradedSchema_ = 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.v0.UpgradeSchemaResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.UpgradeSchemaResponse) + private static final com.authzed.api.v0.Developer.UpgradeSchemaResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.UpgradeSchemaResponse(); + } + + public static com.authzed.api.v0.Developer.UpgradeSchemaResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeSchemaResponse 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.v0.Developer.UpgradeSchemaResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ShareRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.ShareRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string schema = 1 [json_name = "schema"]; + * @return The schema. + */ + java.lang.String getSchema(); + /** + * string schema = 1 [json_name = "schema"]; + * @return The bytes for schema. + */ + com.google.protobuf.ByteString + getSchemaBytes(); + + /** + * string relationships_yaml = 2 [json_name = "relationshipsYaml"]; + * @return The relationshipsYaml. + */ + java.lang.String getRelationshipsYaml(); + /** + * string relationships_yaml = 2 [json_name = "relationshipsYaml"]; + * @return The bytes for relationshipsYaml. + */ + com.google.protobuf.ByteString + getRelationshipsYamlBytes(); + + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The validationYaml. + */ + java.lang.String getValidationYaml(); + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The bytes for validationYaml. + */ + com.google.protobuf.ByteString + getValidationYamlBytes(); + + /** + * string assertions_yaml = 4 [json_name = "assertionsYaml"]; + * @return The assertionsYaml. + */ + java.lang.String getAssertionsYaml(); + /** + * string assertions_yaml = 4 [json_name = "assertionsYaml"]; + * @return The bytes for assertionsYaml. + */ + com.google.protobuf.ByteString + getAssertionsYamlBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.ShareRequest} + */ + public static final class ShareRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.ShareRequest) + ShareRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ShareRequest.newBuilder() to construct. + private ShareRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ShareRequest() { + schema_ = ""; + relationshipsYaml_ = ""; + validationYaml_ = ""; + assertionsYaml_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ShareRequest(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_ShareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ShareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.ShareRequest.class, com.authzed.api.v0.Developer.ShareRequest.Builder.class); + } + + public static final int SCHEMA_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object schema_ = ""; + /** + * string schema = 1 [json_name = "schema"]; + * @return The schema. + */ + @java.lang.Override + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + 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(); + schema_ = s; + return s; + } + } + /** + * string schema = 1 [json_name = "schema"]; + * @return The bytes for schema. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATIONSHIPS_YAML_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object relationshipsYaml_ = ""; + /** + * string relationships_yaml = 2 [json_name = "relationshipsYaml"]; + * @return The relationshipsYaml. + */ + @java.lang.Override + public java.lang.String getRelationshipsYaml() { + java.lang.Object ref = relationshipsYaml_; + 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(); + relationshipsYaml_ = s; + return s; + } + } + /** + * string relationships_yaml = 2 [json_name = "relationshipsYaml"]; + * @return The bytes for relationshipsYaml. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRelationshipsYamlBytes() { + java.lang.Object ref = relationshipsYaml_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relationshipsYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATION_YAML_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object validationYaml_ = ""; + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The validationYaml. + */ + @java.lang.Override + public java.lang.String getValidationYaml() { + java.lang.Object ref = validationYaml_; + 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(); + validationYaml_ = s; + return s; + } + } + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The bytes for validationYaml. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValidationYamlBytes() { + java.lang.Object ref = validationYaml_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validationYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSERTIONS_YAML_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object assertionsYaml_ = ""; + /** + * string assertions_yaml = 4 [json_name = "assertionsYaml"]; + * @return The assertionsYaml. + */ + @java.lang.Override + public java.lang.String getAssertionsYaml() { + java.lang.Object ref = assertionsYaml_; + 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(); + assertionsYaml_ = s; + return s; + } + } + /** + * string assertions_yaml = 4 [json_name = "assertionsYaml"]; + * @return The bytes for assertionsYaml. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssertionsYamlBytes() { + java.lang.Object ref = assertionsYaml_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assertionsYaml_ = 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(schema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationshipsYaml_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, relationshipsYaml_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationYaml_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, validationYaml_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assertionsYaml_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, assertionsYaml_); + } + 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(schema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationshipsYaml_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, relationshipsYaml_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationYaml_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, validationYaml_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assertionsYaml_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, assertionsYaml_); + } + 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.v0.Developer.ShareRequest)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.ShareRequest other = (com.authzed.api.v0.Developer.ShareRequest) obj; + + if (!getSchema() + .equals(other.getSchema())) return false; + if (!getRelationshipsYaml() + .equals(other.getRelationshipsYaml())) return false; + if (!getValidationYaml() + .equals(other.getValidationYaml())) return false; + if (!getAssertionsYaml() + .equals(other.getAssertionsYaml())) 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) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + hash = (37 * hash) + RELATIONSHIPS_YAML_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipsYaml().hashCode(); + hash = (37 * hash) + VALIDATION_YAML_FIELD_NUMBER; + hash = (53 * hash) + getValidationYaml().hashCode(); + hash = (37 * hash) + ASSERTIONS_YAML_FIELD_NUMBER; + hash = (53 * hash) + getAssertionsYaml().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.ShareRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ShareRequest 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.v0.Developer.ShareRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ShareRequest 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.v0.Developer.ShareRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ShareRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.ShareRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ShareRequest 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.v0.Developer.ShareRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ShareRequest 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.v0.Developer.ShareRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ShareRequest 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.v0.Developer.ShareRequest 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; + } + /** + * Protobuf type {@code authzed.api.v0.ShareRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.ShareRequest) + com.authzed.api.v0.Developer.ShareRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ShareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ShareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.ShareRequest.class, com.authzed.api.v0.Developer.ShareRequest.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.ShareRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schema_ = ""; + relationshipsYaml_ = ""; + validationYaml_ = ""; + assertionsYaml_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ShareRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ShareRequest getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.ShareRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ShareRequest build() { + com.authzed.api.v0.Developer.ShareRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ShareRequest buildPartial() { + com.authzed.api.v0.Developer.ShareRequest result = new com.authzed.api.v0.Developer.ShareRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Developer.ShareRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schema_ = schema_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relationshipsYaml_ = relationshipsYaml_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validationYaml_ = validationYaml_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.assertionsYaml_ = assertionsYaml_; + } + } + + @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.v0.Developer.ShareRequest) { + return mergeFrom((com.authzed.api.v0.Developer.ShareRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.ShareRequest other) { + if (other == com.authzed.api.v0.Developer.ShareRequest.getDefaultInstance()) return this; + if (!other.getSchema().isEmpty()) { + schema_ = other.schema_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRelationshipsYaml().isEmpty()) { + relationshipsYaml_ = other.relationshipsYaml_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getValidationYaml().isEmpty()) { + validationYaml_ = other.validationYaml_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAssertionsYaml().isEmpty()) { + assertionsYaml_ = other.assertionsYaml_; + bitField0_ |= 0x00000008; + 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: { + schema_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + relationshipsYaml_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + validationYaml_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + assertionsYaml_ = 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 bitField0_; + + private java.lang.Object schema_ = ""; + /** + * string schema = 1 [json_name = "schema"]; + * @return The schema. + */ + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string schema = 1 [json_name = "schema"]; + * @return The bytes for schema. + */ + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string schema = 1 [json_name = "schema"]; + * @param value The schema to set. + * @return This builder for chaining. + */ + public Builder setSchema( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string schema = 1 [json_name = "schema"]; + * @return This builder for chaining. + */ + public Builder clearSchema() { + schema_ = getDefaultInstance().getSchema(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string schema = 1 [json_name = "schema"]; + * @param value The bytes for schema to set. + * @return This builder for chaining. + */ + public Builder setSchemaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object relationshipsYaml_ = ""; + /** + * string relationships_yaml = 2 [json_name = "relationshipsYaml"]; + * @return The relationshipsYaml. + */ + public java.lang.String getRelationshipsYaml() { + java.lang.Object ref = relationshipsYaml_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relationshipsYaml_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string relationships_yaml = 2 [json_name = "relationshipsYaml"]; + * @return The bytes for relationshipsYaml. + */ + public com.google.protobuf.ByteString + getRelationshipsYamlBytes() { + java.lang.Object ref = relationshipsYaml_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relationshipsYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string relationships_yaml = 2 [json_name = "relationshipsYaml"]; + * @param value The relationshipsYaml to set. + * @return This builder for chaining. + */ + public Builder setRelationshipsYaml( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + relationshipsYaml_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string relationships_yaml = 2 [json_name = "relationshipsYaml"]; + * @return This builder for chaining. + */ + public Builder clearRelationshipsYaml() { + relationshipsYaml_ = getDefaultInstance().getRelationshipsYaml(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string relationships_yaml = 2 [json_name = "relationshipsYaml"]; + * @param value The bytes for relationshipsYaml to set. + * @return This builder for chaining. + */ + public Builder setRelationshipsYamlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + relationshipsYaml_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object validationYaml_ = ""; + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The validationYaml. + */ + public java.lang.String getValidationYaml() { + java.lang.Object ref = validationYaml_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validationYaml_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The bytes for validationYaml. + */ + public com.google.protobuf.ByteString + getValidationYamlBytes() { + java.lang.Object ref = validationYaml_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validationYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @param value The validationYaml to set. + * @return This builder for chaining. + */ + public Builder setValidationYaml( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + validationYaml_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return This builder for chaining. + */ + public Builder clearValidationYaml() { + validationYaml_ = getDefaultInstance().getValidationYaml(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @param value The bytes for validationYaml to set. + * @return This builder for chaining. + */ + public Builder setValidationYamlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + validationYaml_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object assertionsYaml_ = ""; + /** + * string assertions_yaml = 4 [json_name = "assertionsYaml"]; + * @return The assertionsYaml. + */ + public java.lang.String getAssertionsYaml() { + java.lang.Object ref = assertionsYaml_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assertionsYaml_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string assertions_yaml = 4 [json_name = "assertionsYaml"]; + * @return The bytes for assertionsYaml. + */ + public com.google.protobuf.ByteString + getAssertionsYamlBytes() { + java.lang.Object ref = assertionsYaml_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assertionsYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string assertions_yaml = 4 [json_name = "assertionsYaml"]; + * @param value The assertionsYaml to set. + * @return This builder for chaining. + */ + public Builder setAssertionsYaml( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + assertionsYaml_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string assertions_yaml = 4 [json_name = "assertionsYaml"]; + * @return This builder for chaining. + */ + public Builder clearAssertionsYaml() { + assertionsYaml_ = getDefaultInstance().getAssertionsYaml(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string assertions_yaml = 4 [json_name = "assertionsYaml"]; + * @param value The bytes for assertionsYaml to set. + * @return This builder for chaining. + */ + public Builder setAssertionsYamlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + assertionsYaml_ = 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.v0.ShareRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.ShareRequest) + private static final com.authzed.api.v0.Developer.ShareRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.ShareRequest(); + } + + public static com.authzed.api.v0.Developer.ShareRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShareRequest 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.v0.Developer.ShareRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ShareResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.ShareResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The shareReference. + */ + java.lang.String getShareReference(); + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The bytes for shareReference. + */ + com.google.protobuf.ByteString + getShareReferenceBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.ShareResponse} + */ + public static final class ShareResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.ShareResponse) + ShareResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ShareResponse.newBuilder() to construct. + private ShareResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ShareResponse() { + shareReference_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ShareResponse(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_ShareResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ShareResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.ShareResponse.class, com.authzed.api.v0.Developer.ShareResponse.Builder.class); + } + + public static final int SHARE_REFERENCE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object shareReference_ = ""; + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The shareReference. + */ + @java.lang.Override + public java.lang.String getShareReference() { + java.lang.Object ref = shareReference_; + 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(); + shareReference_ = s; + return s; + } + } + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The bytes for shareReference. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShareReferenceBytes() { + java.lang.Object ref = shareReference_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shareReference_ = 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(shareReference_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, shareReference_); + } + 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(shareReference_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, shareReference_); + } + 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.v0.Developer.ShareResponse)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.ShareResponse other = (com.authzed.api.v0.Developer.ShareResponse) obj; + + if (!getShareReference() + .equals(other.getShareReference())) 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) + SHARE_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getShareReference().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.ShareResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ShareResponse 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.v0.Developer.ShareResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ShareResponse 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.v0.Developer.ShareResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ShareResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.ShareResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ShareResponse 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.v0.Developer.ShareResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ShareResponse 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.v0.Developer.ShareResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ShareResponse 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.v0.Developer.ShareResponse 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; + } + /** + * Protobuf type {@code authzed.api.v0.ShareResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.ShareResponse) + com.authzed.api.v0.Developer.ShareResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ShareResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ShareResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.ShareResponse.class, com.authzed.api.v0.Developer.ShareResponse.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.ShareResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + shareReference_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ShareResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ShareResponse getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.ShareResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ShareResponse build() { + com.authzed.api.v0.Developer.ShareResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ShareResponse buildPartial() { + com.authzed.api.v0.Developer.ShareResponse result = new com.authzed.api.v0.Developer.ShareResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Developer.ShareResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.shareReference_ = shareReference_; + } + } + + @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.v0.Developer.ShareResponse) { + return mergeFrom((com.authzed.api.v0.Developer.ShareResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.ShareResponse other) { + if (other == com.authzed.api.v0.Developer.ShareResponse.getDefaultInstance()) return this; + if (!other.getShareReference().isEmpty()) { + shareReference_ = other.shareReference_; + 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: { + shareReference_ = 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 shareReference_ = ""; + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The shareReference. + */ + public java.lang.String getShareReference() { + java.lang.Object ref = shareReference_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shareReference_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The bytes for shareReference. + */ + public com.google.protobuf.ByteString + getShareReferenceBytes() { + java.lang.Object ref = shareReference_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shareReference_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @param value The shareReference to set. + * @return This builder for chaining. + */ + public Builder setShareReference( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shareReference_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return This builder for chaining. + */ + public Builder clearShareReference() { + shareReference_ = getDefaultInstance().getShareReference(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @param value The bytes for shareReference to set. + * @return This builder for chaining. + */ + public Builder setShareReferenceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shareReference_ = 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.v0.ShareResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.ShareResponse) + private static final com.authzed.api.v0.Developer.ShareResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.ShareResponse(); + } + + public static com.authzed.api.v0.Developer.ShareResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShareResponse 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.v0.Developer.ShareResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LookupShareRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.LookupShareRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The shareReference. + */ + java.lang.String getShareReference(); + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The bytes for shareReference. + */ + com.google.protobuf.ByteString + getShareReferenceBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.LookupShareRequest} + */ + public static final class LookupShareRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.LookupShareRequest) + LookupShareRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use LookupShareRequest.newBuilder() to construct. + private LookupShareRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LookupShareRequest() { + shareReference_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LookupShareRequest(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_LookupShareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_LookupShareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.LookupShareRequest.class, com.authzed.api.v0.Developer.LookupShareRequest.Builder.class); + } + + public static final int SHARE_REFERENCE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object shareReference_ = ""; + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The shareReference. + */ + @java.lang.Override + public java.lang.String getShareReference() { + java.lang.Object ref = shareReference_; + 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(); + shareReference_ = s; + return s; + } + } + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The bytes for shareReference. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShareReferenceBytes() { + java.lang.Object ref = shareReference_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shareReference_ = 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(shareReference_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, shareReference_); + } + 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(shareReference_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, shareReference_); + } + 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.v0.Developer.LookupShareRequest)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.LookupShareRequest other = (com.authzed.api.v0.Developer.LookupShareRequest) obj; + + if (!getShareReference() + .equals(other.getShareReference())) 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) + SHARE_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getShareReference().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.LookupShareRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.LookupShareRequest 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.v0.Developer.LookupShareRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.LookupShareRequest 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.v0.Developer.LookupShareRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.LookupShareRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.LookupShareRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.LookupShareRequest 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.v0.Developer.LookupShareRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.LookupShareRequest 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.v0.Developer.LookupShareRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.LookupShareRequest 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.v0.Developer.LookupShareRequest 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; + } + /** + * Protobuf type {@code authzed.api.v0.LookupShareRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.LookupShareRequest) + com.authzed.api.v0.Developer.LookupShareRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_LookupShareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_LookupShareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.LookupShareRequest.class, com.authzed.api.v0.Developer.LookupShareRequest.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.LookupShareRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + shareReference_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_LookupShareRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.LookupShareRequest getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.LookupShareRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.LookupShareRequest build() { + com.authzed.api.v0.Developer.LookupShareRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.LookupShareRequest buildPartial() { + com.authzed.api.v0.Developer.LookupShareRequest result = new com.authzed.api.v0.Developer.LookupShareRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Developer.LookupShareRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.shareReference_ = shareReference_; + } + } + + @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.v0.Developer.LookupShareRequest) { + return mergeFrom((com.authzed.api.v0.Developer.LookupShareRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.LookupShareRequest other) { + if (other == com.authzed.api.v0.Developer.LookupShareRequest.getDefaultInstance()) return this; + if (!other.getShareReference().isEmpty()) { + shareReference_ = other.shareReference_; + 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: { + shareReference_ = 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 shareReference_ = ""; + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The shareReference. + */ + public java.lang.String getShareReference() { + java.lang.Object ref = shareReference_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shareReference_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return The bytes for shareReference. + */ + public com.google.protobuf.ByteString + getShareReferenceBytes() { + java.lang.Object ref = shareReference_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shareReference_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @param value The shareReference to set. + * @return This builder for chaining. + */ + public Builder setShareReference( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shareReference_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @return This builder for chaining. + */ + public Builder clearShareReference() { + shareReference_ = getDefaultInstance().getShareReference(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string share_reference = 1 [json_name = "shareReference"]; + * @param value The bytes for shareReference to set. + * @return This builder for chaining. + */ + public Builder setShareReferenceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shareReference_ = 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.v0.LookupShareRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.LookupShareRequest) + private static final com.authzed.api.v0.Developer.LookupShareRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.LookupShareRequest(); + } + + public static com.authzed.api.v0.Developer.LookupShareRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupShareRequest 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.v0.Developer.LookupShareRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LookupShareResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.LookupShareResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v0.LookupShareResponse.LookupStatus status = 1 [json_name = "status"]; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * .authzed.api.v0.LookupShareResponse.LookupStatus status = 1 [json_name = "status"]; + * @return The status. + */ + com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus getStatus(); + + /** + * string schema = 2 [json_name = "schema"]; + * @return The schema. + */ + java.lang.String getSchema(); + /** + * string schema = 2 [json_name = "schema"]; + * @return The bytes for schema. + */ + com.google.protobuf.ByteString + getSchemaBytes(); + + /** + * string relationships_yaml = 3 [json_name = "relationshipsYaml"]; + * @return The relationshipsYaml. + */ + java.lang.String getRelationshipsYaml(); + /** + * string relationships_yaml = 3 [json_name = "relationshipsYaml"]; + * @return The bytes for relationshipsYaml. + */ + com.google.protobuf.ByteString + getRelationshipsYamlBytes(); + + /** + * string validation_yaml = 4 [json_name = "validationYaml"]; + * @return The validationYaml. + */ + java.lang.String getValidationYaml(); + /** + * string validation_yaml = 4 [json_name = "validationYaml"]; + * @return The bytes for validationYaml. + */ + com.google.protobuf.ByteString + getValidationYamlBytes(); + + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The assertionsYaml. + */ + java.lang.String getAssertionsYaml(); + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The bytes for assertionsYaml. + */ + com.google.protobuf.ByteString + getAssertionsYamlBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.LookupShareResponse} + */ + public static final class LookupShareResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.LookupShareResponse) + LookupShareResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use LookupShareResponse.newBuilder() to construct. + private LookupShareResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LookupShareResponse() { + status_ = 0; + schema_ = ""; + relationshipsYaml_ = ""; + validationYaml_ = ""; + assertionsYaml_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LookupShareResponse(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_LookupShareResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_LookupShareResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.LookupShareResponse.class, com.authzed.api.v0.Developer.LookupShareResponse.Builder.class); + } + + /** + * Protobuf enum {@code authzed.api.v0.LookupShareResponse.LookupStatus} + */ + public enum LookupStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN_REFERENCE = 0; + */ + UNKNOWN_REFERENCE(0), + /** + * FAILED_TO_LOOKUP = 1; + */ + FAILED_TO_LOOKUP(1), + /** + * VALID_REFERENCE = 2; + */ + VALID_REFERENCE(2), + /** + * UPGRADED_REFERENCE = 3; + */ + UPGRADED_REFERENCE(3), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN_REFERENCE = 0; + */ + public static final int UNKNOWN_REFERENCE_VALUE = 0; + /** + * FAILED_TO_LOOKUP = 1; + */ + public static final int FAILED_TO_LOOKUP_VALUE = 1; + /** + * VALID_REFERENCE = 2; + */ + public static final int VALID_REFERENCE_VALUE = 2; + /** + * UPGRADED_REFERENCE = 3; + */ + public static final int UPGRADED_REFERENCE_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 LookupStatus 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 LookupStatus forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_REFERENCE; + case 1: return FAILED_TO_LOOKUP; + case 2: return VALID_REFERENCE; + case 3: return UPGRADED_REFERENCE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LookupStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LookupStatus findValueByNumber(int number) { + return LookupStatus.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.v0.Developer.LookupShareResponse.getDescriptor().getEnumTypes().get(0); + } + + private static final LookupStatus[] VALUES = values(); + + public static LookupStatus 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 LookupStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v0.LookupShareResponse.LookupStatus) + } + + public static final int STATUS_FIELD_NUMBER = 1; + private int status_ = 0; + /** + * .authzed.api.v0.LookupShareResponse.LookupStatus status = 1 [json_name = "status"]; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + * .authzed.api.v0.LookupShareResponse.LookupStatus status = 1 [json_name = "status"]; + * @return The status. + */ + @java.lang.Override public com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus getStatus() { + com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus result = com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus.forNumber(status_); + return result == null ? com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus.UNRECOGNIZED : result; + } + + public static final int SCHEMA_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object schema_ = ""; + /** + * string schema = 2 [json_name = "schema"]; + * @return The schema. + */ + @java.lang.Override + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + 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(); + schema_ = s; + return s; + } + } + /** + * string schema = 2 [json_name = "schema"]; + * @return The bytes for schema. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATIONSHIPS_YAML_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object relationshipsYaml_ = ""; + /** + * string relationships_yaml = 3 [json_name = "relationshipsYaml"]; + * @return The relationshipsYaml. + */ + @java.lang.Override + public java.lang.String getRelationshipsYaml() { + java.lang.Object ref = relationshipsYaml_; + 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(); + relationshipsYaml_ = s; + return s; + } + } + /** + * string relationships_yaml = 3 [json_name = "relationshipsYaml"]; + * @return The bytes for relationshipsYaml. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRelationshipsYamlBytes() { + java.lang.Object ref = relationshipsYaml_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relationshipsYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATION_YAML_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object validationYaml_ = ""; + /** + * string validation_yaml = 4 [json_name = "validationYaml"]; + * @return The validationYaml. + */ + @java.lang.Override + public java.lang.String getValidationYaml() { + java.lang.Object ref = validationYaml_; + 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(); + validationYaml_ = s; + return s; + } + } + /** + * string validation_yaml = 4 [json_name = "validationYaml"]; + * @return The bytes for validationYaml. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValidationYamlBytes() { + java.lang.Object ref = validationYaml_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validationYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSERTIONS_YAML_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object assertionsYaml_ = ""; + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The assertionsYaml. + */ + @java.lang.Override + public java.lang.String getAssertionsYaml() { + java.lang.Object ref = assertionsYaml_; + 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(); + assertionsYaml_ = s; + return s; + } + } + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The bytes for assertionsYaml. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssertionsYamlBytes() { + java.lang.Object ref = assertionsYaml_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assertionsYaml_ = 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 (status_ != com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus.UNKNOWN_REFERENCE.getNumber()) { + output.writeEnum(1, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schema_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationshipsYaml_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, relationshipsYaml_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationYaml_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, validationYaml_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assertionsYaml_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, assertionsYaml_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus.UNKNOWN_REFERENCE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schema_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationshipsYaml_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, relationshipsYaml_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationYaml_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, validationYaml_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assertionsYaml_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, assertionsYaml_); + } + 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.v0.Developer.LookupShareResponse)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.LookupShareResponse other = (com.authzed.api.v0.Developer.LookupShareResponse) obj; + + if (status_ != other.status_) return false; + if (!getSchema() + .equals(other.getSchema())) return false; + if (!getRelationshipsYaml() + .equals(other.getRelationshipsYaml())) return false; + if (!getValidationYaml() + .equals(other.getValidationYaml())) return false; + if (!getAssertionsYaml() + .equals(other.getAssertionsYaml())) 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) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + hash = (37 * hash) + RELATIONSHIPS_YAML_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipsYaml().hashCode(); + hash = (37 * hash) + VALIDATION_YAML_FIELD_NUMBER; + hash = (53 * hash) + getValidationYaml().hashCode(); + hash = (37 * hash) + ASSERTIONS_YAML_FIELD_NUMBER; + hash = (53 * hash) + getAssertionsYaml().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.LookupShareResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.LookupShareResponse 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.v0.Developer.LookupShareResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.LookupShareResponse 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.v0.Developer.LookupShareResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.LookupShareResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.LookupShareResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.LookupShareResponse 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.v0.Developer.LookupShareResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.LookupShareResponse 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.v0.Developer.LookupShareResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.LookupShareResponse 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.v0.Developer.LookupShareResponse 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; + } + /** + * Protobuf type {@code authzed.api.v0.LookupShareResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.LookupShareResponse) + com.authzed.api.v0.Developer.LookupShareResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_LookupShareResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_LookupShareResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.LookupShareResponse.class, com.authzed.api.v0.Developer.LookupShareResponse.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.LookupShareResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + status_ = 0; + schema_ = ""; + relationshipsYaml_ = ""; + validationYaml_ = ""; + assertionsYaml_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_LookupShareResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.LookupShareResponse getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.LookupShareResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.LookupShareResponse build() { + com.authzed.api.v0.Developer.LookupShareResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.LookupShareResponse buildPartial() { + com.authzed.api.v0.Developer.LookupShareResponse result = new com.authzed.api.v0.Developer.LookupShareResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Developer.LookupShareResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.status_ = status_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.schema_ = schema_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.relationshipsYaml_ = relationshipsYaml_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validationYaml_ = validationYaml_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.assertionsYaml_ = assertionsYaml_; + } + } + + @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.v0.Developer.LookupShareResponse) { + return mergeFrom((com.authzed.api.v0.Developer.LookupShareResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.LookupShareResponse other) { + if (other == com.authzed.api.v0.Developer.LookupShareResponse.getDefaultInstance()) return this; + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (!other.getSchema().isEmpty()) { + schema_ = other.schema_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRelationshipsYaml().isEmpty()) { + relationshipsYaml_ = other.relationshipsYaml_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getValidationYaml().isEmpty()) { + validationYaml_ = other.validationYaml_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getAssertionsYaml().isEmpty()) { + assertionsYaml_ = other.assertionsYaml_; + bitField0_ |= 0x00000010; + 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 8: { + status_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + schema_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + relationshipsYaml_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + validationYaml_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + assertionsYaml_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 status_ = 0; + /** + * .authzed.api.v0.LookupShareResponse.LookupStatus status = 1 [json_name = "status"]; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + * .authzed.api.v0.LookupShareResponse.LookupStatus status = 1 [json_name = "status"]; + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + status_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.LookupShareResponse.LookupStatus status = 1 [json_name = "status"]; + * @return The status. + */ + @java.lang.Override + public com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus getStatus() { + com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus result = com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus.forNumber(status_); + return result == null ? com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus.UNRECOGNIZED : result; + } + /** + * .authzed.api.v0.LookupShareResponse.LookupStatus status = 1 [json_name = "status"]; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(com.authzed.api.v0.Developer.LookupShareResponse.LookupStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .authzed.api.v0.LookupShareResponse.LookupStatus status = 1 [json_name = "status"]; + * @return This builder for chaining. + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + status_ = 0; + onChanged(); + return this; + } + + private java.lang.Object schema_ = ""; + /** + * string schema = 2 [json_name = "schema"]; + * @return The schema. + */ + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string schema = 2 [json_name = "schema"]; + * @return The bytes for schema. + */ + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string schema = 2 [json_name = "schema"]; + * @param value The schema to set. + * @return This builder for chaining. + */ + public Builder setSchema( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schema_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string schema = 2 [json_name = "schema"]; + * @return This builder for chaining. + */ + public Builder clearSchema() { + schema_ = getDefaultInstance().getSchema(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string schema = 2 [json_name = "schema"]; + * @param value The bytes for schema to set. + * @return This builder for chaining. + */ + public Builder setSchemaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schema_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object relationshipsYaml_ = ""; + /** + * string relationships_yaml = 3 [json_name = "relationshipsYaml"]; + * @return The relationshipsYaml. + */ + public java.lang.String getRelationshipsYaml() { + java.lang.Object ref = relationshipsYaml_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relationshipsYaml_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string relationships_yaml = 3 [json_name = "relationshipsYaml"]; + * @return The bytes for relationshipsYaml. + */ + public com.google.protobuf.ByteString + getRelationshipsYamlBytes() { + java.lang.Object ref = relationshipsYaml_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relationshipsYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string relationships_yaml = 3 [json_name = "relationshipsYaml"]; + * @param value The relationshipsYaml to set. + * @return This builder for chaining. + */ + public Builder setRelationshipsYaml( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + relationshipsYaml_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string relationships_yaml = 3 [json_name = "relationshipsYaml"]; + * @return This builder for chaining. + */ + public Builder clearRelationshipsYaml() { + relationshipsYaml_ = getDefaultInstance().getRelationshipsYaml(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string relationships_yaml = 3 [json_name = "relationshipsYaml"]; + * @param value The bytes for relationshipsYaml to set. + * @return This builder for chaining. + */ + public Builder setRelationshipsYamlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + relationshipsYaml_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object validationYaml_ = ""; + /** + * string validation_yaml = 4 [json_name = "validationYaml"]; + * @return The validationYaml. + */ + public java.lang.String getValidationYaml() { + java.lang.Object ref = validationYaml_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validationYaml_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string validation_yaml = 4 [json_name = "validationYaml"]; + * @return The bytes for validationYaml. + */ + public com.google.protobuf.ByteString + getValidationYamlBytes() { + java.lang.Object ref = validationYaml_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validationYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string validation_yaml = 4 [json_name = "validationYaml"]; + * @param value The validationYaml to set. + * @return This builder for chaining. + */ + public Builder setValidationYaml( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + validationYaml_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string validation_yaml = 4 [json_name = "validationYaml"]; + * @return This builder for chaining. + */ + public Builder clearValidationYaml() { + validationYaml_ = getDefaultInstance().getValidationYaml(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string validation_yaml = 4 [json_name = "validationYaml"]; + * @param value The bytes for validationYaml to set. + * @return This builder for chaining. + */ + public Builder setValidationYamlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + validationYaml_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object assertionsYaml_ = ""; + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The assertionsYaml. + */ + public java.lang.String getAssertionsYaml() { + java.lang.Object ref = assertionsYaml_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assertionsYaml_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The bytes for assertionsYaml. + */ + public com.google.protobuf.ByteString + getAssertionsYamlBytes() { + java.lang.Object ref = assertionsYaml_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assertionsYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @param value The assertionsYaml to set. + * @return This builder for chaining. + */ + public Builder setAssertionsYaml( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + assertionsYaml_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return This builder for chaining. + */ + public Builder clearAssertionsYaml() { + assertionsYaml_ = getDefaultInstance().getAssertionsYaml(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @param value The bytes for assertionsYaml to set. + * @return This builder for chaining. + */ + public Builder setAssertionsYamlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + assertionsYaml_ = value; + bitField0_ |= 0x00000010; + 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.v0.LookupShareResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.LookupShareResponse) + private static final com.authzed.api.v0.Developer.LookupShareResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.LookupShareResponse(); + } + + public static com.authzed.api.v0.Developer.LookupShareResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupShareResponse 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.v0.Developer.LookupShareResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RequestContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.RequestContext) + com.google.protobuf.MessageOrBuilder { + + /** + * string schema = 1 [json_name = "schema"]; + * @return The schema. + */ + java.lang.String getSchema(); + /** + * string schema = 1 [json_name = "schema"]; + * @return The bytes for schema. + */ + com.google.protobuf.ByteString + getSchemaBytes(); + + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + java.util.List + getRelationshipsList(); + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + com.authzed.api.v0.Core.RelationTuple getRelationships(int index); + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + int getRelationshipsCount(); + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + java.util.List + getRelationshipsOrBuilderList(); + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + com.authzed.api.v0.Core.RelationTupleOrBuilder getRelationshipsOrBuilder( + int index); + } + /** + * Protobuf type {@code authzed.api.v0.RequestContext} + */ + public static final class RequestContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.RequestContext) + RequestContextOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestContext.newBuilder() to construct. + private RequestContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RequestContext() { + schema_ = ""; + relationships_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RequestContext(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_RequestContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_RequestContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.RequestContext.class, com.authzed.api.v0.Developer.RequestContext.Builder.class); + } + + public static final int SCHEMA_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object schema_ = ""; + /** + * string schema = 1 [json_name = "schema"]; + * @return The schema. + */ + @java.lang.Override + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + 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(); + schema_ = s; + return s; + } + } + /** + * string schema = 1 [json_name = "schema"]; + * @return The bytes for schema. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATIONSHIPS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List relationships_; + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + @java.lang.Override + public java.util.List getRelationshipsList() { + return relationships_; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + @java.lang.Override + public java.util.List + getRelationshipsOrBuilderList() { + return relationships_; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + @java.lang.Override + public int getRelationshipsCount() { + return relationships_.size(); + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + @java.lang.Override + public com.authzed.api.v0.Core.RelationTuple getRelationships(int index) { + return relationships_.get(index); + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + @java.lang.Override + public com.authzed.api.v0.Core.RelationTupleOrBuilder getRelationshipsOrBuilder( + int index) { + return relationships_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_); + } + for (int i = 0; i < relationships_.size(); i++) { + output.writeMessage(2, relationships_.get(i)); + } + 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(schema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_); + } + for (int i = 0; i < relationships_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, relationships_.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.v0.Developer.RequestContext)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.RequestContext other = (com.authzed.api.v0.Developer.RequestContext) obj; + + if (!getSchema() + .equals(other.getSchema())) return false; + if (!getRelationshipsList() + .equals(other.getRelationshipsList())) 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) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + if (getRelationshipsCount() > 0) { + hash = (37 * hash) + RELATIONSHIPS_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.RequestContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.RequestContext 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.v0.Developer.RequestContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.RequestContext 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.v0.Developer.RequestContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.RequestContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.RequestContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.RequestContext 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.v0.Developer.RequestContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.RequestContext 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.v0.Developer.RequestContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.RequestContext 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.v0.Developer.RequestContext 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; + } + /** + * Protobuf type {@code authzed.api.v0.RequestContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.RequestContext) + com.authzed.api.v0.Developer.RequestContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_RequestContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_RequestContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.RequestContext.class, com.authzed.api.v0.Developer.RequestContext.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.RequestContext.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schema_ = ""; + if (relationshipsBuilder_ == null) { + relationships_ = java.util.Collections.emptyList(); + } else { + relationships_ = null; + relationshipsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_RequestContext_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.RequestContext getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.RequestContext.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.RequestContext build() { + com.authzed.api.v0.Developer.RequestContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.RequestContext buildPartial() { + com.authzed.api.v0.Developer.RequestContext result = new com.authzed.api.v0.Developer.RequestContext(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v0.Developer.RequestContext result) { + if (relationshipsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + relationships_ = java.util.Collections.unmodifiableList(relationships_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relationships_ = relationships_; + } else { + result.relationships_ = relationshipsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v0.Developer.RequestContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schema_ = schema_; + } + } + + @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.v0.Developer.RequestContext) { + return mergeFrom((com.authzed.api.v0.Developer.RequestContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.RequestContext other) { + if (other == com.authzed.api.v0.Developer.RequestContext.getDefaultInstance()) return this; + if (!other.getSchema().isEmpty()) { + schema_ = other.schema_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (relationshipsBuilder_ == null) { + if (!other.relationships_.isEmpty()) { + if (relationships_.isEmpty()) { + relationships_ = other.relationships_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelationshipsIsMutable(); + relationships_.addAll(other.relationships_); + } + onChanged(); + } + } else { + if (!other.relationships_.isEmpty()) { + if (relationshipsBuilder_.isEmpty()) { + relationshipsBuilder_.dispose(); + relationshipsBuilder_ = null; + relationships_ = other.relationships_; + bitField0_ = (bitField0_ & ~0x00000002); + relationshipsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelationshipsFieldBuilder() : null; + } else { + relationshipsBuilder_.addAllMessages(other.relationships_); + } + } + } + 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: { + schema_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.authzed.api.v0.Core.RelationTuple m = + input.readMessage( + com.authzed.api.v0.Core.RelationTuple.parser(), + extensionRegistry); + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.add(m); + } else { + relationshipsBuilder_.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 java.lang.Object schema_ = ""; + /** + * string schema = 1 [json_name = "schema"]; + * @return The schema. + */ + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string schema = 1 [json_name = "schema"]; + * @return The bytes for schema. + */ + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string schema = 1 [json_name = "schema"]; + * @param value The schema to set. + * @return This builder for chaining. + */ + public Builder setSchema( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string schema = 1 [json_name = "schema"]; + * @return This builder for chaining. + */ + public Builder clearSchema() { + schema_ = getDefaultInstance().getSchema(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string schema = 1 [json_name = "schema"]; + * @param value The bytes for schema to set. + * @return This builder for chaining. + */ + public Builder setSchemaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List relationships_ = + java.util.Collections.emptyList(); + private void ensureRelationshipsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relationships_ = new java.util.ArrayList(relationships_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Core.RelationTuple, com.authzed.api.v0.Core.RelationTuple.Builder, com.authzed.api.v0.Core.RelationTupleOrBuilder> relationshipsBuilder_; + + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public java.util.List getRelationshipsList() { + if (relationshipsBuilder_ == null) { + return java.util.Collections.unmodifiableList(relationships_); + } else { + return relationshipsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public int getRelationshipsCount() { + if (relationshipsBuilder_ == null) { + return relationships_.size(); + } else { + return relationshipsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public com.authzed.api.v0.Core.RelationTuple getRelationships(int index) { + if (relationshipsBuilder_ == null) { + return relationships_.get(index); + } else { + return relationshipsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public Builder setRelationships( + int index, com.authzed.api.v0.Core.RelationTuple value) { + if (relationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipsIsMutable(); + relationships_.set(index, value); + onChanged(); + } else { + relationshipsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public Builder setRelationships( + int index, com.authzed.api.v0.Core.RelationTuple.Builder builderForValue) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.set(index, builderForValue.build()); + onChanged(); + } else { + relationshipsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public Builder addRelationships(com.authzed.api.v0.Core.RelationTuple value) { + if (relationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipsIsMutable(); + relationships_.add(value); + onChanged(); + } else { + relationshipsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public Builder addRelationships( + int index, com.authzed.api.v0.Core.RelationTuple value) { + if (relationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipsIsMutable(); + relationships_.add(index, value); + onChanged(); + } else { + relationshipsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public Builder addRelationships( + com.authzed.api.v0.Core.RelationTuple.Builder builderForValue) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.add(builderForValue.build()); + onChanged(); + } else { + relationshipsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public Builder addRelationships( + int index, com.authzed.api.v0.Core.RelationTuple.Builder builderForValue) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.add(index, builderForValue.build()); + onChanged(); + } else { + relationshipsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public Builder addAllRelationships( + java.lang.Iterable values) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relationships_); + onChanged(); + } else { + relationshipsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public Builder clearRelationships() { + if (relationshipsBuilder_ == null) { + relationships_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + relationshipsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public Builder removeRelationships(int index) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.remove(index); + onChanged(); + } else { + relationshipsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public com.authzed.api.v0.Core.RelationTuple.Builder getRelationshipsBuilder( + int index) { + return getRelationshipsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public com.authzed.api.v0.Core.RelationTupleOrBuilder getRelationshipsOrBuilder( + int index) { + if (relationshipsBuilder_ == null) { + return relationships_.get(index); } else { + return relationshipsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public java.util.List + getRelationshipsOrBuilderList() { + if (relationshipsBuilder_ != null) { + return relationshipsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relationships_); + } + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public com.authzed.api.v0.Core.RelationTuple.Builder addRelationshipsBuilder() { + return getRelationshipsFieldBuilder().addBuilder( + com.authzed.api.v0.Core.RelationTuple.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public com.authzed.api.v0.Core.RelationTuple.Builder addRelationshipsBuilder( + int index) { + return getRelationshipsFieldBuilder().addBuilder( + index, com.authzed.api.v0.Core.RelationTuple.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"]; + */ + public java.util.List + getRelationshipsBuilderList() { + return getRelationshipsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Core.RelationTuple, com.authzed.api.v0.Core.RelationTuple.Builder, com.authzed.api.v0.Core.RelationTupleOrBuilder> + getRelationshipsFieldBuilder() { + if (relationshipsBuilder_ == null) { + relationshipsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Core.RelationTuple, com.authzed.api.v0.Core.RelationTuple.Builder, com.authzed.api.v0.Core.RelationTupleOrBuilder>( + relationships_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + relationships_ = null; + } + return relationshipsBuilder_; + } + @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.v0.RequestContext) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.RequestContext) + private static final com.authzed.api.v0.Developer.RequestContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.RequestContext(); + } + + public static com.authzed.api.v0.Developer.RequestContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RequestContext 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.v0.Developer.RequestContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EditCheckRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.EditCheckRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return The context. + */ + com.authzed.api.v0.Developer.RequestContext getContext(); + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + com.authzed.api.v0.Developer.RequestContextOrBuilder getContextOrBuilder(); + + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + java.util.List + getCheckRelationshipsList(); + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + com.authzed.api.v0.Core.RelationTuple getCheckRelationships(int index); + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + int getCheckRelationshipsCount(); + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + java.util.List + getCheckRelationshipsOrBuilderList(); + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + com.authzed.api.v0.Core.RelationTupleOrBuilder getCheckRelationshipsOrBuilder( + int index); + } + /** + * Protobuf type {@code authzed.api.v0.EditCheckRequest} + */ + public static final class EditCheckRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.EditCheckRequest) + EditCheckRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use EditCheckRequest.newBuilder() to construct. + private EditCheckRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EditCheckRequest() { + checkRelationships_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EditCheckRequest(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_EditCheckRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.EditCheckRequest.class, com.authzed.api.v0.Developer.EditCheckRequest.Builder.class); + } + + public static final int CONTEXT_FIELD_NUMBER = 1; + private com.authzed.api.v0.Developer.RequestContext context_; + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return The context. + */ + @java.lang.Override + public com.authzed.api.v0.Developer.RequestContext getContext() { + return context_ == null ? com.authzed.api.v0.Developer.RequestContext.getDefaultInstance() : context_; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.RequestContextOrBuilder getContextOrBuilder() { + return context_ == null ? com.authzed.api.v0.Developer.RequestContext.getDefaultInstance() : context_; + } + + public static final int CHECK_RELATIONSHIPS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List checkRelationships_; + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + @java.lang.Override + public java.util.List getCheckRelationshipsList() { + return checkRelationships_; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + @java.lang.Override + public java.util.List + getCheckRelationshipsOrBuilderList() { + return checkRelationships_; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + @java.lang.Override + public int getCheckRelationshipsCount() { + return checkRelationships_.size(); + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + @java.lang.Override + public com.authzed.api.v0.Core.RelationTuple getCheckRelationships(int index) { + return checkRelationships_.get(index); + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + @java.lang.Override + public com.authzed.api.v0.Core.RelationTupleOrBuilder getCheckRelationshipsOrBuilder( + int index) { + return checkRelationships_.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 (context_ != null) { + output.writeMessage(1, getContext()); + } + for (int i = 0; i < checkRelationships_.size(); i++) { + output.writeMessage(2, checkRelationships_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getContext()); + } + for (int i = 0; i < checkRelationships_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, checkRelationships_.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.v0.Developer.EditCheckRequest)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.EditCheckRequest other = (com.authzed.api.v0.Developer.EditCheckRequest) obj; + + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (!getCheckRelationshipsList() + .equals(other.getCheckRelationshipsList())) 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 (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + if (getCheckRelationshipsCount() > 0) { + hash = (37 * hash) + CHECK_RELATIONSHIPS_FIELD_NUMBER; + hash = (53 * hash) + getCheckRelationshipsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.EditCheckRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.EditCheckRequest 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.v0.Developer.EditCheckRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.EditCheckRequest 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.v0.Developer.EditCheckRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.EditCheckRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.EditCheckRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.EditCheckRequest 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.v0.Developer.EditCheckRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.EditCheckRequest 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.v0.Developer.EditCheckRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.EditCheckRequest 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.v0.Developer.EditCheckRequest 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; + } + /** + * Protobuf type {@code authzed.api.v0.EditCheckRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.EditCheckRequest) + com.authzed.api.v0.Developer.EditCheckRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.EditCheckRequest.class, com.authzed.api.v0.Developer.EditCheckRequest.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.EditCheckRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + if (checkRelationshipsBuilder_ == null) { + checkRelationships_ = java.util.Collections.emptyList(); + } else { + checkRelationships_ = null; + checkRelationshipsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckRequest getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.EditCheckRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckRequest build() { + com.authzed.api.v0.Developer.EditCheckRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckRequest buildPartial() { + com.authzed.api.v0.Developer.EditCheckRequest result = new com.authzed.api.v0.Developer.EditCheckRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v0.Developer.EditCheckRequest result) { + if (checkRelationshipsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + checkRelationships_ = java.util.Collections.unmodifiableList(checkRelationships_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.checkRelationships_ = checkRelationships_; + } else { + result.checkRelationships_ = checkRelationshipsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v0.Developer.EditCheckRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 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.v0.Developer.EditCheckRequest) { + return mergeFrom((com.authzed.api.v0.Developer.EditCheckRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.EditCheckRequest other) { + if (other == com.authzed.api.v0.Developer.EditCheckRequest.getDefaultInstance()) return this; + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (checkRelationshipsBuilder_ == null) { + if (!other.checkRelationships_.isEmpty()) { + if (checkRelationships_.isEmpty()) { + checkRelationships_ = other.checkRelationships_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCheckRelationshipsIsMutable(); + checkRelationships_.addAll(other.checkRelationships_); + } + onChanged(); + } + } else { + if (!other.checkRelationships_.isEmpty()) { + if (checkRelationshipsBuilder_.isEmpty()) { + checkRelationshipsBuilder_.dispose(); + checkRelationshipsBuilder_ = null; + checkRelationships_ = other.checkRelationships_; + bitField0_ = (bitField0_ & ~0x00000002); + checkRelationshipsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCheckRelationshipsFieldBuilder() : null; + } else { + checkRelationshipsBuilder_.addAllMessages(other.checkRelationships_); + } + } + } + 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( + getContextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.authzed.api.v0.Core.RelationTuple m = + input.readMessage( + com.authzed.api.v0.Core.RelationTuple.parser(), + extensionRegistry); + if (checkRelationshipsBuilder_ == null) { + ensureCheckRelationshipsIsMutable(); + checkRelationships_.add(m); + } else { + checkRelationshipsBuilder_.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 com.authzed.api.v0.Developer.RequestContext context_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.RequestContext, com.authzed.api.v0.Developer.RequestContext.Builder, com.authzed.api.v0.Developer.RequestContextOrBuilder> contextBuilder_; + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return The context. + */ + public com.authzed.api.v0.Developer.RequestContext getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.authzed.api.v0.Developer.RequestContext.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public Builder setContext(com.authzed.api.v0.Developer.RequestContext value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + } else { + contextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public Builder setContext( + com.authzed.api.v0.Developer.RequestContext.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public Builder mergeContext(com.authzed.api.v0.Developer.RequestContext value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + context_ != null && + context_ != com.authzed.api.v0.Developer.RequestContext.getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000001); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public com.authzed.api.v0.Developer.RequestContext.Builder getContextBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public com.authzed.api.v0.Developer.RequestContextOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.authzed.api.v0.Developer.RequestContext.getDefaultInstance() : context_; + } + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.RequestContext, com.authzed.api.v0.Developer.RequestContext.Builder, com.authzed.api.v0.Developer.RequestContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.RequestContext, com.authzed.api.v0.Developer.RequestContext.Builder, com.authzed.api.v0.Developer.RequestContextOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + + private java.util.List checkRelationships_ = + java.util.Collections.emptyList(); + private void ensureCheckRelationshipsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + checkRelationships_ = new java.util.ArrayList(checkRelationships_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Core.RelationTuple, com.authzed.api.v0.Core.RelationTuple.Builder, com.authzed.api.v0.Core.RelationTupleOrBuilder> checkRelationshipsBuilder_; + + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public java.util.List getCheckRelationshipsList() { + if (checkRelationshipsBuilder_ == null) { + return java.util.Collections.unmodifiableList(checkRelationships_); + } else { + return checkRelationshipsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public int getCheckRelationshipsCount() { + if (checkRelationshipsBuilder_ == null) { + return checkRelationships_.size(); + } else { + return checkRelationshipsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public com.authzed.api.v0.Core.RelationTuple getCheckRelationships(int index) { + if (checkRelationshipsBuilder_ == null) { + return checkRelationships_.get(index); + } else { + return checkRelationshipsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public Builder setCheckRelationships( + int index, com.authzed.api.v0.Core.RelationTuple value) { + if (checkRelationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCheckRelationshipsIsMutable(); + checkRelationships_.set(index, value); + onChanged(); + } else { + checkRelationshipsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public Builder setCheckRelationships( + int index, com.authzed.api.v0.Core.RelationTuple.Builder builderForValue) { + if (checkRelationshipsBuilder_ == null) { + ensureCheckRelationshipsIsMutable(); + checkRelationships_.set(index, builderForValue.build()); + onChanged(); + } else { + checkRelationshipsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public Builder addCheckRelationships(com.authzed.api.v0.Core.RelationTuple value) { + if (checkRelationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCheckRelationshipsIsMutable(); + checkRelationships_.add(value); + onChanged(); + } else { + checkRelationshipsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public Builder addCheckRelationships( + int index, com.authzed.api.v0.Core.RelationTuple value) { + if (checkRelationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCheckRelationshipsIsMutable(); + checkRelationships_.add(index, value); + onChanged(); + } else { + checkRelationshipsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public Builder addCheckRelationships( + com.authzed.api.v0.Core.RelationTuple.Builder builderForValue) { + if (checkRelationshipsBuilder_ == null) { + ensureCheckRelationshipsIsMutable(); + checkRelationships_.add(builderForValue.build()); + onChanged(); + } else { + checkRelationshipsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public Builder addCheckRelationships( + int index, com.authzed.api.v0.Core.RelationTuple.Builder builderForValue) { + if (checkRelationshipsBuilder_ == null) { + ensureCheckRelationshipsIsMutable(); + checkRelationships_.add(index, builderForValue.build()); + onChanged(); + } else { + checkRelationshipsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public Builder addAllCheckRelationships( + java.lang.Iterable values) { + if (checkRelationshipsBuilder_ == null) { + ensureCheckRelationshipsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, checkRelationships_); + onChanged(); + } else { + checkRelationshipsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public Builder clearCheckRelationships() { + if (checkRelationshipsBuilder_ == null) { + checkRelationships_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + checkRelationshipsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public Builder removeCheckRelationships(int index) { + if (checkRelationshipsBuilder_ == null) { + ensureCheckRelationshipsIsMutable(); + checkRelationships_.remove(index); + onChanged(); + } else { + checkRelationshipsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public com.authzed.api.v0.Core.RelationTuple.Builder getCheckRelationshipsBuilder( + int index) { + return getCheckRelationshipsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public com.authzed.api.v0.Core.RelationTupleOrBuilder getCheckRelationshipsOrBuilder( + int index) { + if (checkRelationshipsBuilder_ == null) { + return checkRelationships_.get(index); } else { + return checkRelationshipsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public java.util.List + getCheckRelationshipsOrBuilderList() { + if (checkRelationshipsBuilder_ != null) { + return checkRelationshipsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(checkRelationships_); + } + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public com.authzed.api.v0.Core.RelationTuple.Builder addCheckRelationshipsBuilder() { + return getCheckRelationshipsFieldBuilder().addBuilder( + com.authzed.api.v0.Core.RelationTuple.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public com.authzed.api.v0.Core.RelationTuple.Builder addCheckRelationshipsBuilder( + int index) { + return getCheckRelationshipsFieldBuilder().addBuilder( + index, com.authzed.api.v0.Core.RelationTuple.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"]; + */ + public java.util.List + getCheckRelationshipsBuilderList() { + return getCheckRelationshipsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Core.RelationTuple, com.authzed.api.v0.Core.RelationTuple.Builder, com.authzed.api.v0.Core.RelationTupleOrBuilder> + getCheckRelationshipsFieldBuilder() { + if (checkRelationshipsBuilder_ == null) { + checkRelationshipsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Core.RelationTuple, com.authzed.api.v0.Core.RelationTuple.Builder, com.authzed.api.v0.Core.RelationTupleOrBuilder>( + checkRelationships_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + checkRelationships_ = null; + } + return checkRelationshipsBuilder_; + } + @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.v0.EditCheckRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.EditCheckRequest) + private static final com.authzed.api.v0.Developer.EditCheckRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.EditCheckRequest(); + } + + public static com.authzed.api.v0.Developer.EditCheckRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EditCheckRequest 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.v0.Developer.EditCheckRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EditCheckResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.EditCheckResult) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + * @return Whether the relationship field is set. + */ + boolean hasRelationship(); + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + * @return The relationship. + */ + com.authzed.api.v0.Core.RelationTuple getRelationship(); + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + */ + com.authzed.api.v0.Core.RelationTupleOrBuilder getRelationshipOrBuilder(); + + /** + * bool is_member = 2 [json_name = "isMember"]; + * @return The isMember. + */ + boolean getIsMember(); + + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + * @return The error. + */ + com.authzed.api.v0.Developer.DeveloperError getError(); + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + */ + com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getErrorOrBuilder(); + } + /** + * Protobuf type {@code authzed.api.v0.EditCheckResult} + */ + public static final class EditCheckResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.EditCheckResult) + EditCheckResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use EditCheckResult.newBuilder() to construct. + private EditCheckResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EditCheckResult() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EditCheckResult(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_EditCheckResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.EditCheckResult.class, com.authzed.api.v0.Developer.EditCheckResult.Builder.class); + } + + public static final int RELATIONSHIP_FIELD_NUMBER = 1; + private com.authzed.api.v0.Core.RelationTuple relationship_; + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + * @return Whether the relationship field is set. + */ + @java.lang.Override + public boolean hasRelationship() { + return relationship_ != null; + } + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + * @return The relationship. + */ + @java.lang.Override + public com.authzed.api.v0.Core.RelationTuple getRelationship() { + return relationship_ == null ? com.authzed.api.v0.Core.RelationTuple.getDefaultInstance() : relationship_; + } + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + */ + @java.lang.Override + public com.authzed.api.v0.Core.RelationTupleOrBuilder getRelationshipOrBuilder() { + return relationship_ == null ? com.authzed.api.v0.Core.RelationTuple.getDefaultInstance() : relationship_; + } + + public static final int IS_MEMBER_FIELD_NUMBER = 2; + private boolean isMember_ = false; + /** + * bool is_member = 2 [json_name = "isMember"]; + * @return The isMember. + */ + @java.lang.Override + public boolean getIsMember() { + return isMember_; + } + + public static final int ERROR_FIELD_NUMBER = 3; + private com.authzed.api.v0.Developer.DeveloperError error_; + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + * @return The error. + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError getError() { + return error_ == null ? com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getErrorOrBuilder() { + return error_ == null ? com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } + + 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 (relationship_ != null) { + output.writeMessage(1, getRelationship()); + } + if (isMember_ != false) { + output.writeBool(2, isMember_); + } + if (error_ != null) { + output.writeMessage(3, getError()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (relationship_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRelationship()); + } + if (isMember_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isMember_); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getError()); + } + 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.v0.Developer.EditCheckResult)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.EditCheckResult other = (com.authzed.api.v0.Developer.EditCheckResult) obj; + + if (hasRelationship() != other.hasRelationship()) return false; + if (hasRelationship()) { + if (!getRelationship() + .equals(other.getRelationship())) return false; + } + if (getIsMember() + != other.getIsMember()) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) 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 (hasRelationship()) { + hash = (37 * hash) + RELATIONSHIP_FIELD_NUMBER; + hash = (53 * hash) + getRelationship().hashCode(); + } + hash = (37 * hash) + IS_MEMBER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsMember()); + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.EditCheckResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.EditCheckResult 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.v0.Developer.EditCheckResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.EditCheckResult 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.v0.Developer.EditCheckResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.EditCheckResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.EditCheckResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.EditCheckResult 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.v0.Developer.EditCheckResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.EditCheckResult 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.v0.Developer.EditCheckResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.EditCheckResult 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.v0.Developer.EditCheckResult 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; + } + /** + * Protobuf type {@code authzed.api.v0.EditCheckResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.EditCheckResult) + com.authzed.api.v0.Developer.EditCheckResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.EditCheckResult.class, com.authzed.api.v0.Developer.EditCheckResult.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.EditCheckResult.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relationship_ = null; + if (relationshipBuilder_ != null) { + relationshipBuilder_.dispose(); + relationshipBuilder_ = null; + } + isMember_ = false; + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckResult_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckResult getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.EditCheckResult.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckResult build() { + com.authzed.api.v0.Developer.EditCheckResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckResult buildPartial() { + com.authzed.api.v0.Developer.EditCheckResult result = new com.authzed.api.v0.Developer.EditCheckResult(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Developer.EditCheckResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relationship_ = relationshipBuilder_ == null + ? relationship_ + : relationshipBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.isMember_ = isMember_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.error_ = errorBuilder_ == null + ? error_ + : errorBuilder_.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.v0.Developer.EditCheckResult) { + return mergeFrom((com.authzed.api.v0.Developer.EditCheckResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.EditCheckResult other) { + if (other == com.authzed.api.v0.Developer.EditCheckResult.getDefaultInstance()) return this; + if (other.hasRelationship()) { + mergeRelationship(other.getRelationship()); + } + if (other.getIsMember() != false) { + setIsMember(other.getIsMember()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + 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( + getRelationshipFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + isMember_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getErrorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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.v0.Core.RelationTuple relationship_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.RelationTuple, com.authzed.api.v0.Core.RelationTuple.Builder, com.authzed.api.v0.Core.RelationTupleOrBuilder> relationshipBuilder_; + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + * @return Whether the relationship field is set. + */ + public boolean hasRelationship() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + * @return The relationship. + */ + public com.authzed.api.v0.Core.RelationTuple getRelationship() { + if (relationshipBuilder_ == null) { + return relationship_ == null ? com.authzed.api.v0.Core.RelationTuple.getDefaultInstance() : relationship_; + } else { + return relationshipBuilder_.getMessage(); + } + } + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + */ + public Builder setRelationship(com.authzed.api.v0.Core.RelationTuple value) { + if (relationshipBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relationship_ = value; + } else { + relationshipBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + */ + public Builder setRelationship( + com.authzed.api.v0.Core.RelationTuple.Builder builderForValue) { + if (relationshipBuilder_ == null) { + relationship_ = builderForValue.build(); + } else { + relationshipBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + */ + public Builder mergeRelationship(com.authzed.api.v0.Core.RelationTuple value) { + if (relationshipBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + relationship_ != null && + relationship_ != com.authzed.api.v0.Core.RelationTuple.getDefaultInstance()) { + getRelationshipBuilder().mergeFrom(value); + } else { + relationship_ = value; + } + } else { + relationshipBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + */ + public Builder clearRelationship() { + bitField0_ = (bitField0_ & ~0x00000001); + relationship_ = null; + if (relationshipBuilder_ != null) { + relationshipBuilder_.dispose(); + relationshipBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + */ + public com.authzed.api.v0.Core.RelationTuple.Builder getRelationshipBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRelationshipFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + */ + public com.authzed.api.v0.Core.RelationTupleOrBuilder getRelationshipOrBuilder() { + if (relationshipBuilder_ != null) { + return relationshipBuilder_.getMessageOrBuilder(); + } else { + return relationship_ == null ? + com.authzed.api.v0.Core.RelationTuple.getDefaultInstance() : relationship_; + } + } + /** + * .authzed.api.v0.RelationTuple relationship = 1 [json_name = "relationship"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.RelationTuple, com.authzed.api.v0.Core.RelationTuple.Builder, com.authzed.api.v0.Core.RelationTupleOrBuilder> + getRelationshipFieldBuilder() { + if (relationshipBuilder_ == null) { + relationshipBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Core.RelationTuple, com.authzed.api.v0.Core.RelationTuple.Builder, com.authzed.api.v0.Core.RelationTupleOrBuilder>( + getRelationship(), + getParentForChildren(), + isClean()); + relationship_ = null; + } + return relationshipBuilder_; + } + + private boolean isMember_ ; + /** + * bool is_member = 2 [json_name = "isMember"]; + * @return The isMember. + */ + @java.lang.Override + public boolean getIsMember() { + return isMember_; + } + /** + * bool is_member = 2 [json_name = "isMember"]; + * @param value The isMember to set. + * @return This builder for chaining. + */ + public Builder setIsMember(boolean value) { + + isMember_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool is_member = 2 [json_name = "isMember"]; + * @return This builder for chaining. + */ + public Builder clearIsMember() { + bitField0_ = (bitField0_ & ~0x00000002); + isMember_ = false; + onChanged(); + return this; + } + + private com.authzed.api.v0.Developer.DeveloperError error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> errorBuilder_; + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + * @return The error. + */ + public com.authzed.api.v0.Developer.DeveloperError getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + */ + public Builder setError(com.authzed.api.v0.Developer.DeveloperError value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + */ + public Builder setError( + com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + */ + public Builder mergeError(com.authzed.api.v0.Developer.DeveloperError value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + error_ != null && + error_ != com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000004); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder getErrorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + */ + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance() : error_; + } + } + /** + * .authzed.api.v0.DeveloperError error = 3 [json_name = "error"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + @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.v0.EditCheckResult) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.EditCheckResult) + private static final com.authzed.api.v0.Developer.EditCheckResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.EditCheckResult(); + } + + public static com.authzed.api.v0.Developer.EditCheckResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EditCheckResult 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.v0.Developer.EditCheckResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EditCheckResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.EditCheckResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + java.util.List + getRequestErrorsList(); + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + com.authzed.api.v0.Developer.DeveloperError getRequestErrors(int index); + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + int getRequestErrorsCount(); + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + java.util.List + getRequestErrorsOrBuilderList(); + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getRequestErrorsOrBuilder( + int index); + + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + java.util.List + getCheckResultsList(); + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + com.authzed.api.v0.Developer.EditCheckResult getCheckResults(int index); + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + int getCheckResultsCount(); + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + java.util.List + getCheckResultsOrBuilderList(); + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + com.authzed.api.v0.Developer.EditCheckResultOrBuilder getCheckResultsOrBuilder( + int index); + } + /** + * Protobuf type {@code authzed.api.v0.EditCheckResponse} + */ + public static final class EditCheckResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.EditCheckResponse) + EditCheckResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use EditCheckResponse.newBuilder() to construct. + private EditCheckResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EditCheckResponse() { + requestErrors_ = java.util.Collections.emptyList(); + checkResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EditCheckResponse(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_EditCheckResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.EditCheckResponse.class, com.authzed.api.v0.Developer.EditCheckResponse.Builder.class); + } + + public static final int REQUEST_ERRORS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List requestErrors_; + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + @java.lang.Override + public java.util.List getRequestErrorsList() { + return requestErrors_; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + @java.lang.Override + public java.util.List + getRequestErrorsOrBuilderList() { + return requestErrors_; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + @java.lang.Override + public int getRequestErrorsCount() { + return requestErrors_.size(); + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError getRequestErrors(int index) { + return requestErrors_.get(index); + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getRequestErrorsOrBuilder( + int index) { + return requestErrors_.get(index); + } + + public static final int CHECK_RESULTS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List checkResults_; + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + @java.lang.Override + public java.util.List getCheckResultsList() { + return checkResults_; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + @java.lang.Override + public java.util.List + getCheckResultsOrBuilderList() { + return checkResults_; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + @java.lang.Override + public int getCheckResultsCount() { + return checkResults_.size(); + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckResult getCheckResults(int index) { + return checkResults_.get(index); + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckResultOrBuilder getCheckResultsOrBuilder( + int index) { + return checkResults_.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 < requestErrors_.size(); i++) { + output.writeMessage(1, requestErrors_.get(i)); + } + for (int i = 0; i < checkResults_.size(); i++) { + output.writeMessage(2, checkResults_.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 < requestErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requestErrors_.get(i)); + } + for (int i = 0; i < checkResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, checkResults_.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.v0.Developer.EditCheckResponse)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.EditCheckResponse other = (com.authzed.api.v0.Developer.EditCheckResponse) obj; + + if (!getRequestErrorsList() + .equals(other.getRequestErrorsList())) return false; + if (!getCheckResultsList() + .equals(other.getCheckResultsList())) 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 (getRequestErrorsCount() > 0) { + hash = (37 * hash) + REQUEST_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getRequestErrorsList().hashCode(); + } + if (getCheckResultsCount() > 0) { + hash = (37 * hash) + CHECK_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getCheckResultsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.EditCheckResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.EditCheckResponse 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.v0.Developer.EditCheckResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.EditCheckResponse 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.v0.Developer.EditCheckResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.EditCheckResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.EditCheckResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.EditCheckResponse 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.v0.Developer.EditCheckResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.EditCheckResponse 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.v0.Developer.EditCheckResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.EditCheckResponse 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.v0.Developer.EditCheckResponse 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; + } + /** + * Protobuf type {@code authzed.api.v0.EditCheckResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.EditCheckResponse) + com.authzed.api.v0.Developer.EditCheckResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.EditCheckResponse.class, com.authzed.api.v0.Developer.EditCheckResponse.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.EditCheckResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (requestErrorsBuilder_ == null) { + requestErrors_ = java.util.Collections.emptyList(); + } else { + requestErrors_ = null; + requestErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (checkResultsBuilder_ == null) { + checkResults_ = java.util.Collections.emptyList(); + } else { + checkResults_ = null; + checkResultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_EditCheckResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckResponse getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.EditCheckResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckResponse build() { + com.authzed.api.v0.Developer.EditCheckResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.EditCheckResponse buildPartial() { + com.authzed.api.v0.Developer.EditCheckResponse result = new com.authzed.api.v0.Developer.EditCheckResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v0.Developer.EditCheckResponse result) { + if (requestErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requestErrors_ = java.util.Collections.unmodifiableList(requestErrors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requestErrors_ = requestErrors_; + } else { + result.requestErrors_ = requestErrorsBuilder_.build(); + } + if (checkResultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + checkResults_ = java.util.Collections.unmodifiableList(checkResults_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.checkResults_ = checkResults_; + } else { + result.checkResults_ = checkResultsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v0.Developer.EditCheckResponse 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.v0.Developer.EditCheckResponse) { + return mergeFrom((com.authzed.api.v0.Developer.EditCheckResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.EditCheckResponse other) { + if (other == com.authzed.api.v0.Developer.EditCheckResponse.getDefaultInstance()) return this; + if (requestErrorsBuilder_ == null) { + if (!other.requestErrors_.isEmpty()) { + if (requestErrors_.isEmpty()) { + requestErrors_ = other.requestErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestErrorsIsMutable(); + requestErrors_.addAll(other.requestErrors_); + } + onChanged(); + } + } else { + if (!other.requestErrors_.isEmpty()) { + if (requestErrorsBuilder_.isEmpty()) { + requestErrorsBuilder_.dispose(); + requestErrorsBuilder_ = null; + requestErrors_ = other.requestErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + requestErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestErrorsFieldBuilder() : null; + } else { + requestErrorsBuilder_.addAllMessages(other.requestErrors_); + } + } + } + if (checkResultsBuilder_ == null) { + if (!other.checkResults_.isEmpty()) { + if (checkResults_.isEmpty()) { + checkResults_ = other.checkResults_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCheckResultsIsMutable(); + checkResults_.addAll(other.checkResults_); + } + onChanged(); + } + } else { + if (!other.checkResults_.isEmpty()) { + if (checkResultsBuilder_.isEmpty()) { + checkResultsBuilder_.dispose(); + checkResultsBuilder_ = null; + checkResults_ = other.checkResults_; + bitField0_ = (bitField0_ & ~0x00000002); + checkResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCheckResultsFieldBuilder() : null; + } else { + checkResultsBuilder_.addAllMessages(other.checkResults_); + } + } + } + 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.v0.Developer.DeveloperError m = + input.readMessage( + com.authzed.api.v0.Developer.DeveloperError.parser(), + extensionRegistry); + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + requestErrors_.add(m); + } else { + requestErrorsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.authzed.api.v0.Developer.EditCheckResult m = + input.readMessage( + com.authzed.api.v0.Developer.EditCheckResult.parser(), + extensionRegistry); + if (checkResultsBuilder_ == null) { + ensureCheckResultsIsMutable(); + checkResults_.add(m); + } else { + checkResultsBuilder_.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 java.util.List requestErrors_ = + java.util.Collections.emptyList(); + private void ensureRequestErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requestErrors_ = new java.util.ArrayList(requestErrors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> requestErrorsBuilder_; + + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public java.util.List getRequestErrorsList() { + if (requestErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requestErrors_); + } else { + return requestErrorsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public int getRequestErrorsCount() { + if (requestErrorsBuilder_ == null) { + return requestErrors_.size(); + } else { + return requestErrorsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError getRequestErrors(int index) { + if (requestErrorsBuilder_ == null) { + return requestErrors_.get(index); + } else { + return requestErrorsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder setRequestErrors( + int index, com.authzed.api.v0.Developer.DeveloperError value) { + if (requestErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestErrorsIsMutable(); + requestErrors_.set(index, value); + onChanged(); + } else { + requestErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder setRequestErrors( + int index, com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + requestErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + requestErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder addRequestErrors(com.authzed.api.v0.Developer.DeveloperError value) { + if (requestErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestErrorsIsMutable(); + requestErrors_.add(value); + onChanged(); + } else { + requestErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder addRequestErrors( + int index, com.authzed.api.v0.Developer.DeveloperError value) { + if (requestErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestErrorsIsMutable(); + requestErrors_.add(index, value); + onChanged(); + } else { + requestErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder addRequestErrors( + com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + requestErrors_.add(builderForValue.build()); + onChanged(); + } else { + requestErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder addRequestErrors( + int index, com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + requestErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + requestErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder addAllRequestErrors( + java.lang.Iterable values) { + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requestErrors_); + onChanged(); + } else { + requestErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder clearRequestErrors() { + if (requestErrorsBuilder_ == null) { + requestErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestErrorsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder removeRequestErrors(int index) { + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + requestErrors_.remove(index); + onChanged(); + } else { + requestErrorsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder getRequestErrorsBuilder( + int index) { + return getRequestErrorsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getRequestErrorsOrBuilder( + int index) { + if (requestErrorsBuilder_ == null) { + return requestErrors_.get(index); } else { + return requestErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public java.util.List + getRequestErrorsOrBuilderList() { + if (requestErrorsBuilder_ != null) { + return requestErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requestErrors_); + } + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder addRequestErrorsBuilder() { + return getRequestErrorsFieldBuilder().addBuilder( + com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder addRequestErrorsBuilder( + int index) { + return getRequestErrorsFieldBuilder().addBuilder( + index, com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public java.util.List + getRequestErrorsBuilderList() { + return getRequestErrorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> + getRequestErrorsFieldBuilder() { + if (requestErrorsBuilder_ == null) { + requestErrorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder>( + requestErrors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requestErrors_ = null; + } + return requestErrorsBuilder_; + } + + private java.util.List checkResults_ = + java.util.Collections.emptyList(); + private void ensureCheckResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + checkResults_ = new java.util.ArrayList(checkResults_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.EditCheckResult, com.authzed.api.v0.Developer.EditCheckResult.Builder, com.authzed.api.v0.Developer.EditCheckResultOrBuilder> checkResultsBuilder_; + + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public java.util.List getCheckResultsList() { + if (checkResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(checkResults_); + } else { + return checkResultsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public int getCheckResultsCount() { + if (checkResultsBuilder_ == null) { + return checkResults_.size(); + } else { + return checkResultsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public com.authzed.api.v0.Developer.EditCheckResult getCheckResults(int index) { + if (checkResultsBuilder_ == null) { + return checkResults_.get(index); + } else { + return checkResultsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public Builder setCheckResults( + int index, com.authzed.api.v0.Developer.EditCheckResult value) { + if (checkResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCheckResultsIsMutable(); + checkResults_.set(index, value); + onChanged(); + } else { + checkResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public Builder setCheckResults( + int index, com.authzed.api.v0.Developer.EditCheckResult.Builder builderForValue) { + if (checkResultsBuilder_ == null) { + ensureCheckResultsIsMutable(); + checkResults_.set(index, builderForValue.build()); + onChanged(); + } else { + checkResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public Builder addCheckResults(com.authzed.api.v0.Developer.EditCheckResult value) { + if (checkResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCheckResultsIsMutable(); + checkResults_.add(value); + onChanged(); + } else { + checkResultsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public Builder addCheckResults( + int index, com.authzed.api.v0.Developer.EditCheckResult value) { + if (checkResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCheckResultsIsMutable(); + checkResults_.add(index, value); + onChanged(); + } else { + checkResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public Builder addCheckResults( + com.authzed.api.v0.Developer.EditCheckResult.Builder builderForValue) { + if (checkResultsBuilder_ == null) { + ensureCheckResultsIsMutable(); + checkResults_.add(builderForValue.build()); + onChanged(); + } else { + checkResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public Builder addCheckResults( + int index, com.authzed.api.v0.Developer.EditCheckResult.Builder builderForValue) { + if (checkResultsBuilder_ == null) { + ensureCheckResultsIsMutable(); + checkResults_.add(index, builderForValue.build()); + onChanged(); + } else { + checkResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public Builder addAllCheckResults( + java.lang.Iterable values) { + if (checkResultsBuilder_ == null) { + ensureCheckResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, checkResults_); + onChanged(); + } else { + checkResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public Builder clearCheckResults() { + if (checkResultsBuilder_ == null) { + checkResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + checkResultsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public Builder removeCheckResults(int index) { + if (checkResultsBuilder_ == null) { + ensureCheckResultsIsMutable(); + checkResults_.remove(index); + onChanged(); + } else { + checkResultsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public com.authzed.api.v0.Developer.EditCheckResult.Builder getCheckResultsBuilder( + int index) { + return getCheckResultsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public com.authzed.api.v0.Developer.EditCheckResultOrBuilder getCheckResultsOrBuilder( + int index) { + if (checkResultsBuilder_ == null) { + return checkResults_.get(index); } else { + return checkResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public java.util.List + getCheckResultsOrBuilderList() { + if (checkResultsBuilder_ != null) { + return checkResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(checkResults_); + } + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public com.authzed.api.v0.Developer.EditCheckResult.Builder addCheckResultsBuilder() { + return getCheckResultsFieldBuilder().addBuilder( + com.authzed.api.v0.Developer.EditCheckResult.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public com.authzed.api.v0.Developer.EditCheckResult.Builder addCheckResultsBuilder( + int index) { + return getCheckResultsFieldBuilder().addBuilder( + index, com.authzed.api.v0.Developer.EditCheckResult.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"]; + */ + public java.util.List + getCheckResultsBuilderList() { + return getCheckResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.EditCheckResult, com.authzed.api.v0.Developer.EditCheckResult.Builder, com.authzed.api.v0.Developer.EditCheckResultOrBuilder> + getCheckResultsFieldBuilder() { + if (checkResultsBuilder_ == null) { + checkResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.EditCheckResult, com.authzed.api.v0.Developer.EditCheckResult.Builder, com.authzed.api.v0.Developer.EditCheckResultOrBuilder>( + checkResults_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + checkResults_ = null; + } + return checkResultsBuilder_; + } + @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.v0.EditCheckResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.EditCheckResponse) + private static final com.authzed.api.v0.Developer.EditCheckResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.EditCheckResponse(); + } + + public static com.authzed.api.v0.Developer.EditCheckResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EditCheckResponse 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.v0.Developer.EditCheckResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ValidateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.ValidateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return The context. + */ + com.authzed.api.v0.Developer.RequestContext getContext(); + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + com.authzed.api.v0.Developer.RequestContextOrBuilder getContextOrBuilder(); + + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The validationYaml. + */ + java.lang.String getValidationYaml(); + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The bytes for validationYaml. + */ + com.google.protobuf.ByteString + getValidationYamlBytes(); + + /** + * bool update_validation_yaml = 4 [json_name = "updateValidationYaml"]; + * @return The updateValidationYaml. + */ + boolean getUpdateValidationYaml(); + + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The assertionsYaml. + */ + java.lang.String getAssertionsYaml(); + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The bytes for assertionsYaml. + */ + com.google.protobuf.ByteString + getAssertionsYamlBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.ValidateRequest} + */ + public static final class ValidateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.ValidateRequest) + ValidateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidateRequest.newBuilder() to construct. + private ValidateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ValidateRequest() { + validationYaml_ = ""; + assertionsYaml_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ValidateRequest(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_ValidateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ValidateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.ValidateRequest.class, com.authzed.api.v0.Developer.ValidateRequest.Builder.class); + } + + public static final int CONTEXT_FIELD_NUMBER = 1; + private com.authzed.api.v0.Developer.RequestContext context_; + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return The context. + */ + @java.lang.Override + public com.authzed.api.v0.Developer.RequestContext getContext() { + return context_ == null ? com.authzed.api.v0.Developer.RequestContext.getDefaultInstance() : context_; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.RequestContextOrBuilder getContextOrBuilder() { + return context_ == null ? com.authzed.api.v0.Developer.RequestContext.getDefaultInstance() : context_; + } + + public static final int VALIDATION_YAML_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object validationYaml_ = ""; + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The validationYaml. + */ + @java.lang.Override + public java.lang.String getValidationYaml() { + java.lang.Object ref = validationYaml_; + 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(); + validationYaml_ = s; + return s; + } + } + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The bytes for validationYaml. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValidationYamlBytes() { + java.lang.Object ref = validationYaml_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validationYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPDATE_VALIDATION_YAML_FIELD_NUMBER = 4; + private boolean updateValidationYaml_ = false; + /** + * bool update_validation_yaml = 4 [json_name = "updateValidationYaml"]; + * @return The updateValidationYaml. + */ + @java.lang.Override + public boolean getUpdateValidationYaml() { + return updateValidationYaml_; + } + + public static final int ASSERTIONS_YAML_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object assertionsYaml_ = ""; + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The assertionsYaml. + */ + @java.lang.Override + public java.lang.String getAssertionsYaml() { + java.lang.Object ref = assertionsYaml_; + 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(); + assertionsYaml_ = s; + return s; + } + } + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The bytes for assertionsYaml. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssertionsYamlBytes() { + java.lang.Object ref = assertionsYaml_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assertionsYaml_ = 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 (context_ != null) { + output.writeMessage(1, getContext()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationYaml_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, validationYaml_); + } + if (updateValidationYaml_ != false) { + output.writeBool(4, updateValidationYaml_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assertionsYaml_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, assertionsYaml_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getContext()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationYaml_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, validationYaml_); + } + if (updateValidationYaml_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, updateValidationYaml_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assertionsYaml_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, assertionsYaml_); + } + 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.v0.Developer.ValidateRequest)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.ValidateRequest other = (com.authzed.api.v0.Developer.ValidateRequest) obj; + + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (!getValidationYaml() + .equals(other.getValidationYaml())) return false; + if (getUpdateValidationYaml() + != other.getUpdateValidationYaml()) return false; + if (!getAssertionsYaml() + .equals(other.getAssertionsYaml())) 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 (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + hash = (37 * hash) + VALIDATION_YAML_FIELD_NUMBER; + hash = (53 * hash) + getValidationYaml().hashCode(); + hash = (37 * hash) + UPDATE_VALIDATION_YAML_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUpdateValidationYaml()); + hash = (37 * hash) + ASSERTIONS_YAML_FIELD_NUMBER; + hash = (53 * hash) + getAssertionsYaml().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.ValidateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ValidateRequest 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.v0.Developer.ValidateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ValidateRequest 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.v0.Developer.ValidateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ValidateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.ValidateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ValidateRequest 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.v0.Developer.ValidateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ValidateRequest 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.v0.Developer.ValidateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ValidateRequest 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.v0.Developer.ValidateRequest 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; + } + /** + * Protobuf type {@code authzed.api.v0.ValidateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.ValidateRequest) + com.authzed.api.v0.Developer.ValidateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ValidateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ValidateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.ValidateRequest.class, com.authzed.api.v0.Developer.ValidateRequest.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.ValidateRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + validationYaml_ = ""; + updateValidationYaml_ = false; + assertionsYaml_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ValidateRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ValidateRequest getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.ValidateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ValidateRequest build() { + com.authzed.api.v0.Developer.ValidateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ValidateRequest buildPartial() { + com.authzed.api.v0.Developer.ValidateRequest result = new com.authzed.api.v0.Developer.ValidateRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v0.Developer.ValidateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.context_ = contextBuilder_ == null + ? context_ + : contextBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validationYaml_ = validationYaml_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateValidationYaml_ = updateValidationYaml_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.assertionsYaml_ = assertionsYaml_; + } + } + + @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.v0.Developer.ValidateRequest) { + return mergeFrom((com.authzed.api.v0.Developer.ValidateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.ValidateRequest other) { + if (other == com.authzed.api.v0.Developer.ValidateRequest.getDefaultInstance()) return this; + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (!other.getValidationYaml().isEmpty()) { + validationYaml_ = other.validationYaml_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getUpdateValidationYaml() != false) { + setUpdateValidationYaml(other.getUpdateValidationYaml()); + } + if (!other.getAssertionsYaml().isEmpty()) { + assertionsYaml_ = other.assertionsYaml_; + bitField0_ |= 0x00000008; + 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( + getContextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: { + validationYaml_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 32: { + updateValidationYaml_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 42: { + assertionsYaml_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + 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.v0.Developer.RequestContext context_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.RequestContext, com.authzed.api.v0.Developer.RequestContext.Builder, com.authzed.api.v0.Developer.RequestContextOrBuilder> contextBuilder_; + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + * @return The context. + */ + public com.authzed.api.v0.Developer.RequestContext getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.authzed.api.v0.Developer.RequestContext.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public Builder setContext(com.authzed.api.v0.Developer.RequestContext value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + } else { + contextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public Builder setContext( + com.authzed.api.v0.Developer.RequestContext.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public Builder mergeContext(com.authzed.api.v0.Developer.RequestContext value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + context_ != null && + context_ != com.authzed.api.v0.Developer.RequestContext.getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000001); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public com.authzed.api.v0.Developer.RequestContext.Builder getContextBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + public com.authzed.api.v0.Developer.RequestContextOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.authzed.api.v0.Developer.RequestContext.getDefaultInstance() : context_; + } + } + /** + * .authzed.api.v0.RequestContext context = 1 [json_name = "context"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.RequestContext, com.authzed.api.v0.Developer.RequestContext.Builder, com.authzed.api.v0.Developer.RequestContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v0.Developer.RequestContext, com.authzed.api.v0.Developer.RequestContext.Builder, com.authzed.api.v0.Developer.RequestContextOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + + private java.lang.Object validationYaml_ = ""; + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The validationYaml. + */ + public java.lang.String getValidationYaml() { + java.lang.Object ref = validationYaml_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validationYaml_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return The bytes for validationYaml. + */ + public com.google.protobuf.ByteString + getValidationYamlBytes() { + java.lang.Object ref = validationYaml_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validationYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @param value The validationYaml to set. + * @return This builder for chaining. + */ + public Builder setValidationYaml( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + validationYaml_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @return This builder for chaining. + */ + public Builder clearValidationYaml() { + validationYaml_ = getDefaultInstance().getValidationYaml(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string validation_yaml = 3 [json_name = "validationYaml"]; + * @param value The bytes for validationYaml to set. + * @return This builder for chaining. + */ + public Builder setValidationYamlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + validationYaml_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean updateValidationYaml_ ; + /** + * bool update_validation_yaml = 4 [json_name = "updateValidationYaml"]; + * @return The updateValidationYaml. + */ + @java.lang.Override + public boolean getUpdateValidationYaml() { + return updateValidationYaml_; + } + /** + * bool update_validation_yaml = 4 [json_name = "updateValidationYaml"]; + * @param value The updateValidationYaml to set. + * @return This builder for chaining. + */ + public Builder setUpdateValidationYaml(boolean value) { + + updateValidationYaml_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool update_validation_yaml = 4 [json_name = "updateValidationYaml"]; + * @return This builder for chaining. + */ + public Builder clearUpdateValidationYaml() { + bitField0_ = (bitField0_ & ~0x00000004); + updateValidationYaml_ = false; + onChanged(); + return this; + } + + private java.lang.Object assertionsYaml_ = ""; + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The assertionsYaml. + */ + public java.lang.String getAssertionsYaml() { + java.lang.Object ref = assertionsYaml_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assertionsYaml_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return The bytes for assertionsYaml. + */ + public com.google.protobuf.ByteString + getAssertionsYamlBytes() { + java.lang.Object ref = assertionsYaml_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assertionsYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @param value The assertionsYaml to set. + * @return This builder for chaining. + */ + public Builder setAssertionsYaml( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + assertionsYaml_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @return This builder for chaining. + */ + public Builder clearAssertionsYaml() { + assertionsYaml_ = getDefaultInstance().getAssertionsYaml(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string assertions_yaml = 5 [json_name = "assertionsYaml"]; + * @param value The bytes for assertionsYaml to set. + * @return This builder for chaining. + */ + public Builder setAssertionsYamlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + assertionsYaml_ = 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.v0.ValidateRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.ValidateRequest) + private static final com.authzed.api.v0.Developer.ValidateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.ValidateRequest(); + } + + public static com.authzed.api.v0.Developer.ValidateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidateRequest 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.v0.Developer.ValidateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ValidateResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.ValidateResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + java.util.List + getRequestErrorsList(); + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + com.authzed.api.v0.Developer.DeveloperError getRequestErrors(int index); + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + int getRequestErrorsCount(); + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + java.util.List + getRequestErrorsOrBuilderList(); + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getRequestErrorsOrBuilder( + int index); + + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + java.util.List + getValidationErrorsList(); + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + com.authzed.api.v0.Developer.DeveloperError getValidationErrors(int index); + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + int getValidationErrorsCount(); + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + java.util.List + getValidationErrorsOrBuilderList(); + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getValidationErrorsOrBuilder( + int index); + + /** + * string updated_validation_yaml = 3 [json_name = "updatedValidationYaml"]; + * @return The updatedValidationYaml. + */ + java.lang.String getUpdatedValidationYaml(); + /** + * string updated_validation_yaml = 3 [json_name = "updatedValidationYaml"]; + * @return The bytes for updatedValidationYaml. + */ + com.google.protobuf.ByteString + getUpdatedValidationYamlBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.ValidateResponse} + */ + public static final class ValidateResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.ValidateResponse) + ValidateResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidateResponse.newBuilder() to construct. + private ValidateResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ValidateResponse() { + requestErrors_ = java.util.Collections.emptyList(); + validationErrors_ = java.util.Collections.emptyList(); + updatedValidationYaml_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ValidateResponse(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_ValidateResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ValidateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.ValidateResponse.class, com.authzed.api.v0.Developer.ValidateResponse.Builder.class); + } + + public static final int REQUEST_ERRORS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List requestErrors_; + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + @java.lang.Override + public java.util.List getRequestErrorsList() { + return requestErrors_; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + @java.lang.Override + public java.util.List + getRequestErrorsOrBuilderList() { + return requestErrors_; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + @java.lang.Override + public int getRequestErrorsCount() { + return requestErrors_.size(); + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError getRequestErrors(int index) { + return requestErrors_.get(index); + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getRequestErrorsOrBuilder( + int index) { + return requestErrors_.get(index); + } + + public static final int VALIDATION_ERRORS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List validationErrors_; + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + @java.lang.Override + public java.util.List getValidationErrorsList() { + return validationErrors_; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + @java.lang.Override + public java.util.List + getValidationErrorsOrBuilderList() { + return validationErrors_; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + @java.lang.Override + public int getValidationErrorsCount() { + return validationErrors_.size(); + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError getValidationErrors(int index) { + return validationErrors_.get(index); + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getValidationErrorsOrBuilder( + int index) { + return validationErrors_.get(index); + } + + public static final int UPDATED_VALIDATION_YAML_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object updatedValidationYaml_ = ""; + /** + * string updated_validation_yaml = 3 [json_name = "updatedValidationYaml"]; + * @return The updatedValidationYaml. + */ + @java.lang.Override + public java.lang.String getUpdatedValidationYaml() { + java.lang.Object ref = updatedValidationYaml_; + 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(); + updatedValidationYaml_ = s; + return s; + } + } + /** + * string updated_validation_yaml = 3 [json_name = "updatedValidationYaml"]; + * @return The bytes for updatedValidationYaml. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUpdatedValidationYamlBytes() { + java.lang.Object ref = updatedValidationYaml_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updatedValidationYaml_ = 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 { + for (int i = 0; i < requestErrors_.size(); i++) { + output.writeMessage(1, requestErrors_.get(i)); + } + for (int i = 0; i < validationErrors_.size(); i++) { + output.writeMessage(2, validationErrors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updatedValidationYaml_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, updatedValidationYaml_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requestErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requestErrors_.get(i)); + } + for (int i = 0; i < validationErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, validationErrors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updatedValidationYaml_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, updatedValidationYaml_); + } + 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.v0.Developer.ValidateResponse)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.ValidateResponse other = (com.authzed.api.v0.Developer.ValidateResponse) obj; + + if (!getRequestErrorsList() + .equals(other.getRequestErrorsList())) return false; + if (!getValidationErrorsList() + .equals(other.getValidationErrorsList())) return false; + if (!getUpdatedValidationYaml() + .equals(other.getUpdatedValidationYaml())) 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 (getRequestErrorsCount() > 0) { + hash = (37 * hash) + REQUEST_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getRequestErrorsList().hashCode(); + } + if (getValidationErrorsCount() > 0) { + hash = (37 * hash) + VALIDATION_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getValidationErrorsList().hashCode(); + } + hash = (37 * hash) + UPDATED_VALIDATION_YAML_FIELD_NUMBER; + hash = (53 * hash) + getUpdatedValidationYaml().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v0.Developer.ValidateResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ValidateResponse 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.v0.Developer.ValidateResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ValidateResponse 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.v0.Developer.ValidateResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.ValidateResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.ValidateResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ValidateResponse 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.v0.Developer.ValidateResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ValidateResponse 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.v0.Developer.ValidateResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.ValidateResponse 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.v0.Developer.ValidateResponse 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; + } + /** + * Protobuf type {@code authzed.api.v0.ValidateResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.ValidateResponse) + com.authzed.api.v0.Developer.ValidateResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ValidateResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ValidateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.ValidateResponse.class, com.authzed.api.v0.Developer.ValidateResponse.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.ValidateResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (requestErrorsBuilder_ == null) { + requestErrors_ = java.util.Collections.emptyList(); + } else { + requestErrors_ = null; + requestErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (validationErrorsBuilder_ == null) { + validationErrors_ = java.util.Collections.emptyList(); + } else { + validationErrors_ = null; + validationErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + updatedValidationYaml_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_ValidateResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ValidateResponse getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.ValidateResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ValidateResponse build() { + com.authzed.api.v0.Developer.ValidateResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.ValidateResponse buildPartial() { + com.authzed.api.v0.Developer.ValidateResponse result = new com.authzed.api.v0.Developer.ValidateResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v0.Developer.ValidateResponse result) { + if (requestErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requestErrors_ = java.util.Collections.unmodifiableList(requestErrors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requestErrors_ = requestErrors_; + } else { + result.requestErrors_ = requestErrorsBuilder_.build(); + } + if (validationErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + validationErrors_ = java.util.Collections.unmodifiableList(validationErrors_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.validationErrors_ = validationErrors_; + } else { + result.validationErrors_ = validationErrorsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v0.Developer.ValidateResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updatedValidationYaml_ = updatedValidationYaml_; + } + } + + @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.v0.Developer.ValidateResponse) { + return mergeFrom((com.authzed.api.v0.Developer.ValidateResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.ValidateResponse other) { + if (other == com.authzed.api.v0.Developer.ValidateResponse.getDefaultInstance()) return this; + if (requestErrorsBuilder_ == null) { + if (!other.requestErrors_.isEmpty()) { + if (requestErrors_.isEmpty()) { + requestErrors_ = other.requestErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestErrorsIsMutable(); + requestErrors_.addAll(other.requestErrors_); + } + onChanged(); + } + } else { + if (!other.requestErrors_.isEmpty()) { + if (requestErrorsBuilder_.isEmpty()) { + requestErrorsBuilder_.dispose(); + requestErrorsBuilder_ = null; + requestErrors_ = other.requestErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + requestErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestErrorsFieldBuilder() : null; + } else { + requestErrorsBuilder_.addAllMessages(other.requestErrors_); + } + } + } + if (validationErrorsBuilder_ == null) { + if (!other.validationErrors_.isEmpty()) { + if (validationErrors_.isEmpty()) { + validationErrors_ = other.validationErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureValidationErrorsIsMutable(); + validationErrors_.addAll(other.validationErrors_); + } + onChanged(); + } + } else { + if (!other.validationErrors_.isEmpty()) { + if (validationErrorsBuilder_.isEmpty()) { + validationErrorsBuilder_.dispose(); + validationErrorsBuilder_ = null; + validationErrors_ = other.validationErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + validationErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValidationErrorsFieldBuilder() : null; + } else { + validationErrorsBuilder_.addAllMessages(other.validationErrors_); + } + } + } + if (!other.getUpdatedValidationYaml().isEmpty()) { + updatedValidationYaml_ = other.updatedValidationYaml_; + bitField0_ |= 0x00000004; + 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: { + com.authzed.api.v0.Developer.DeveloperError m = + input.readMessage( + com.authzed.api.v0.Developer.DeveloperError.parser(), + extensionRegistry); + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + requestErrors_.add(m); + } else { + requestErrorsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.authzed.api.v0.Developer.DeveloperError m = + input.readMessage( + com.authzed.api.v0.Developer.DeveloperError.parser(), + extensionRegistry); + if (validationErrorsBuilder_ == null) { + ensureValidationErrorsIsMutable(); + validationErrors_.add(m); + } else { + validationErrorsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + updatedValidationYaml_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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 requestErrors_ = + java.util.Collections.emptyList(); + private void ensureRequestErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requestErrors_ = new java.util.ArrayList(requestErrors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> requestErrorsBuilder_; + + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public java.util.List getRequestErrorsList() { + if (requestErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requestErrors_); + } else { + return requestErrorsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public int getRequestErrorsCount() { + if (requestErrorsBuilder_ == null) { + return requestErrors_.size(); + } else { + return requestErrorsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError getRequestErrors(int index) { + if (requestErrorsBuilder_ == null) { + return requestErrors_.get(index); + } else { + return requestErrorsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder setRequestErrors( + int index, com.authzed.api.v0.Developer.DeveloperError value) { + if (requestErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestErrorsIsMutable(); + requestErrors_.set(index, value); + onChanged(); + } else { + requestErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder setRequestErrors( + int index, com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + requestErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + requestErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder addRequestErrors(com.authzed.api.v0.Developer.DeveloperError value) { + if (requestErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestErrorsIsMutable(); + requestErrors_.add(value); + onChanged(); + } else { + requestErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder addRequestErrors( + int index, com.authzed.api.v0.Developer.DeveloperError value) { + if (requestErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestErrorsIsMutable(); + requestErrors_.add(index, value); + onChanged(); + } else { + requestErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder addRequestErrors( + com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + requestErrors_.add(builderForValue.build()); + onChanged(); + } else { + requestErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder addRequestErrors( + int index, com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + requestErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + requestErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder addAllRequestErrors( + java.lang.Iterable values) { + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requestErrors_); + onChanged(); + } else { + requestErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder clearRequestErrors() { + if (requestErrorsBuilder_ == null) { + requestErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestErrorsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public Builder removeRequestErrors(int index) { + if (requestErrorsBuilder_ == null) { + ensureRequestErrorsIsMutable(); + requestErrors_.remove(index); + onChanged(); + } else { + requestErrorsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder getRequestErrorsBuilder( + int index) { + return getRequestErrorsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getRequestErrorsOrBuilder( + int index) { + if (requestErrorsBuilder_ == null) { + return requestErrors_.get(index); } else { + return requestErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public java.util.List + getRequestErrorsOrBuilderList() { + if (requestErrorsBuilder_ != null) { + return requestErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requestErrors_); + } + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder addRequestErrorsBuilder() { + return getRequestErrorsFieldBuilder().addBuilder( + com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder addRequestErrorsBuilder( + int index) { + return getRequestErrorsFieldBuilder().addBuilder( + index, com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"]; + */ + public java.util.List + getRequestErrorsBuilderList() { + return getRequestErrorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> + getRequestErrorsFieldBuilder() { + if (requestErrorsBuilder_ == null) { + requestErrorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder>( + requestErrors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requestErrors_ = null; + } + return requestErrorsBuilder_; + } + + private java.util.List validationErrors_ = + java.util.Collections.emptyList(); + private void ensureValidationErrorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + validationErrors_ = new java.util.ArrayList(validationErrors_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> validationErrorsBuilder_; + + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public java.util.List getValidationErrorsList() { + if (validationErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(validationErrors_); + } else { + return validationErrorsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public int getValidationErrorsCount() { + if (validationErrorsBuilder_ == null) { + return validationErrors_.size(); + } else { + return validationErrorsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError getValidationErrors(int index) { + if (validationErrorsBuilder_ == null) { + return validationErrors_.get(index); + } else { + return validationErrorsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public Builder setValidationErrors( + int index, com.authzed.api.v0.Developer.DeveloperError value) { + if (validationErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidationErrorsIsMutable(); + validationErrors_.set(index, value); + onChanged(); + } else { + validationErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public Builder setValidationErrors( + int index, com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (validationErrorsBuilder_ == null) { + ensureValidationErrorsIsMutable(); + validationErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + validationErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public Builder addValidationErrors(com.authzed.api.v0.Developer.DeveloperError value) { + if (validationErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidationErrorsIsMutable(); + validationErrors_.add(value); + onChanged(); + } else { + validationErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public Builder addValidationErrors( + int index, com.authzed.api.v0.Developer.DeveloperError value) { + if (validationErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidationErrorsIsMutable(); + validationErrors_.add(index, value); + onChanged(); + } else { + validationErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public Builder addValidationErrors( + com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (validationErrorsBuilder_ == null) { + ensureValidationErrorsIsMutable(); + validationErrors_.add(builderForValue.build()); + onChanged(); + } else { + validationErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public Builder addValidationErrors( + int index, com.authzed.api.v0.Developer.DeveloperError.Builder builderForValue) { + if (validationErrorsBuilder_ == null) { + ensureValidationErrorsIsMutable(); + validationErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + validationErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public Builder addAllValidationErrors( + java.lang.Iterable values) { + if (validationErrorsBuilder_ == null) { + ensureValidationErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, validationErrors_); + onChanged(); + } else { + validationErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public Builder clearValidationErrors() { + if (validationErrorsBuilder_ == null) { + validationErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + validationErrorsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public Builder removeValidationErrors(int index) { + if (validationErrorsBuilder_ == null) { + ensureValidationErrorsIsMutable(); + validationErrors_.remove(index); + onChanged(); + } else { + validationErrorsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder getValidationErrorsBuilder( + int index) { + return getValidationErrorsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperErrorOrBuilder getValidationErrorsOrBuilder( + int index) { + if (validationErrorsBuilder_ == null) { + return validationErrors_.get(index); } else { + return validationErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public java.util.List + getValidationErrorsOrBuilderList() { + if (validationErrorsBuilder_ != null) { + return validationErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(validationErrors_); + } + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder addValidationErrorsBuilder() { + return getValidationErrorsFieldBuilder().addBuilder( + com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public com.authzed.api.v0.Developer.DeveloperError.Builder addValidationErrorsBuilder( + int index) { + return getValidationErrorsFieldBuilder().addBuilder( + index, com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance()); + } + /** + * repeated .authzed.api.v0.DeveloperError validation_errors = 2 [json_name = "validationErrors"]; + */ + public java.util.List + getValidationErrorsBuilderList() { + return getValidationErrorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder> + getValidationErrorsFieldBuilder() { + if (validationErrorsBuilder_ == null) { + validationErrorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v0.Developer.DeveloperError, com.authzed.api.v0.Developer.DeveloperError.Builder, com.authzed.api.v0.Developer.DeveloperErrorOrBuilder>( + validationErrors_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + validationErrors_ = null; + } + return validationErrorsBuilder_; + } + + private java.lang.Object updatedValidationYaml_ = ""; + /** + * string updated_validation_yaml = 3 [json_name = "updatedValidationYaml"]; + * @return The updatedValidationYaml. + */ + public java.lang.String getUpdatedValidationYaml() { + java.lang.Object ref = updatedValidationYaml_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updatedValidationYaml_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string updated_validation_yaml = 3 [json_name = "updatedValidationYaml"]; + * @return The bytes for updatedValidationYaml. + */ + public com.google.protobuf.ByteString + getUpdatedValidationYamlBytes() { + java.lang.Object ref = updatedValidationYaml_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updatedValidationYaml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string updated_validation_yaml = 3 [json_name = "updatedValidationYaml"]; + * @param value The updatedValidationYaml to set. + * @return This builder for chaining. + */ + public Builder setUpdatedValidationYaml( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + updatedValidationYaml_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string updated_validation_yaml = 3 [json_name = "updatedValidationYaml"]; + * @return This builder for chaining. + */ + public Builder clearUpdatedValidationYaml() { + updatedValidationYaml_ = getDefaultInstance().getUpdatedValidationYaml(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string updated_validation_yaml = 3 [json_name = "updatedValidationYaml"]; + * @param value The bytes for updatedValidationYaml to set. + * @return This builder for chaining. + */ + public Builder setUpdatedValidationYamlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + updatedValidationYaml_ = value; + bitField0_ |= 0x00000004; + 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.v0.ValidateResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.ValidateResponse) + private static final com.authzed.api.v0.Developer.ValidateResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.ValidateResponse(); + } + + public static com.authzed.api.v0.Developer.ValidateResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidateResponse 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.v0.Developer.ValidateResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeveloperErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v0.DeveloperError) + com.google.protobuf.MessageOrBuilder { + + /** + * string message = 1 [json_name = "message"]; + * @return The message. + */ + java.lang.String getMessage(); + /** + * string message = 1 [json_name = "message"]; + * @return The bytes for message. + */ + com.google.protobuf.ByteString + getMessageBytes(); + + /** + * uint32 line = 2 [json_name = "line"]; + * @return The line. + */ + int getLine(); + + /** + * uint32 column = 3 [json_name = "column"]; + * @return The column. + */ + int getColumn(); + + /** + * .authzed.api.v0.DeveloperError.Source source = 4 [json_name = "source"]; + * @return The enum numeric value on the wire for source. + */ + int getSourceValue(); + /** + * .authzed.api.v0.DeveloperError.Source source = 4 [json_name = "source"]; + * @return The source. + */ + com.authzed.api.v0.Developer.DeveloperError.Source getSource(); + + /** + * .authzed.api.v0.DeveloperError.ErrorKind kind = 5 [json_name = "kind"]; + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + * .authzed.api.v0.DeveloperError.ErrorKind kind = 5 [json_name = "kind"]; + * @return The kind. + */ + com.authzed.api.v0.Developer.DeveloperError.ErrorKind getKind(); + + /** + * repeated string path = 6 [json_name = "path"]; + * @return A list containing the path. + */ + java.util.List + getPathList(); + /** + * repeated string path = 6 [json_name = "path"]; + * @return The count of path. + */ + int getPathCount(); + /** + * repeated string path = 6 [json_name = "path"]; + * @param index The index of the element to return. + * @return The path at the given index. + */ + java.lang.String getPath(int index); + /** + * repeated string path = 6 [json_name = "path"]; + * @param index The index of the value to return. + * @return The bytes of the path at the given index. + */ + com.google.protobuf.ByteString + getPathBytes(int index); + + /** + *
+     * context holds the context for the error. For schema issues, this will be the
+     * name of the object type. For relationship issues, the full relationship string.
+     * 
+ * + * string context = 7 [json_name = "context"]; + * @return The context. + */ + java.lang.String getContext(); + /** + *
+     * context holds the context for the error. For schema issues, this will be the
+     * name of the object type. For relationship issues, the full relationship string.
+     * 
+ * + * string context = 7 [json_name = "context"]; + * @return The bytes for context. + */ + com.google.protobuf.ByteString + getContextBytes(); + } + /** + * Protobuf type {@code authzed.api.v0.DeveloperError} + */ + public static final class DeveloperError extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v0.DeveloperError) + DeveloperErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeveloperError.newBuilder() to construct. + private DeveloperError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeveloperError() { + message_ = ""; + source_ = 0; + kind_ = 0; + path_ = com.google.protobuf.LazyStringArrayList.EMPTY; + context_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeveloperError(); + } + + @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.v0.Developer.internal_static_authzed_api_v0_DeveloperError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_DeveloperError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.DeveloperError.class, com.authzed.api.v0.Developer.DeveloperError.Builder.class); + } + + /** + * Protobuf enum {@code authzed.api.v0.DeveloperError.Source} + */ + public enum Source + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN_SOURCE = 0; + */ + UNKNOWN_SOURCE(0), + /** + * SCHEMA = 1; + */ + SCHEMA(1), + /** + * RELATIONSHIP = 2; + */ + RELATIONSHIP(2), + /** + * VALIDATION_YAML = 3; + */ + VALIDATION_YAML(3), + /** + * CHECK_WATCH = 4; + */ + CHECK_WATCH(4), + /** + * ASSERTION = 5; + */ + ASSERTION(5), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN_SOURCE = 0; + */ + public static final int UNKNOWN_SOURCE_VALUE = 0; + /** + * SCHEMA = 1; + */ + public static final int SCHEMA_VALUE = 1; + /** + * RELATIONSHIP = 2; + */ + public static final int RELATIONSHIP_VALUE = 2; + /** + * VALIDATION_YAML = 3; + */ + public static final int VALIDATION_YAML_VALUE = 3; + /** + * CHECK_WATCH = 4; + */ + public static final int CHECK_WATCH_VALUE = 4; + /** + * ASSERTION = 5; + */ + public static final int ASSERTION_VALUE = 5; + + + 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 Source 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 Source forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_SOURCE; + case 1: return SCHEMA; + case 2: return RELATIONSHIP; + case 3: return VALIDATION_YAML; + case 4: return CHECK_WATCH; + case 5: return ASSERTION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Source> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Source findValueByNumber(int number) { + return Source.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.v0.Developer.DeveloperError.getDescriptor().getEnumTypes().get(0); + } + + private static final Source[] VALUES = values(); + + public static Source 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 Source(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v0.DeveloperError.Source) + } + + /** + * Protobuf enum {@code authzed.api.v0.DeveloperError.ErrorKind} + */ + public enum ErrorKind + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN_KIND = 0; + */ + UNKNOWN_KIND(0), + /** + * PARSE_ERROR = 1; + */ + PARSE_ERROR(1), + /** + * SCHEMA_ISSUE = 2; + */ + SCHEMA_ISSUE(2), + /** + * DUPLICATE_RELATIONSHIP = 3; + */ + DUPLICATE_RELATIONSHIP(3), + /** + * MISSING_EXPECTED_RELATIONSHIP = 4; + */ + MISSING_EXPECTED_RELATIONSHIP(4), + /** + * EXTRA_RELATIONSHIP_FOUND = 5; + */ + EXTRA_RELATIONSHIP_FOUND(5), + /** + * UNKNOWN_OBJECT_TYPE = 6; + */ + UNKNOWN_OBJECT_TYPE(6), + /** + * UNKNOWN_RELATION = 7; + */ + UNKNOWN_RELATION(7), + /** + * MAXIMUM_RECURSION = 8; + */ + MAXIMUM_RECURSION(8), + /** + * ASSERTION_FAILED = 9; + */ + ASSERTION_FAILED(9), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN_KIND = 0; + */ + public static final int UNKNOWN_KIND_VALUE = 0; + /** + * PARSE_ERROR = 1; + */ + public static final int PARSE_ERROR_VALUE = 1; + /** + * SCHEMA_ISSUE = 2; + */ + public static final int SCHEMA_ISSUE_VALUE = 2; + /** + * DUPLICATE_RELATIONSHIP = 3; + */ + public static final int DUPLICATE_RELATIONSHIP_VALUE = 3; + /** + * MISSING_EXPECTED_RELATIONSHIP = 4; + */ + public static final int MISSING_EXPECTED_RELATIONSHIP_VALUE = 4; + /** + * EXTRA_RELATIONSHIP_FOUND = 5; + */ + public static final int EXTRA_RELATIONSHIP_FOUND_VALUE = 5; + /** + * UNKNOWN_OBJECT_TYPE = 6; + */ + public static final int UNKNOWN_OBJECT_TYPE_VALUE = 6; + /** + * UNKNOWN_RELATION = 7; + */ + public static final int UNKNOWN_RELATION_VALUE = 7; + /** + * MAXIMUM_RECURSION = 8; + */ + public static final int MAXIMUM_RECURSION_VALUE = 8; + /** + * ASSERTION_FAILED = 9; + */ + public static final int ASSERTION_FAILED_VALUE = 9; + + + 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 ErrorKind 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 ErrorKind forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_KIND; + case 1: return PARSE_ERROR; + case 2: return SCHEMA_ISSUE; + case 3: return DUPLICATE_RELATIONSHIP; + case 4: return MISSING_EXPECTED_RELATIONSHIP; + case 5: return EXTRA_RELATIONSHIP_FOUND; + case 6: return UNKNOWN_OBJECT_TYPE; + case 7: return UNKNOWN_RELATION; + case 8: return MAXIMUM_RECURSION; + case 9: return ASSERTION_FAILED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ErrorKind> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ErrorKind findValueByNumber(int number) { + return ErrorKind.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.v0.Developer.DeveloperError.getDescriptor().getEnumTypes().get(1); + } + + private static final ErrorKind[] VALUES = values(); + + public static ErrorKind 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 ErrorKind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v0.DeveloperError.ErrorKind) + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * string message = 1 [json_name = "message"]; + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + 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(); + message_ = s; + return s; + } + } + /** + * string message = 1 [json_name = "message"]; + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINE_FIELD_NUMBER = 2; + private int line_ = 0; + /** + * uint32 line = 2 [json_name = "line"]; + * @return The line. + */ + @java.lang.Override + public int getLine() { + return line_; + } + + public static final int COLUMN_FIELD_NUMBER = 3; + private int column_ = 0; + /** + * uint32 column = 3 [json_name = "column"]; + * @return The column. + */ + @java.lang.Override + public int getColumn() { + return column_; + } + + public static final int SOURCE_FIELD_NUMBER = 4; + private int source_ = 0; + /** + * .authzed.api.v0.DeveloperError.Source source = 4 [json_name = "source"]; + * @return The enum numeric value on the wire for source. + */ + @java.lang.Override public int getSourceValue() { + return source_; + } + /** + * .authzed.api.v0.DeveloperError.Source source = 4 [json_name = "source"]; + * @return The source. + */ + @java.lang.Override public com.authzed.api.v0.Developer.DeveloperError.Source getSource() { + com.authzed.api.v0.Developer.DeveloperError.Source result = com.authzed.api.v0.Developer.DeveloperError.Source.forNumber(source_); + return result == null ? com.authzed.api.v0.Developer.DeveloperError.Source.UNRECOGNIZED : result; + } + + public static final int KIND_FIELD_NUMBER = 5; + private int kind_ = 0; + /** + * .authzed.api.v0.DeveloperError.ErrorKind kind = 5 [json_name = "kind"]; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + * .authzed.api.v0.DeveloperError.ErrorKind kind = 5 [json_name = "kind"]; + * @return The kind. + */ + @java.lang.Override public com.authzed.api.v0.Developer.DeveloperError.ErrorKind getKind() { + com.authzed.api.v0.Developer.DeveloperError.ErrorKind result = com.authzed.api.v0.Developer.DeveloperError.ErrorKind.forNumber(kind_); + return result == null ? com.authzed.api.v0.Developer.DeveloperError.ErrorKind.UNRECOGNIZED : result; + } + + public static final int PATH_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList path_; + /** + * repeated string path = 6 [json_name = "path"]; + * @return A list containing the path. + */ + public com.google.protobuf.ProtocolStringList + getPathList() { + return path_; + } + /** + * repeated string path = 6 [json_name = "path"]; + * @return The count of path. + */ + public int getPathCount() { + return path_.size(); + } + /** + * repeated string path = 6 [json_name = "path"]; + * @param index The index of the element to return. + * @return The path at the given index. + */ + public java.lang.String getPath(int index) { + return path_.get(index); + } + /** + * repeated string path = 6 [json_name = "path"]; + * @param index The index of the value to return. + * @return The bytes of the path at the given index. + */ + public com.google.protobuf.ByteString + getPathBytes(int index) { + return path_.getByteString(index); + } + + public static final int CONTEXT_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object context_ = ""; + /** + *
+     * context holds the context for the error. For schema issues, this will be the
+     * name of the object type. For relationship issues, the full relationship string.
+     * 
+ * + * string context = 7 [json_name = "context"]; + * @return The context. + */ + @java.lang.Override + public java.lang.String getContext() { + java.lang.Object ref = context_; + 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(); + context_ = s; + return s; + } + } + /** + *
+     * context holds the context for the error. For schema issues, this will be the
+     * name of the object type. For relationship issues, the full relationship string.
+     * 
+ * + * string context = 7 [json_name = "context"]; + * @return The bytes for context. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContextBytes() { + java.lang.Object ref = context_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + context_ = 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(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); + } + if (line_ != 0) { + output.writeUInt32(2, line_); + } + if (column_ != 0) { + output.writeUInt32(3, column_); + } + if (source_ != com.authzed.api.v0.Developer.DeveloperError.Source.UNKNOWN_SOURCE.getNumber()) { + output.writeEnum(4, source_); + } + if (kind_ != com.authzed.api.v0.Developer.DeveloperError.ErrorKind.UNKNOWN_KIND.getNumber()) { + output.writeEnum(5, kind_); + } + for (int i = 0; i < path_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, path_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(context_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, context_); + } + 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(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); + } + if (line_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, line_); + } + if (column_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, column_); + } + if (source_ != com.authzed.api.v0.Developer.DeveloperError.Source.UNKNOWN_SOURCE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, source_); + } + if (kind_ != com.authzed.api.v0.Developer.DeveloperError.ErrorKind.UNKNOWN_KIND.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, kind_); + } + { + int dataSize = 0; + for (int i = 0; i < path_.size(); i++) { + dataSize += computeStringSizeNoTag(path_.getRaw(i)); + } + size += dataSize; + size += 1 * getPathList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(context_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, context_); + } + 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.v0.Developer.DeveloperError)) { + return super.equals(obj); + } + com.authzed.api.v0.Developer.DeveloperError other = (com.authzed.api.v0.Developer.DeveloperError) obj; + + if (!getMessage() + .equals(other.getMessage())) return false; + if (getLine() + != other.getLine()) return false; + if (getColumn() + != other.getColumn()) return false; + if (source_ != other.source_) return false; + if (kind_ != other.kind_) return false; + if (!getPathList() + .equals(other.getPathList())) return false; + 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) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (37 * hash) + LINE_FIELD_NUMBER; + hash = (53 * hash) + getLine(); + hash = (37 * hash) + COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getColumn(); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + source_; + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + if (getPathCount() > 0) { + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPathList().hashCode(); + } + 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.v0.Developer.DeveloperError parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.DeveloperError 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.v0.Developer.DeveloperError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.DeveloperError 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.v0.Developer.DeveloperError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v0.Developer.DeveloperError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v0.Developer.DeveloperError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.DeveloperError 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.v0.Developer.DeveloperError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.DeveloperError 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.v0.Developer.DeveloperError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v0.Developer.DeveloperError 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.v0.Developer.DeveloperError 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; + } + /** + * Protobuf type {@code authzed.api.v0.DeveloperError} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v0.DeveloperError) + com.authzed.api.v0.Developer.DeveloperErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_DeveloperError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_DeveloperError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v0.Developer.DeveloperError.class, com.authzed.api.v0.Developer.DeveloperError.Builder.class); + } + + // Construct using com.authzed.api.v0.Developer.DeveloperError.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + message_ = ""; + line_ = 0; + column_ = 0; + source_ = 0; + kind_ = 0; + path_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + context_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v0.Developer.internal_static_authzed_api_v0_DeveloperError_descriptor; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError getDefaultInstanceForType() { + return com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError build() { + com.authzed.api.v0.Developer.DeveloperError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError buildPartial() { + com.authzed.api.v0.Developer.DeveloperError result = new com.authzed.api.v0.Developer.DeveloperError(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v0.Developer.DeveloperError result) { + if (((bitField0_ & 0x00000020) != 0)) { + path_ = path_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.path_ = path_; + } + + private void buildPartial0(com.authzed.api.v0.Developer.DeveloperError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.message_ = message_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.line_ = line_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.column_ = column_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.source_ = source_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.context_ = context_; + } + } + + @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.v0.Developer.DeveloperError) { + return mergeFrom((com.authzed.api.v0.Developer.DeveloperError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v0.Developer.DeveloperError other) { + if (other == com.authzed.api.v0.Developer.DeveloperError.getDefaultInstance()) return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getLine() != 0) { + setLine(other.getLine()); + } + if (other.getColumn() != 0) { + setColumn(other.getColumn()); + } + if (other.source_ != 0) { + setSourceValue(other.getSourceValue()); + } + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (!other.path_.isEmpty()) { + if (path_.isEmpty()) { + path_ = other.path_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensurePathIsMutable(); + path_.addAll(other.path_); + } + onChanged(); + } + if (!other.getContext().isEmpty()) { + context_ = other.context_; + bitField0_ |= 0x00000040; + 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: { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + line_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + column_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + source_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + kind_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensurePathIsMutable(); + path_.add(s); + break; + } // case 50 + case 58: { + context_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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 message_ = ""; + /** + * string message = 1 [json_name = "message"]; + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string message = 1 [json_name = "message"]; + * @return The bytes for message. + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string message = 1 [json_name = "message"]; + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + message_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string message = 1 [json_name = "message"]; + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string message = 1 [json_name = "message"]; + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int line_ ; + /** + * uint32 line = 2 [json_name = "line"]; + * @return The line. + */ + @java.lang.Override + public int getLine() { + return line_; + } + /** + * uint32 line = 2 [json_name = "line"]; + * @param value The line to set. + * @return This builder for chaining. + */ + public Builder setLine(int value) { + + line_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 line = 2 [json_name = "line"]; + * @return This builder for chaining. + */ + public Builder clearLine() { + bitField0_ = (bitField0_ & ~0x00000002); + line_ = 0; + onChanged(); + return this; + } + + private int column_ ; + /** + * uint32 column = 3 [json_name = "column"]; + * @return The column. + */ + @java.lang.Override + public int getColumn() { + return column_; + } + /** + * uint32 column = 3 [json_name = "column"]; + * @param value The column to set. + * @return This builder for chaining. + */ + public Builder setColumn(int value) { + + column_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 column = 3 [json_name = "column"]; + * @return This builder for chaining. + */ + public Builder clearColumn() { + bitField0_ = (bitField0_ & ~0x00000004); + column_ = 0; + onChanged(); + return this; + } + + private int source_ = 0; + /** + * .authzed.api.v0.DeveloperError.Source source = 4 [json_name = "source"]; + * @return The enum numeric value on the wire for source. + */ + @java.lang.Override public int getSourceValue() { + return source_; + } + /** + * .authzed.api.v0.DeveloperError.Source source = 4 [json_name = "source"]; + * @param value The enum numeric value on the wire for source to set. + * @return This builder for chaining. + */ + public Builder setSourceValue(int value) { + source_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError.Source source = 4 [json_name = "source"]; + * @return The source. + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError.Source getSource() { + com.authzed.api.v0.Developer.DeveloperError.Source result = com.authzed.api.v0.Developer.DeveloperError.Source.forNumber(source_); + return result == null ? com.authzed.api.v0.Developer.DeveloperError.Source.UNRECOGNIZED : result; + } + /** + * .authzed.api.v0.DeveloperError.Source source = 4 [json_name = "source"]; + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(com.authzed.api.v0.Developer.DeveloperError.Source value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + source_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError.Source source = 4 [json_name = "source"]; + * @return This builder for chaining. + */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000008); + source_ = 0; + onChanged(); + return this; + } + + private int kind_ = 0; + /** + * .authzed.api.v0.DeveloperError.ErrorKind kind = 5 [json_name = "kind"]; + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override public int getKindValue() { + return kind_; + } + /** + * .authzed.api.v0.DeveloperError.ErrorKind kind = 5 [json_name = "kind"]; + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + kind_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError.ErrorKind kind = 5 [json_name = "kind"]; + * @return The kind. + */ + @java.lang.Override + public com.authzed.api.v0.Developer.DeveloperError.ErrorKind getKind() { + com.authzed.api.v0.Developer.DeveloperError.ErrorKind result = com.authzed.api.v0.Developer.DeveloperError.ErrorKind.forNumber(kind_); + return result == null ? com.authzed.api.v0.Developer.DeveloperError.ErrorKind.UNRECOGNIZED : result; + } + /** + * .authzed.api.v0.DeveloperError.ErrorKind kind = 5 [json_name = "kind"]; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(com.authzed.api.v0.Developer.DeveloperError.ErrorKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .authzed.api.v0.DeveloperError.ErrorKind kind = 5 [json_name = "kind"]; + * @return This builder for chaining. + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000010); + kind_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList path_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensurePathIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + path_ = new com.google.protobuf.LazyStringArrayList(path_); + bitField0_ |= 0x00000020; + } + } + /** + * repeated string path = 6 [json_name = "path"]; + * @return A list containing the path. + */ + public com.google.protobuf.ProtocolStringList + getPathList() { + return path_.getUnmodifiableView(); + } + /** + * repeated string path = 6 [json_name = "path"]; + * @return The count of path. + */ + public int getPathCount() { + return path_.size(); + } + /** + * repeated string path = 6 [json_name = "path"]; + * @param index The index of the element to return. + * @return The path at the given index. + */ + public java.lang.String getPath(int index) { + return path_.get(index); + } + /** + * repeated string path = 6 [json_name = "path"]; + * @param index The index of the value to return. + * @return The bytes of the path at the given index. + */ + public com.google.protobuf.ByteString + getPathBytes(int index) { + return path_.getByteString(index); + } + /** + * repeated string path = 6 [json_name = "path"]; + * @param index The index to set the value at. + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensurePathIsMutable(); + path_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string path = 6 [json_name = "path"]; + * @param value The path to add. + * @return This builder for chaining. + */ + public Builder addPath( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensurePathIsMutable(); + path_.add(value); + onChanged(); + return this; + } + /** + * repeated string path = 6 [json_name = "path"]; + * @param values The path to add. + * @return This builder for chaining. + */ + public Builder addAllPath( + java.lang.Iterable values) { + ensurePathIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, path_); + onChanged(); + return this; + } + /** + * repeated string path = 6 [json_name = "path"]; + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * repeated string path = 6 [json_name = "path"]; + * @param value The bytes of the path to add. + * @return This builder for chaining. + */ + public Builder addPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensurePathIsMutable(); + path_.add(value); + onChanged(); + return this; + } + + private java.lang.Object context_ = ""; + /** + *
+       * context holds the context for the error. For schema issues, this will be the
+       * name of the object type. For relationship issues, the full relationship string.
+       * 
+ * + * string context = 7 [json_name = "context"]; + * @return The context. + */ + public java.lang.String getContext() { + java.lang.Object ref = context_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + context_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * context holds the context for the error. For schema issues, this will be the
+       * name of the object type. For relationship issues, the full relationship string.
+       * 
+ * + * string context = 7 [json_name = "context"]; + * @return The bytes for context. + */ + public com.google.protobuf.ByteString + getContextBytes() { + java.lang.Object ref = context_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + context_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * context holds the context for the error. For schema issues, this will be the
+       * name of the object type. For relationship issues, the full relationship string.
+       * 
+ * + * string context = 7 [json_name = "context"]; + * @param value The context to set. + * @return This builder for chaining. + */ + public Builder setContext( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + context_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * context holds the context for the error. For schema issues, this will be the
+       * name of the object type. For relationship issues, the full relationship string.
+       * 
+ * + * string context = 7 [json_name = "context"]; + * @return This builder for chaining. + */ + public Builder clearContext() { + context_ = getDefaultInstance().getContext(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+       * context holds the context for the error. For schema issues, this will be the
+       * name of the object type. For relationship issues, the full relationship string.
+       * 
+ * + * string context = 7 [json_name = "context"]; + * @param value The bytes for context to set. + * @return This builder for chaining. + */ + public Builder setContextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + context_ = value; + bitField0_ |= 0x00000040; + 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.v0.DeveloperError) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v0.DeveloperError) + private static final com.authzed.api.v0.Developer.DeveloperError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v0.Developer.DeveloperError(); + } + + public static com.authzed.api.v0.Developer.DeveloperError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeveloperError 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.v0.Developer.DeveloperError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_FormatSchemaRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_FormatSchemaRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_FormatSchemaResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_FormatSchemaResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_UpgradeSchemaRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_UpgradeSchemaRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_UpgradeSchemaResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_UpgradeSchemaResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_ShareRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_ShareRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_ShareResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_ShareResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_LookupShareRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_LookupShareRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_LookupShareResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_LookupShareResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_RequestContext_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_RequestContext_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_EditCheckRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_EditCheckRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_EditCheckResult_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_EditCheckResult_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_EditCheckResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_EditCheckResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_ValidateRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_ValidateRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_ValidateResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_ValidateResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v0_DeveloperError_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v0_DeveloperError_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\036authzed/api/v0/developer.proto\022\016authze" + + "d.api.v0\032\031authzed/api/v0/core.proto\"-\n\023F" + + "ormatSchemaRequest\022\026\n\006schema\030\001 \001(\tR\006sche" + + "ma\"w\n\024FormatSchemaResponse\0224\n\005error\030\001 \001(" + + "\0132\036.authzed.api.v0.DeveloperErrorR\005error" + + "\022)\n\020formatted_schema\030\002 \001(\tR\017formattedSch" + + "ema\"C\n\024UpgradeSchemaRequest\022+\n\021namespace" + + "_configs\030\001 \003(\tR\020namespaceConfigs\"v\n\025Upgr" + + "adeSchemaResponse\0224\n\005error\030\001 \001(\0132\036.authz" + + "ed.api.v0.DeveloperErrorR\005error\022\'\n\017upgra" + + "ded_schema\030\002 \001(\tR\016upgradedSchema\"\247\001\n\014Sha" + + "reRequest\022\026\n\006schema\030\001 \001(\tR\006schema\022-\n\022rel" + + "ationships_yaml\030\002 \001(\tR\021relationshipsYaml" + + "\022\'\n\017validation_yaml\030\003 \001(\tR\016validationYam" + + "l\022\'\n\017assertions_yaml\030\004 \001(\tR\016assertionsYa" + + "ml\"8\n\rShareResponse\022\'\n\017share_reference\030\001" + + " \001(\tR\016shareReference\"=\n\022LookupShareReque" + + "st\022\'\n\017share_reference\030\001 \001(\tR\016shareRefere" + + "nce\"\342\002\n\023LookupShareResponse\022H\n\006status\030\001 " + + "\001(\01620.authzed.api.v0.LookupShareResponse" + + ".LookupStatusR\006status\022\026\n\006schema\030\002 \001(\tR\006s" + + "chema\022-\n\022relationships_yaml\030\003 \001(\tR\021relat" + + "ionshipsYaml\022\'\n\017validation_yaml\030\004 \001(\tR\016v" + + "alidationYaml\022\'\n\017assertions_yaml\030\005 \001(\tR\016" + + "assertionsYaml\"h\n\014LookupStatus\022\025\n\021UNKNOW" + + "N_REFERENCE\020\000\022\024\n\020FAILED_TO_LOOKUP\020\001\022\023\n\017V" + + "ALID_REFERENCE\020\002\022\026\n\022UPGRADED_REFERENCE\020\003" + + "\"s\n\016RequestContext\022\026\n\006schema\030\001 \001(\tR\006sche" + + "ma\022C\n\rrelationships\030\002 \003(\0132\035.authzed.api." + + "v0.RelationTupleR\rrelationshipsJ\004\010\003\020\004\"\234\001" + + "\n\020EditCheckRequest\0228\n\007context\030\001 \001(\0132\036.au" + + "thzed.api.v0.RequestContextR\007context\022N\n\023" + + "check_relationships\030\002 \003(\0132\035.authzed.api." + + "v0.RelationTupleR\022checkRelationships\"\247\001\n" + + "\017EditCheckResult\022A\n\014relationship\030\001 \001(\0132\035" + + ".authzed.api.v0.RelationTupleR\014relations" + + "hip\022\033\n\tis_member\030\002 \001(\010R\010isMember\0224\n\005erro" + + "r\030\003 \001(\0132\036.authzed.api.v0.DeveloperErrorR" + + "\005error\"\240\001\n\021EditCheckResponse\022E\n\016request_" + + "errors\030\001 \003(\0132\036.authzed.api.v0.DeveloperE" + + "rrorR\rrequestErrors\022D\n\rcheck_results\030\002 \003" + + "(\0132\037.authzed.api.v0.EditCheckResultR\014che" + + "ckResults\"\323\001\n\017ValidateRequest\0228\n\007context" + + "\030\001 \001(\0132\036.authzed.api.v0.RequestContextR\007" + + "context\022\'\n\017validation_yaml\030\003 \001(\tR\016valida" + + "tionYaml\0224\n\026update_validation_yaml\030\004 \001(\010" + + "R\024updateValidationYaml\022\'\n\017assertions_yam" + + "l\030\005 \001(\tR\016assertionsYaml\"\336\001\n\020ValidateResp" + + "onse\022E\n\016request_errors\030\001 \003(\0132\036.authzed.a" + + "pi.v0.DeveloperErrorR\rrequestErrors\022K\n\021v" + + "alidation_errors\030\002 \003(\0132\036.authzed.api.v0." + + "DeveloperErrorR\020validationErrors\0226\n\027upda" + + "ted_validation_yaml\030\003 \001(\tR\025updatedValida" + + "tionYaml\"\356\004\n\016DeveloperError\022\030\n\007message\030\001" + + " \001(\tR\007message\022\022\n\004line\030\002 \001(\rR\004line\022\026\n\006col" + + "umn\030\003 \001(\rR\006column\022=\n\006source\030\004 \001(\0162%.auth" + + "zed.api.v0.DeveloperError.SourceR\006source" + + "\022<\n\004kind\030\005 \001(\0162(.authzed.api.v0.Develope" + + "rError.ErrorKindR\004kind\022\022\n\004path\030\006 \003(\tR\004pa" + + "th\022\030\n\007context\030\007 \001(\tR\007context\"o\n\006Source\022\022" + + "\n\016UNKNOWN_SOURCE\020\000\022\n\n\006SCHEMA\020\001\022\020\n\014RELATI" + + "ONSHIP\020\002\022\023\n\017VALIDATION_YAML\020\003\022\017\n\013CHECK_W" + + "ATCH\020\004\022\r\n\tASSERTION\020\005\"\371\001\n\tErrorKind\022\020\n\014U" + + "NKNOWN_KIND\020\000\022\017\n\013PARSE_ERROR\020\001\022\020\n\014SCHEMA" + + "_ISSUE\020\002\022\032\n\026DUPLICATE_RELATIONSHIP\020\003\022!\n\035" + + "MISSING_EXPECTED_RELATIONSHIP\020\004\022\034\n\030EXTRA" + + "_RELATIONSHIP_FOUND\020\005\022\027\n\023UNKNOWN_OBJECT_" + + "TYPE\020\006\022\024\n\020UNKNOWN_RELATION\020\007\022\025\n\021MAXIMUM_" + + "RECURSION\020\010\022\024\n\020ASSERTION_FAILED\020\t2\227\004\n\020De" + + "veloperService\022R\n\tEditCheck\022 .authzed.ap" + + "i.v0.EditCheckRequest\032!.authzed.api.v0.E" + + "ditCheckResponse\"\000\022O\n\010Validate\022\037.authzed" + + ".api.v0.ValidateRequest\032 .authzed.api.v0" + + ".ValidateResponse\"\000\022F\n\005Share\022\034.authzed.a" + + "pi.v0.ShareRequest\032\035.authzed.api.v0.Shar" + + "eResponse\"\000\022Y\n\014LookupShared\022\".authzed.ap" + + "i.v0.LookupShareRequest\032#.authzed.api.v0" + + ".LookupShareResponse\"\000\022^\n\rUpgradeSchema\022" + + "$.authzed.api.v0.UpgradeSchemaRequest\032%." + + "authzed.api.v0.UpgradeSchemaResponse\"\000\022[" + + "\n\014FormatSchema\022#.authzed.api.v0.FormatSc" + + "hemaRequest\032$.authzed.api.v0.FormatSchem" + + "aResponse\"\000BH\n\022com.authzed.api.v0Z2githu" + + "b.com/authzed/authzed-go/proto/authzed/a" + + "pi/v0b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.authzed.api.v0.Core.getDescriptor(), + }); + internal_static_authzed_api_v0_FormatSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_v0_FormatSchemaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_FormatSchemaRequest_descriptor, + new java.lang.String[] { "Schema", }); + internal_static_authzed_api_v0_FormatSchemaResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_v0_FormatSchemaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_FormatSchemaResponse_descriptor, + new java.lang.String[] { "Error", "FormattedSchema", }); + internal_static_authzed_api_v0_UpgradeSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authzed_api_v0_UpgradeSchemaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_UpgradeSchemaRequest_descriptor, + new java.lang.String[] { "NamespaceConfigs", }); + internal_static_authzed_api_v0_UpgradeSchemaResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_authzed_api_v0_UpgradeSchemaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_UpgradeSchemaResponse_descriptor, + new java.lang.String[] { "Error", "UpgradedSchema", }); + internal_static_authzed_api_v0_ShareRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_authzed_api_v0_ShareRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_ShareRequest_descriptor, + new java.lang.String[] { "Schema", "RelationshipsYaml", "ValidationYaml", "AssertionsYaml", }); + internal_static_authzed_api_v0_ShareResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_authzed_api_v0_ShareResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_ShareResponse_descriptor, + new java.lang.String[] { "ShareReference", }); + internal_static_authzed_api_v0_LookupShareRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_authzed_api_v0_LookupShareRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_LookupShareRequest_descriptor, + new java.lang.String[] { "ShareReference", }); + internal_static_authzed_api_v0_LookupShareResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_authzed_api_v0_LookupShareResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_LookupShareResponse_descriptor, + new java.lang.String[] { "Status", "Schema", "RelationshipsYaml", "ValidationYaml", "AssertionsYaml", }); + internal_static_authzed_api_v0_RequestContext_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_authzed_api_v0_RequestContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_RequestContext_descriptor, + new java.lang.String[] { "Schema", "Relationships", }); + internal_static_authzed_api_v0_EditCheckRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_authzed_api_v0_EditCheckRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_EditCheckRequest_descriptor, + new java.lang.String[] { "Context", "CheckRelationships", }); + internal_static_authzed_api_v0_EditCheckResult_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_authzed_api_v0_EditCheckResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_EditCheckResult_descriptor, + new java.lang.String[] { "Relationship", "IsMember", "Error", }); + internal_static_authzed_api_v0_EditCheckResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_authzed_api_v0_EditCheckResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_EditCheckResponse_descriptor, + new java.lang.String[] { "RequestErrors", "CheckResults", }); + internal_static_authzed_api_v0_ValidateRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_authzed_api_v0_ValidateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_ValidateRequest_descriptor, + new java.lang.String[] { "Context", "ValidationYaml", "UpdateValidationYaml", "AssertionsYaml", }); + internal_static_authzed_api_v0_ValidateResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_authzed_api_v0_ValidateResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_ValidateResponse_descriptor, + new java.lang.String[] { "RequestErrors", "ValidationErrors", "UpdatedValidationYaml", }); + internal_static_authzed_api_v0_DeveloperError_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_authzed_api_v0_DeveloperError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v0_DeveloperError_descriptor, + new java.lang.String[] { "Message", "Line", "Column", "Source", "Kind", "Path", "Context", }); + com.authzed.api.v0.Core.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/v0/DeveloperServiceGrpc.java b/generated/com/authzed/api/v0/DeveloperServiceGrpc.java new file mode 100644 index 00000000..862d006e --- /dev/null +++ b/generated/com/authzed/api/v0/DeveloperServiceGrpc.java @@ -0,0 +1,663 @@ +package com.authzed.api.v0; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: authzed/api/v0/developer.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DeveloperServiceGrpc { + + private DeveloperServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "authzed.api.v0.DeveloperService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getEditCheckMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "EditCheck", + requestType = com.authzed.api.v0.Developer.EditCheckRequest.class, + responseType = com.authzed.api.v0.Developer.EditCheckResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getEditCheckMethod() { + io.grpc.MethodDescriptor getEditCheckMethod; + if ((getEditCheckMethod = DeveloperServiceGrpc.getEditCheckMethod) == null) { + synchronized (DeveloperServiceGrpc.class) { + if ((getEditCheckMethod = DeveloperServiceGrpc.getEditCheckMethod) == null) { + DeveloperServiceGrpc.getEditCheckMethod = getEditCheckMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "EditCheck")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.EditCheckRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.EditCheckResponse.getDefaultInstance())) + .setSchemaDescriptor(new DeveloperServiceMethodDescriptorSupplier("EditCheck")) + .build(); + } + } + } + return getEditCheckMethod; + } + + private static volatile io.grpc.MethodDescriptor getValidateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Validate", + requestType = com.authzed.api.v0.Developer.ValidateRequest.class, + responseType = com.authzed.api.v0.Developer.ValidateResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getValidateMethod() { + io.grpc.MethodDescriptor getValidateMethod; + if ((getValidateMethod = DeveloperServiceGrpc.getValidateMethod) == null) { + synchronized (DeveloperServiceGrpc.class) { + if ((getValidateMethod = DeveloperServiceGrpc.getValidateMethod) == null) { + DeveloperServiceGrpc.getValidateMethod = getValidateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Validate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.ValidateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.ValidateResponse.getDefaultInstance())) + .setSchemaDescriptor(new DeveloperServiceMethodDescriptorSupplier("Validate")) + .build(); + } + } + } + return getValidateMethod; + } + + private static volatile io.grpc.MethodDescriptor getShareMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Share", + requestType = com.authzed.api.v0.Developer.ShareRequest.class, + responseType = com.authzed.api.v0.Developer.ShareResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getShareMethod() { + io.grpc.MethodDescriptor getShareMethod; + if ((getShareMethod = DeveloperServiceGrpc.getShareMethod) == null) { + synchronized (DeveloperServiceGrpc.class) { + if ((getShareMethod = DeveloperServiceGrpc.getShareMethod) == null) { + DeveloperServiceGrpc.getShareMethod = getShareMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Share")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.ShareRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.ShareResponse.getDefaultInstance())) + .setSchemaDescriptor(new DeveloperServiceMethodDescriptorSupplier("Share")) + .build(); + } + } + } + return getShareMethod; + } + + private static volatile io.grpc.MethodDescriptor getLookupSharedMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LookupShared", + requestType = com.authzed.api.v0.Developer.LookupShareRequest.class, + responseType = com.authzed.api.v0.Developer.LookupShareResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLookupSharedMethod() { + io.grpc.MethodDescriptor getLookupSharedMethod; + if ((getLookupSharedMethod = DeveloperServiceGrpc.getLookupSharedMethod) == null) { + synchronized (DeveloperServiceGrpc.class) { + if ((getLookupSharedMethod = DeveloperServiceGrpc.getLookupSharedMethod) == null) { + DeveloperServiceGrpc.getLookupSharedMethod = getLookupSharedMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LookupShared")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.LookupShareRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.LookupShareResponse.getDefaultInstance())) + .setSchemaDescriptor(new DeveloperServiceMethodDescriptorSupplier("LookupShared")) + .build(); + } + } + } + return getLookupSharedMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpgradeSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpgradeSchema", + requestType = com.authzed.api.v0.Developer.UpgradeSchemaRequest.class, + responseType = com.authzed.api.v0.Developer.UpgradeSchemaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpgradeSchemaMethod() { + io.grpc.MethodDescriptor getUpgradeSchemaMethod; + if ((getUpgradeSchemaMethod = DeveloperServiceGrpc.getUpgradeSchemaMethod) == null) { + synchronized (DeveloperServiceGrpc.class) { + if ((getUpgradeSchemaMethod = DeveloperServiceGrpc.getUpgradeSchemaMethod) == null) { + DeveloperServiceGrpc.getUpgradeSchemaMethod = getUpgradeSchemaMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpgradeSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.UpgradeSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.UpgradeSchemaResponse.getDefaultInstance())) + .setSchemaDescriptor(new DeveloperServiceMethodDescriptorSupplier("UpgradeSchema")) + .build(); + } + } + } + return getUpgradeSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getFormatSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FormatSchema", + requestType = com.authzed.api.v0.Developer.FormatSchemaRequest.class, + responseType = com.authzed.api.v0.Developer.FormatSchemaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getFormatSchemaMethod() { + io.grpc.MethodDescriptor getFormatSchemaMethod; + if ((getFormatSchemaMethod = DeveloperServiceGrpc.getFormatSchemaMethod) == null) { + synchronized (DeveloperServiceGrpc.class) { + if ((getFormatSchemaMethod = DeveloperServiceGrpc.getFormatSchemaMethod) == null) { + DeveloperServiceGrpc.getFormatSchemaMethod = getFormatSchemaMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FormatSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.FormatSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v0.Developer.FormatSchemaResponse.getDefaultInstance())) + .setSchemaDescriptor(new DeveloperServiceMethodDescriptorSupplier("FormatSchema")) + .build(); + } + } + } + return getFormatSchemaMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static DeveloperServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeveloperServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeveloperServiceStub(channel, callOptions); + } + }; + return DeveloperServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DeveloperServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeveloperServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeveloperServiceBlockingStub(channel, callOptions); + } + }; + return DeveloperServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static DeveloperServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeveloperServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeveloperServiceFutureStub(channel, callOptions); + } + }; + return DeveloperServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public interface AsyncService { + + /** + */ + default void editCheck(com.authzed.api.v0.Developer.EditCheckRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getEditCheckMethod(), responseObserver); + } + + /** + */ + default void validate(com.authzed.api.v0.Developer.ValidateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getValidateMethod(), responseObserver); + } + + /** + */ + default void share(com.authzed.api.v0.Developer.ShareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getShareMethod(), responseObserver); + } + + /** + */ + default void lookupShared(com.authzed.api.v0.Developer.LookupShareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLookupSharedMethod(), responseObserver); + } + + /** + */ + default void upgradeSchema(com.authzed.api.v0.Developer.UpgradeSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpgradeSchemaMethod(), responseObserver); + } + + /** + */ + default void formatSchema(com.authzed.api.v0.Developer.FormatSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFormatSchemaMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DeveloperService. + */ + public static abstract class DeveloperServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return DeveloperServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DeveloperService. + */ + public static final class DeveloperServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DeveloperServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeveloperServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeveloperServiceStub(channel, callOptions); + } + + /** + */ + public void editCheck(com.authzed.api.v0.Developer.EditCheckRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getEditCheckMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void validate(com.authzed.api.v0.Developer.ValidateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getValidateMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void share(com.authzed.api.v0.Developer.ShareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getShareMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void lookupShared(com.authzed.api.v0.Developer.LookupShareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLookupSharedMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void upgradeSchema(com.authzed.api.v0.Developer.UpgradeSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpgradeSchemaMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void formatSchema(com.authzed.api.v0.Developer.FormatSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFormatSchemaMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DeveloperService. + */ + public static final class DeveloperServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DeveloperServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeveloperServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeveloperServiceBlockingStub(channel, callOptions); + } + + /** + */ + public com.authzed.api.v0.Developer.EditCheckResponse editCheck(com.authzed.api.v0.Developer.EditCheckRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getEditCheckMethod(), getCallOptions(), request); + } + + /** + */ + public com.authzed.api.v0.Developer.ValidateResponse validate(com.authzed.api.v0.Developer.ValidateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getValidateMethod(), getCallOptions(), request); + } + + /** + */ + public com.authzed.api.v0.Developer.ShareResponse share(com.authzed.api.v0.Developer.ShareRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getShareMethod(), getCallOptions(), request); + } + + /** + */ + public com.authzed.api.v0.Developer.LookupShareResponse lookupShared(com.authzed.api.v0.Developer.LookupShareRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLookupSharedMethod(), getCallOptions(), request); + } + + /** + */ + public com.authzed.api.v0.Developer.UpgradeSchemaResponse upgradeSchema(com.authzed.api.v0.Developer.UpgradeSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpgradeSchemaMethod(), getCallOptions(), request); + } + + /** + */ + public com.authzed.api.v0.Developer.FormatSchemaResponse formatSchema(com.authzed.api.v0.Developer.FormatSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFormatSchemaMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DeveloperService. + */ + public static final class DeveloperServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DeveloperServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeveloperServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeveloperServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture editCheck( + com.authzed.api.v0.Developer.EditCheckRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getEditCheckMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture validate( + com.authzed.api.v0.Developer.ValidateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getValidateMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture share( + com.authzed.api.v0.Developer.ShareRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getShareMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture lookupShared( + com.authzed.api.v0.Developer.LookupShareRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLookupSharedMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture upgradeSchema( + com.authzed.api.v0.Developer.UpgradeSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpgradeSchemaMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture formatSchema( + com.authzed.api.v0.Developer.FormatSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFormatSchemaMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_EDIT_CHECK = 0; + private static final int METHODID_VALIDATE = 1; + private static final int METHODID_SHARE = 2; + private static final int METHODID_LOOKUP_SHARED = 3; + private static final int METHODID_UPGRADE_SCHEMA = 4; + private static final int METHODID_FORMAT_SCHEMA = 5; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_EDIT_CHECK: + serviceImpl.editCheck((com.authzed.api.v0.Developer.EditCheckRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VALIDATE: + serviceImpl.validate((com.authzed.api.v0.Developer.ValidateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SHARE: + serviceImpl.share((com.authzed.api.v0.Developer.ShareRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LOOKUP_SHARED: + serviceImpl.lookupShared((com.authzed.api.v0.Developer.LookupShareRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPGRADE_SCHEMA: + serviceImpl.upgradeSchema((com.authzed.api.v0.Developer.UpgradeSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FORMAT_SCHEMA: + serviceImpl.formatSchema((com.authzed.api.v0.Developer.FormatSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getEditCheckMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v0.Developer.EditCheckRequest, + com.authzed.api.v0.Developer.EditCheckResponse>( + service, METHODID_EDIT_CHECK))) + .addMethod( + getValidateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v0.Developer.ValidateRequest, + com.authzed.api.v0.Developer.ValidateResponse>( + service, METHODID_VALIDATE))) + .addMethod( + getShareMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v0.Developer.ShareRequest, + com.authzed.api.v0.Developer.ShareResponse>( + service, METHODID_SHARE))) + .addMethod( + getLookupSharedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v0.Developer.LookupShareRequest, + com.authzed.api.v0.Developer.LookupShareResponse>( + service, METHODID_LOOKUP_SHARED))) + .addMethod( + getUpgradeSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v0.Developer.UpgradeSchemaRequest, + com.authzed.api.v0.Developer.UpgradeSchemaResponse>( + service, METHODID_UPGRADE_SCHEMA))) + .addMethod( + getFormatSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v0.Developer.FormatSchemaRequest, + com.authzed.api.v0.Developer.FormatSchemaResponse>( + service, METHODID_FORMAT_SCHEMA))) + .build(); + } + + private static abstract class DeveloperServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DeveloperServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.authzed.api.v0.Developer.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DeveloperService"); + } + } + + private static final class DeveloperServiceFileDescriptorSupplier + extends DeveloperServiceBaseDescriptorSupplier { + DeveloperServiceFileDescriptorSupplier() {} + } + + private static final class DeveloperServiceMethodDescriptorSupplier + extends DeveloperServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + DeveloperServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DeveloperServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DeveloperServiceFileDescriptorSupplier()) + .addMethod(getEditCheckMethod()) + .addMethod(getValidateMethod()) + .addMethod(getShareMethod()) + .addMethod(getLookupSharedMethod()) + .addMethod(getUpgradeSchemaMethod()) + .addMethod(getFormatSchemaMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/generated/com/authzed/api/v1/AlgebraicSubjectSet.java b/generated/com/authzed/api/v1/AlgebraicSubjectSet.java new file mode 100644 index 00000000..9793b853 --- /dev/null +++ b/generated/com/authzed/api/v1/AlgebraicSubjectSet.java @@ -0,0 +1,1002 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * 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 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.AlgebraicSubjectSet.class, com.authzed.api.v1.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.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 [json_name = "operation", (.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 [json_name = "operation", (.validate.rules) = { ... } + * @return The operation. + */ + @java.lang.Override public com.authzed.api.v1.AlgebraicSubjectSet.Operation getOperation() { + com.authzed.api.v1.AlgebraicSubjectSet.Operation result = com.authzed.api.v1.AlgebraicSubjectSet.Operation.forNumber(operation_); + return result == null ? com.authzed.api.v1.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 [json_name = "children", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List getChildrenList() { + return children_; + } + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List + getChildrenOrBuilderList() { + return children_; + } + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + @java.lang.Override + public int getChildrenCount() { + return children_.size(); + } + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.PermissionRelationshipTree getChildren(int index) { + return children_.get(index); + } + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.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.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.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.AlgebraicSubjectSet)) { + return super.equals(obj); + } + com.authzed.api.v1.AlgebraicSubjectSet other = (com.authzed.api.v1.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.AlgebraicSubjectSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.AlgebraicSubjectSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.AlgebraicSubjectSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.AlgebraicSubjectSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.AlgebraicSubjectSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.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.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.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.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.AlgebraicSubjectSet.class, com.authzed.api.v1.AlgebraicSubjectSet.Builder.class); + } + + // Construct using com.authzed.api.v1.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.AlgebraicSubjectSet getDefaultInstanceForType() { + return com.authzed.api.v1.AlgebraicSubjectSet.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.AlgebraicSubjectSet build() { + com.authzed.api.v1.AlgebraicSubjectSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.AlgebraicSubjectSet buildPartial() { + com.authzed.api.v1.AlgebraicSubjectSet result = new com.authzed.api.v1.AlgebraicSubjectSet(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.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.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.AlgebraicSubjectSet) { + return mergeFrom((com.authzed.api.v1.AlgebraicSubjectSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.AlgebraicSubjectSet other) { + if (other == com.authzed.api.v1.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.PermissionRelationshipTree m = + input.readMessage( + com.authzed.api.v1.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 [json_name = "operation", (.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 [json_name = "operation", (.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 [json_name = "operation", (.validate.rules) = { ... } + * @return The operation. + */ + @java.lang.Override + public com.authzed.api.v1.AlgebraicSubjectSet.Operation getOperation() { + com.authzed.api.v1.AlgebraicSubjectSet.Operation result = com.authzed.api.v1.AlgebraicSubjectSet.Operation.forNumber(operation_); + return result == null ? com.authzed.api.v1.AlgebraicSubjectSet.Operation.UNRECOGNIZED : result; + } + /** + * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation(com.authzed.api.v1.AlgebraicSubjectSet.Operation value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + operation_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [json_name = "operation", (.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.PermissionRelationshipTree, com.authzed.api.v1.PermissionRelationshipTree.Builder, com.authzed.api.v1.PermissionRelationshipTreeOrBuilder> childrenBuilder_; + + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.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 [json_name = "children", (.validate.rules) = { ... } + */ + public int getChildrenCount() { + if (childrenBuilder_ == null) { + return children_.size(); + } else { + return childrenBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PermissionRelationshipTree getChildren(int index) { + if (childrenBuilder_ == null) { + return children_.get(index); + } else { + return childrenBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + public Builder setChildren( + int index, com.authzed.api.v1.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 [json_name = "children", (.validate.rules) = { ... } + */ + public Builder setChildren( + int index, com.authzed.api.v1.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 [json_name = "children", (.validate.rules) = { ... } + */ + public Builder addChildren(com.authzed.api.v1.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 [json_name = "children", (.validate.rules) = { ... } + */ + public Builder addChildren( + int index, com.authzed.api.v1.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 [json_name = "children", (.validate.rules) = { ... } + */ + public Builder addChildren( + com.authzed.api.v1.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 [json_name = "children", (.validate.rules) = { ... } + */ + public Builder addChildren( + int index, com.authzed.api.v1.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 [json_name = "children", (.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 [json_name = "children", (.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 [json_name = "children", (.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 [json_name = "children", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PermissionRelationshipTree.Builder getChildrenBuilder( + int index) { + return getChildrenFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PermissionRelationshipTreeOrBuilder getChildrenOrBuilder( + int index) { + if (childrenBuilder_ == null) { + return children_.get(index); } else { + return childrenBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.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 [json_name = "children", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PermissionRelationshipTree.Builder addChildrenBuilder() { + return getChildrenFieldBuilder().addBuilder( + com.authzed.api.v1.PermissionRelationshipTree.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PermissionRelationshipTree.Builder addChildrenBuilder( + int index) { + return getChildrenFieldBuilder().addBuilder( + index, com.authzed.api.v1.PermissionRelationshipTree.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + public java.util.List + getChildrenBuilderList() { + return getChildrenFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.PermissionRelationshipTree, com.authzed.api.v1.PermissionRelationshipTree.Builder, com.authzed.api.v1.PermissionRelationshipTreeOrBuilder> + getChildrenFieldBuilder() { + if (childrenBuilder_ == null) { + childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.PermissionRelationshipTree, com.authzed.api.v1.PermissionRelationshipTree.Builder, com.authzed.api.v1.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.AlgebraicSubjectSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.AlgebraicSubjectSet(); + } + + public static com.authzed.api.v1.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.AlgebraicSubjectSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/AlgebraicSubjectSetOrBuilder.java b/generated/com/authzed/api/v1/AlgebraicSubjectSetOrBuilder.java new file mode 100644 index 00000000..21bb4651 --- /dev/null +++ b/generated/com/authzed/api/v1/AlgebraicSubjectSetOrBuilder.java @@ -0,0 +1,44 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +public interface AlgebraicSubjectSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.AlgebraicSubjectSet) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for operation. + */ + int getOperationValue(); + /** + * .authzed.api.v1.AlgebraicSubjectSet.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return The operation. + */ + com.authzed.api.v1.AlgebraicSubjectSet.Operation getOperation(); + + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + java.util.List + getChildrenList(); + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + com.authzed.api.v1.PermissionRelationshipTree getChildren(int index); + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + int getChildrenCount(); + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + java.util.List + getChildrenOrBuilderList(); + /** + * repeated .authzed.api.v1.PermissionRelationshipTree children = 2 [json_name = "children", (.validate.rules) = { ... } + */ + com.authzed.api.v1.PermissionRelationshipTreeOrBuilder getChildrenOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/BulkCheckPermissionPair.java b/generated/com/authzed/api/v1/BulkCheckPermissionPair.java new file mode 100644 index 00000000..800c25a3 --- /dev/null +++ b/generated/com/authzed/api/v1/BulkCheckPermissionPair.java @@ -0,0 +1,1079 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.BulkCheckPermissionPair} + */ +public final class BulkCheckPermissionPair extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.BulkCheckPermissionPair) + BulkCheckPermissionPairOrBuilder { +private static final long serialVersionUID = 0L; + // Use BulkCheckPermissionPair.newBuilder() to construct. + private BulkCheckPermissionPair(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BulkCheckPermissionPair() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BulkCheckPermissionPair(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionPair_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionPair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkCheckPermissionPair.class, com.authzed.api.v1.BulkCheckPermissionPair.Builder.class); + } + + private int responseCase_ = 0; + private java.lang.Object response_; + public enum ResponseCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ITEM(2), + ERROR(3), + RESPONSE_NOT_SET(0); + private final int value; + private ResponseCase(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 ResponseCase valueOf(int value) { + return forNumber(value); + } + + public static ResponseCase forNumber(int value) { + switch (value) { + case 2: return ITEM; + case 3: return ERROR; + case 0: return RESPONSE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public static final int REQUEST_FIELD_NUMBER = 1; + private com.authzed.api.v1.BulkCheckPermissionRequestItem request_; + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + * @return Whether the request field is set. + */ + @java.lang.Override + public boolean hasRequest() { + return request_ != null; + } + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + * @return The request. + */ + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionRequestItem getRequest() { + return request_ == null ? com.authzed.api.v1.BulkCheckPermissionRequestItem.getDefaultInstance() : request_; + } + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + */ + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder getRequestOrBuilder() { + return request_ == null ? com.authzed.api.v1.BulkCheckPermissionRequestItem.getDefaultInstance() : request_; + } + + public static final int ITEM_FIELD_NUMBER = 2; + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return responseCase_ == 2; + } + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + * @return The item. + */ + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionResponseItem getItem() { + if (responseCase_ == 2) { + return (com.authzed.api.v1.BulkCheckPermissionResponseItem) response_; + } + return com.authzed.api.v1.BulkCheckPermissionResponseItem.getDefaultInstance(); + } + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + */ + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionResponseItemOrBuilder getItemOrBuilder() { + if (responseCase_ == 2) { + return (com.authzed.api.v1.BulkCheckPermissionResponseItem) response_; + } + return com.authzed.api.v1.BulkCheckPermissionResponseItem.getDefaultInstance(); + } + + public static final int ERROR_FIELD_NUMBER = 3; + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return responseCase_ == 3; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + 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 (request_ != null) { + output.writeMessage(1, getRequest()); + } + if (responseCase_ == 2) { + output.writeMessage(2, (com.authzed.api.v1.BulkCheckPermissionResponseItem) response_); + } + if (responseCase_ == 3) { + output.writeMessage(3, (com.google.rpc.Status) response_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRequest()); + } + if (responseCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.authzed.api.v1.BulkCheckPermissionResponseItem) response_); + } + if (responseCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.rpc.Status) response_); + } + 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.BulkCheckPermissionPair)) { + return super.equals(obj); + } + com.authzed.api.v1.BulkCheckPermissionPair other = (com.authzed.api.v1.BulkCheckPermissionPair) obj; + + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest() + .equals(other.getRequest())) return false; + } + if (!getResponseCase().equals(other.getResponseCase())) return false; + switch (responseCase_) { + case 2: + if (!getItem() + .equals(other.getItem())) return false; + break; + case 3: + if (!getError() + .equals(other.getError())) 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 (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + switch (responseCase_) { + case 2: + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + break; + case 3: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.BulkCheckPermissionPair parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionPair 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.BulkCheckPermissionPair parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionPair 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.BulkCheckPermissionPair parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionPair parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.BulkCheckPermissionPair parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionPair 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.BulkCheckPermissionPair parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionPair 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.BulkCheckPermissionPair parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionPair 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.BulkCheckPermissionPair 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; + } + /** + * Protobuf type {@code authzed.api.v1.BulkCheckPermissionPair} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.BulkCheckPermissionPair) + com.authzed.api.v1.BulkCheckPermissionPairOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionPair_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionPair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkCheckPermissionPair.class, com.authzed.api.v1.BulkCheckPermissionPair.Builder.class); + } + + // Construct using com.authzed.api.v1.BulkCheckPermissionPair.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + request_ = null; + if (requestBuilder_ != null) { + requestBuilder_.dispose(); + requestBuilder_ = null; + } + if (itemBuilder_ != null) { + itemBuilder_.clear(); + } + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + responseCase_ = 0; + response_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionPair_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionPair getDefaultInstanceForType() { + return com.authzed.api.v1.BulkCheckPermissionPair.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionPair build() { + com.authzed.api.v1.BulkCheckPermissionPair result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionPair buildPartial() { + com.authzed.api.v1.BulkCheckPermissionPair result = new com.authzed.api.v1.BulkCheckPermissionPair(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.BulkCheckPermissionPair result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.request_ = requestBuilder_ == null + ? request_ + : requestBuilder_.build(); + } + } + + private void buildPartialOneofs(com.authzed.api.v1.BulkCheckPermissionPair result) { + result.responseCase_ = responseCase_; + result.response_ = this.response_; + if (responseCase_ == 2 && + itemBuilder_ != null) { + result.response_ = itemBuilder_.build(); + } + if (responseCase_ == 3 && + errorBuilder_ != null) { + result.response_ = errorBuilder_.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.BulkCheckPermissionPair) { + return mergeFrom((com.authzed.api.v1.BulkCheckPermissionPair)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.BulkCheckPermissionPair other) { + if (other == com.authzed.api.v1.BulkCheckPermissionPair.getDefaultInstance()) return this; + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + switch (other.getResponseCase()) { + case ITEM: { + mergeItem(other.getItem()); + break; + } + case ERROR: { + mergeError(other.getError()); + break; + } + case RESPONSE_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( + getRequestFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getItemFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getErrorFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 3; + break; + } // case 26 + 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 responseCase_ = 0; + private java.lang.Object response_; + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public Builder clearResponse() { + responseCase_ = 0; + response_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.authzed.api.v1.BulkCheckPermissionRequestItem request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionRequestItem, com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder, com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder> requestBuilder_; + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + * @return Whether the request field is set. + */ + public boolean hasRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + * @return The request. + */ + public com.authzed.api.v1.BulkCheckPermissionRequestItem getRequest() { + if (requestBuilder_ == null) { + return request_ == null ? com.authzed.api.v1.BulkCheckPermissionRequestItem.getDefaultInstance() : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + */ + public Builder setRequest(com.authzed.api.v1.BulkCheckPermissionRequestItem value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + } else { + requestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + */ + public Builder setRequest( + com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + */ + public Builder mergeRequest(com.authzed.api.v1.BulkCheckPermissionRequestItem value) { + if (requestBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + request_ != null && + request_ != com.authzed.api.v1.BulkCheckPermissionRequestItem.getDefaultInstance()) { + getRequestBuilder().mergeFrom(value); + } else { + request_ = value; + } + } else { + requestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + */ + public Builder clearRequest() { + bitField0_ = (bitField0_ & ~0x00000001); + request_ = null; + if (requestBuilder_ != null) { + requestBuilder_.dispose(); + requestBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + */ + public com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder getRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + */ + public com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null ? + com.authzed.api.v1.BulkCheckPermissionRequestItem.getDefaultInstance() : request_; + } + } + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionRequestItem, com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder, com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionRequestItem, com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder, com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder>( + getRequest(), + getParentForChildren(), + isClean()); + request_ = null; + } + return requestBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionResponseItem, com.authzed.api.v1.BulkCheckPermissionResponseItem.Builder, com.authzed.api.v1.BulkCheckPermissionResponseItemOrBuilder> itemBuilder_; + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return responseCase_ == 2; + } + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + * @return The item. + */ + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionResponseItem getItem() { + if (itemBuilder_ == null) { + if (responseCase_ == 2) { + return (com.authzed.api.v1.BulkCheckPermissionResponseItem) response_; + } + return com.authzed.api.v1.BulkCheckPermissionResponseItem.getDefaultInstance(); + } else { + if (responseCase_ == 2) { + return itemBuilder_.getMessage(); + } + return com.authzed.api.v1.BulkCheckPermissionResponseItem.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + */ + public Builder setItem(com.authzed.api.v1.BulkCheckPermissionResponseItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + itemBuilder_.setMessage(value); + } + responseCase_ = 2; + return this; + } + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + */ + public Builder setItem( + com.authzed.api.v1.BulkCheckPermissionResponseItem.Builder builderForValue) { + if (itemBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 2; + return this; + } + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + */ + public Builder mergeItem(com.authzed.api.v1.BulkCheckPermissionResponseItem value) { + if (itemBuilder_ == null) { + if (responseCase_ == 2 && + response_ != com.authzed.api.v1.BulkCheckPermissionResponseItem.getDefaultInstance()) { + response_ = com.authzed.api.v1.BulkCheckPermissionResponseItem.newBuilder((com.authzed.api.v1.BulkCheckPermissionResponseItem) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 2) { + itemBuilder_.mergeFrom(value); + } else { + itemBuilder_.setMessage(value); + } + } + responseCase_ = 2; + return this; + } + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + */ + public Builder clearItem() { + if (itemBuilder_ == null) { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + } + itemBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + */ + public com.authzed.api.v1.BulkCheckPermissionResponseItem.Builder getItemBuilder() { + return getItemFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + */ + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionResponseItemOrBuilder getItemOrBuilder() { + if ((responseCase_ == 2) && (itemBuilder_ != null)) { + return itemBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 2) { + return (com.authzed.api.v1.BulkCheckPermissionResponseItem) response_; + } + return com.authzed.api.v1.BulkCheckPermissionResponseItem.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionResponseItem, com.authzed.api.v1.BulkCheckPermissionResponseItem.Builder, com.authzed.api.v1.BulkCheckPermissionResponseItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + if (!(responseCase_ == 2)) { + response_ = com.authzed.api.v1.BulkCheckPermissionResponseItem.getDefaultInstance(); + } + itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionResponseItem, com.authzed.api.v1.BulkCheckPermissionResponseItem.Builder, com.authzed.api.v1.BulkCheckPermissionResponseItemOrBuilder>( + (com.authzed.api.v1.BulkCheckPermissionResponseItem) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 2; + onChanged(); + return itemBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return responseCase_ == 3; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } else { + if (responseCase_ == 3) { + return errorBuilder_.getMessage(); + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + responseCase_ = 3; + return this; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 3; + return this; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (responseCase_ == 3 && + response_ != com.google.rpc.Status.getDefaultInstance()) { + response_ = com.google.rpc.Status.newBuilder((com.google.rpc.Status) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 3) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + responseCase_ = 3; + return this; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if ((responseCase_ == 3) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(responseCase_ == 3)) { + response_ = com.google.rpc.Status.getDefaultInstance(); + } + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + (com.google.rpc.Status) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 3; + onChanged(); + return errorBuilder_; + } + @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.BulkCheckPermissionPair) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.BulkCheckPermissionPair) + private static final com.authzed.api.v1.BulkCheckPermissionPair DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.BulkCheckPermissionPair(); + } + + public static com.authzed.api.v1.BulkCheckPermissionPair getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkCheckPermissionPair 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.BulkCheckPermissionPair getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/BulkCheckPermissionPairOrBuilder.java b/generated/com/authzed/api/v1/BulkCheckPermissionPairOrBuilder.java new file mode 100644 index 00000000..d35050ef --- /dev/null +++ b/generated/com/authzed/api/v1/BulkCheckPermissionPairOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface BulkCheckPermissionPairOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.BulkCheckPermissionPair) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + * @return Whether the request field is set. + */ + boolean hasRequest(); + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + * @return The request. + */ + com.authzed.api.v1.BulkCheckPermissionRequestItem getRequest(); + /** + * .authzed.api.v1.BulkCheckPermissionRequestItem request = 1 [json_name = "request"]; + */ + com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder getRequestOrBuilder(); + + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + * @return The item. + */ + com.authzed.api.v1.BulkCheckPermissionResponseItem getItem(); + /** + * .authzed.api.v1.BulkCheckPermissionResponseItem item = 2 [json_name = "item"]; + */ + com.authzed.api.v1.BulkCheckPermissionResponseItemOrBuilder getItemOrBuilder(); + + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + public com.authzed.api.v1.BulkCheckPermissionPair.ResponseCase getResponseCase(); +} diff --git a/generated/com/authzed/api/v1/BulkCheckPermissionRequest.java b/generated/com/authzed/api/v1/BulkCheckPermissionRequest.java new file mode 100644 index 00000000..9af0d35e --- /dev/null +++ b/generated/com/authzed/api/v1/BulkCheckPermissionRequest.java @@ -0,0 +1,951 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * NOTE: Deprecated now that BulkCheckPermission has been promoted to the stable API as "CheckBulkPermission".
+ * 
+ * + * Protobuf type {@code authzed.api.v1.BulkCheckPermissionRequest} + */ +public final class BulkCheckPermissionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.BulkCheckPermissionRequest) + BulkCheckPermissionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BulkCheckPermissionRequest.newBuilder() to construct. + private BulkCheckPermissionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BulkCheckPermissionRequest() { + items_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BulkCheckPermissionRequest(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkCheckPermissionRequest.class, com.authzed.api.v1.BulkCheckPermissionRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int ITEMS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List items_; + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Override + @java.lang.Deprecated public java.util.List getItemsList() { + return items_; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Override + @java.lang.Deprecated public java.util.List + getItemsOrBuilderList() { + return items_; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Override + @java.lang.Deprecated public int getItemsCount() { + return items_.size(); + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Override + @java.lang.Deprecated public com.authzed.api.v1.BulkCheckPermissionRequestItem getItems(int index) { + return items_.get(index); + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Override + @java.lang.Deprecated public com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder getItemsOrBuilder( + int index) { + return items_.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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + for (int i = 0; i < items_.size(); i++) { + output.writeMessage(2, items_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + for (int i = 0; i < items_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, items_.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.BulkCheckPermissionRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.BulkCheckPermissionRequest other = (com.authzed.api.v1.BulkCheckPermissionRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (!getItemsList() + .equals(other.getItemsList())) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + if (getItemsCount() > 0) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getItemsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.BulkCheckPermissionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionRequest 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.BulkCheckPermissionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionRequest 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.BulkCheckPermissionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.BulkCheckPermissionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionRequest 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.BulkCheckPermissionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionRequest 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.BulkCheckPermissionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionRequest 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.BulkCheckPermissionRequest 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; + } + /** + *
+   * NOTE: Deprecated now that BulkCheckPermission has been promoted to the stable API as "CheckBulkPermission".
+   * 
+ * + * Protobuf type {@code authzed.api.v1.BulkCheckPermissionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.BulkCheckPermissionRequest) + com.authzed.api.v1.BulkCheckPermissionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkCheckPermissionRequest.class, com.authzed.api.v1.BulkCheckPermissionRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.BulkCheckPermissionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + } else { + items_ = null; + itemsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionRequest getDefaultInstanceForType() { + return com.authzed.api.v1.BulkCheckPermissionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionRequest build() { + com.authzed.api.v1.BulkCheckPermissionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionRequest buildPartial() { + com.authzed.api.v1.BulkCheckPermissionRequest result = new com.authzed.api.v1.BulkCheckPermissionRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.BulkCheckPermissionRequest result) { + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.items_ = items_; + } else { + result.items_ = itemsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.BulkCheckPermissionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.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.BulkCheckPermissionRequest) { + return mergeFrom((com.authzed.api.v1.BulkCheckPermissionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.BulkCheckPermissionRequest other) { + if (other == com.authzed.api.v1.BulkCheckPermissionRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (itemsBuilder_ == null) { + if (!other.items_.isEmpty()) { + if (items_.isEmpty()) { + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureItemsIsMutable(); + items_.addAll(other.items_); + } + onChanged(); + } + } else { + if (!other.items_.isEmpty()) { + if (itemsBuilder_.isEmpty()) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000002); + itemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getItemsFieldBuilder() : null; + } else { + itemsBuilder_.addAllMessages(other.items_); + } + } + } + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.authzed.api.v1.BulkCheckPermissionRequestItem m = + input.readMessage( + com.authzed.api.v1.BulkCheckPermissionRequestItem.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.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 com.authzed.api.v1.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private java.util.List items_ = + java.util.Collections.emptyList(); + private void ensureItemsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + items_ = new java.util.ArrayList(items_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionRequestItem, com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder, com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder> itemsBuilder_; + + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public java.util.List getItemsList() { + if (itemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(items_); + } else { + return itemsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public int getItemsCount() { + if (itemsBuilder_ == null) { + return items_.size(); + } else { + return itemsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public com.authzed.api.v1.BulkCheckPermissionRequestItem getItems(int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder setItems( + int index, com.authzed.api.v1.BulkCheckPermissionRequestItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.set(index, value); + onChanged(); + } else { + itemsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder setItems( + int index, com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.set(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder addItems(com.authzed.api.v1.BulkCheckPermissionRequestItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(value); + onChanged(); + } else { + itemsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder addItems( + int index, com.authzed.api.v1.BulkCheckPermissionRequestItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(index, value); + onChanged(); + } else { + itemsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder addItems( + com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder addItems( + int index, com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder addAllItems( + java.lang.Iterable values) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, items_); + onChanged(); + } else { + itemsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder clearItems() { + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + itemsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder removeItems(int index) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.remove(index); + onChanged(); + } else { + itemsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder getItemsBuilder( + int index) { + return getItemsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder getItemsOrBuilder( + int index) { + if (itemsBuilder_ == null) { + return items_.get(index); } else { + return itemsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public java.util.List + getItemsOrBuilderList() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(items_); + } + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder addItemsBuilder() { + return getItemsFieldBuilder().addBuilder( + com.authzed.api.v1.BulkCheckPermissionRequestItem.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder addItemsBuilder( + int index) { + return getItemsFieldBuilder().addBuilder( + index, com.authzed.api.v1.BulkCheckPermissionRequestItem.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public java.util.List + getItemsBuilderList() { + return getItemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionRequestItem, com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder, com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder> + getItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionRequestItem, com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder, com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder>( + items_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + items_ = null; + } + return itemsBuilder_; + } + @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.BulkCheckPermissionRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.BulkCheckPermissionRequest) + private static final com.authzed.api.v1.BulkCheckPermissionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.BulkCheckPermissionRequest(); + } + + public static com.authzed.api.v1.BulkCheckPermissionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkCheckPermissionRequest 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.BulkCheckPermissionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/BulkCheckPermissionRequestItem.java b/generated/com/authzed/api/v1/BulkCheckPermissionRequestItem.java new file mode 100644 index 00000000..0e297560 --- /dev/null +++ b/generated/com/authzed/api/v1/BulkCheckPermissionRequestItem.java @@ -0,0 +1,1087 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.BulkCheckPermissionRequestItem} + */ +public final class BulkCheckPermissionRequestItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.BulkCheckPermissionRequestItem) + BulkCheckPermissionRequestItemOrBuilder { +private static final long serialVersionUID = 0L; + // Use BulkCheckPermissionRequestItem.newBuilder() to construct. + private BulkCheckPermissionRequestItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BulkCheckPermissionRequestItem() { + permission_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BulkCheckPermissionRequestItem(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionRequestItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionRequestItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkCheckPermissionRequestItem.class, com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder.class); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private com.authzed.api.v1.ObjectReference resource_; + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getResource() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + + public static final int PERMISSION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object permission_ = ""; + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_FIELD_NUMBER = 3; + private com.authzed.api.v1.SubjectReference subject_; + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + @java.lang.Override + public boolean hasSubject() { + return subject_ != null; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReference getSubject() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + + public static final int CONTEXT_FIELD_NUMBER = 4; + private com.google.protobuf.Struct context_; + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + * @return The context. + */ + @java.lang.Override + public com.google.protobuf.Struct getContext() { + return context_ == null ? com.google.protobuf.Struct.getDefaultInstance() : context_; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.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 (resource_ != null) { + output.writeMessage(1, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permission_); + } + if (subject_ != null) { + output.writeMessage(3, getSubject()); + } + if (context_ != null) { + output.writeMessage(4, getContext()); + } + 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(permission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, permission_); + } + if (subject_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getSubject()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, 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.BulkCheckPermissionRequestItem)) { + return super.equals(obj); + } + com.authzed.api.v1.BulkCheckPermissionRequestItem other = (com.authzed.api.v1.BulkCheckPermissionRequestItem) obj; + + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (!getPermission() + .equals(other.getPermission())) return false; + if (hasSubject() != other.hasSubject()) return false; + if (hasSubject()) { + if (!getSubject() + .equals(other.getSubject())) 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(); + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + if (hasSubject()) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().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.BulkCheckPermissionRequestItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionRequestItem 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.BulkCheckPermissionRequestItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionRequestItem 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.BulkCheckPermissionRequestItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionRequestItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.BulkCheckPermissionRequestItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionRequestItem 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.BulkCheckPermissionRequestItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionRequestItem 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.BulkCheckPermissionRequestItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionRequestItem 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.BulkCheckPermissionRequestItem 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; + } + /** + * Protobuf type {@code authzed.api.v1.BulkCheckPermissionRequestItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.BulkCheckPermissionRequestItem) + com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionRequestItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionRequestItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkCheckPermissionRequestItem.class, com.authzed.api.v1.BulkCheckPermissionRequestItem.Builder.class); + } + + // Construct using com.authzed.api.v1.BulkCheckPermissionRequestItem.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; + } + permission_ = ""; + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + 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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionRequestItem_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionRequestItem getDefaultInstanceForType() { + return com.authzed.api.v1.BulkCheckPermissionRequestItem.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionRequestItem build() { + com.authzed.api.v1.BulkCheckPermissionRequestItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionRequestItem buildPartial() { + com.authzed.api.v1.BulkCheckPermissionRequestItem result = new com.authzed.api.v1.BulkCheckPermissionRequestItem(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.BulkCheckPermissionRequestItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resource_ = resourceBuilder_ == null + ? resource_ + : resourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.permission_ = permission_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subject_ = subjectBuilder_ == null + ? subject_ + : subjectBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 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.BulkCheckPermissionRequestItem) { + return mergeFrom((com.authzed.api.v1.BulkCheckPermissionRequestItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.BulkCheckPermissionRequestItem other) { + if (other == com.authzed.api.v1.BulkCheckPermissionRequestItem.getDefaultInstance()) return this; + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSubject()) { + mergeSubject(other.getSubject()); + } + 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: { + input.readMessage( + getResourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + permission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getSubjectFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getContextFieldBuilder().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.ObjectReference resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> resourceBuilder_; + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + public com.authzed.api.v1.ObjectReference getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + } else { + resourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource( + com.authzed.api.v1.ObjectReference.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder mergeResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + resource_ != null && + resource_ != com.authzed.api.v1.ObjectReference.getDefaultInstance()) { + getResourceBuilder().mergeFrom(value); + } else { + resource_ = value; + } + } else { + resourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder clearResource() { + bitField0_ = (bitField0_ & ~0x00000001); + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReference.Builder getResourceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private java.lang.Object permission_ = ""; + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermission() { + permission_ = getDefaultInstance().getPermission(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.authzed.api.v1.SubjectReference subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> subjectBuilder_; + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + public boolean hasSubject() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + public com.authzed.api.v1.SubjectReference getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } else { + return subjectBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subject_ = value; + } else { + subjectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject( + com.authzed.api.v1.SubjectReference.Builder builderForValue) { + if (subjectBuilder_ == null) { + subject_ = builderForValue.build(); + } else { + subjectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder mergeSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + subject_ != null && + subject_ != com.authzed.api.v1.SubjectReference.getDefaultInstance()) { + getSubjectBuilder().mergeFrom(value); + } else { + subject_ = value; + } + } else { + subjectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder clearSubject() { + bitField0_ = (bitField0_ & ~0x00000004); + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReference.Builder getSubjectBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubjectFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null ? + com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder>( + getSubject(), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + 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_; + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.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(); + } + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder setContext( + com.google.protobuf.Struct.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder mergeContext(com.google.protobuf.Struct value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + context_ != null && + context_ != com.google.protobuf.Struct.getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000008); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + public com.google.protobuf.Struct.Builder getContextBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + public com.google.protobuf.StructOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : context_; + } + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.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.BulkCheckPermissionRequestItem) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.BulkCheckPermissionRequestItem) + private static final com.authzed.api.v1.BulkCheckPermissionRequestItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.BulkCheckPermissionRequestItem(); + } + + public static com.authzed.api.v1.BulkCheckPermissionRequestItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkCheckPermissionRequestItem 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.BulkCheckPermissionRequestItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/BulkCheckPermissionRequestItemOrBuilder.java b/generated/com/authzed/api/v1/BulkCheckPermissionRequestItemOrBuilder.java new file mode 100644 index 00000000..b71e9957 --- /dev/null +++ b/generated/com/authzed/api/v1/BulkCheckPermissionRequestItemOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface BulkCheckPermissionRequestItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.BulkCheckPermissionRequestItem) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + com.authzed.api.v1.ObjectReference getResource(); + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder(); + + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + java.lang.String getPermission(); + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + boolean hasSubject(); + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + com.authzed.api.v1.SubjectReference getSubject(); + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder(); + + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + * @return The context. + */ + com.google.protobuf.Struct getContext(); + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + com.google.protobuf.StructOrBuilder getContextOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/BulkCheckPermissionRequestOrBuilder.java b/generated/com/authzed/api/v1/BulkCheckPermissionRequestOrBuilder.java new file mode 100644 index 00000000..588aa625 --- /dev/null +++ b/generated/com/authzed/api/v1/BulkCheckPermissionRequestOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface BulkCheckPermissionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.BulkCheckPermissionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated java.util.List + getItemsList(); + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated com.authzed.api.v1.BulkCheckPermissionRequestItem getItems(int index); + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated int getItemsCount(); + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated java.util.List + getItemsOrBuilderList(); + /** + * repeated .authzed.api.v1.BulkCheckPermissionRequestItem items = 2 [json_name = "items", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated com.authzed.api.v1.BulkCheckPermissionRequestItemOrBuilder getItemsOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/BulkCheckPermissionResponse.java b/generated/com/authzed/api/v1/BulkCheckPermissionResponse.java new file mode 100644 index 00000000..46cbbcce --- /dev/null +++ b/generated/com/authzed/api/v1/BulkCheckPermissionResponse.java @@ -0,0 +1,943 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.BulkCheckPermissionResponse} + */ +public final class BulkCheckPermissionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.BulkCheckPermissionResponse) + BulkCheckPermissionResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BulkCheckPermissionResponse.newBuilder() to construct. + private BulkCheckPermissionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BulkCheckPermissionResponse() { + pairs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BulkCheckPermissionResponse(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkCheckPermissionResponse.class, com.authzed.api.v1.BulkCheckPermissionResponse.Builder.class); + } + + public static final int CHECKED_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken checkedAt_; + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return Whether the checkedAt field is set. + */ + @java.lang.Override + public boolean hasCheckedAt() { + return checkedAt_ != null; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return The checkedAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getCheckedAt() { + return checkedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getCheckedAtOrBuilder() { + return checkedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } + + public static final int PAIRS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List pairs_; + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List getPairsList() { + return pairs_; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List + getPairsOrBuilderList() { + return pairs_; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + @java.lang.Override + public int getPairsCount() { + return pairs_.size(); + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionPair getPairs(int index) { + return pairs_.get(index); + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionPairOrBuilder getPairsOrBuilder( + int index) { + return pairs_.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 (checkedAt_ != null) { + output.writeMessage(1, getCheckedAt()); + } + for (int i = 0; i < pairs_.size(); i++) { + output.writeMessage(2, pairs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (checkedAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCheckedAt()); + } + for (int i = 0; i < pairs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, pairs_.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.BulkCheckPermissionResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.BulkCheckPermissionResponse other = (com.authzed.api.v1.BulkCheckPermissionResponse) obj; + + if (hasCheckedAt() != other.hasCheckedAt()) return false; + if (hasCheckedAt()) { + if (!getCheckedAt() + .equals(other.getCheckedAt())) return false; + } + if (!getPairsList() + .equals(other.getPairsList())) 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 (hasCheckedAt()) { + hash = (37 * hash) + CHECKED_AT_FIELD_NUMBER; + hash = (53 * hash) + getCheckedAt().hashCode(); + } + if (getPairsCount() > 0) { + hash = (37 * hash) + PAIRS_FIELD_NUMBER; + hash = (53 * hash) + getPairsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.BulkCheckPermissionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionResponse 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.BulkCheckPermissionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionResponse 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.BulkCheckPermissionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.BulkCheckPermissionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionResponse 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.BulkCheckPermissionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionResponse 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.BulkCheckPermissionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionResponse 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.BulkCheckPermissionResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.BulkCheckPermissionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.BulkCheckPermissionResponse) + com.authzed.api.v1.BulkCheckPermissionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkCheckPermissionResponse.class, com.authzed.api.v1.BulkCheckPermissionResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.BulkCheckPermissionResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + checkedAt_ = null; + if (checkedAtBuilder_ != null) { + checkedAtBuilder_.dispose(); + checkedAtBuilder_ = null; + } + if (pairsBuilder_ == null) { + pairs_ = java.util.Collections.emptyList(); + } else { + pairs_ = null; + pairsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionResponse getDefaultInstanceForType() { + return com.authzed.api.v1.BulkCheckPermissionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionResponse build() { + com.authzed.api.v1.BulkCheckPermissionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionResponse buildPartial() { + com.authzed.api.v1.BulkCheckPermissionResponse result = new com.authzed.api.v1.BulkCheckPermissionResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.BulkCheckPermissionResponse result) { + if (pairsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + pairs_ = java.util.Collections.unmodifiableList(pairs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.pairs_ = pairs_; + } else { + result.pairs_ = pairsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.BulkCheckPermissionResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.checkedAt_ = checkedAtBuilder_ == null + ? checkedAt_ + : checkedAtBuilder_.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.BulkCheckPermissionResponse) { + return mergeFrom((com.authzed.api.v1.BulkCheckPermissionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.BulkCheckPermissionResponse other) { + if (other == com.authzed.api.v1.BulkCheckPermissionResponse.getDefaultInstance()) return this; + if (other.hasCheckedAt()) { + mergeCheckedAt(other.getCheckedAt()); + } + if (pairsBuilder_ == null) { + if (!other.pairs_.isEmpty()) { + if (pairs_.isEmpty()) { + pairs_ = other.pairs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePairsIsMutable(); + pairs_.addAll(other.pairs_); + } + onChanged(); + } + } else { + if (!other.pairs_.isEmpty()) { + if (pairsBuilder_.isEmpty()) { + pairsBuilder_.dispose(); + pairsBuilder_ = null; + pairs_ = other.pairs_; + bitField0_ = (bitField0_ & ~0x00000002); + pairsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPairsFieldBuilder() : null; + } else { + pairsBuilder_.addAllMessages(other.pairs_); + } + } + } + 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( + getCheckedAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.authzed.api.v1.BulkCheckPermissionPair m = + input.readMessage( + com.authzed.api.v1.BulkCheckPermissionPair.parser(), + extensionRegistry); + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + pairs_.add(m); + } else { + pairsBuilder_.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 com.authzed.api.v1.ZedToken checkedAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> checkedAtBuilder_; + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return Whether the checkedAt field is set. + */ + public boolean hasCheckedAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return The checkedAt. + */ + public com.authzed.api.v1.ZedToken getCheckedAt() { + if (checkedAtBuilder_ == null) { + return checkedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } else { + return checkedAtBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder setCheckedAt(com.authzed.api.v1.ZedToken value) { + if (checkedAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + checkedAt_ = value; + } else { + checkedAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder setCheckedAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (checkedAtBuilder_ == null) { + checkedAt_ = builderForValue.build(); + } else { + checkedAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder mergeCheckedAt(com.authzed.api.v1.ZedToken value) { + if (checkedAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + checkedAt_ != null && + checkedAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getCheckedAtBuilder().mergeFrom(value); + } else { + checkedAt_ = value; + } + } else { + checkedAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder clearCheckedAt() { + bitField0_ = (bitField0_ & ~0x00000001); + checkedAt_ = null; + if (checkedAtBuilder_ != null) { + checkedAtBuilder_.dispose(); + checkedAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedToken.Builder getCheckedAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCheckedAtFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedTokenOrBuilder getCheckedAtOrBuilder() { + if (checkedAtBuilder_ != null) { + return checkedAtBuilder_.getMessageOrBuilder(); + } else { + return checkedAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getCheckedAtFieldBuilder() { + if (checkedAtBuilder_ == null) { + checkedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getCheckedAt(), + getParentForChildren(), + isClean()); + checkedAt_ = null; + } + return checkedAtBuilder_; + } + + private java.util.List pairs_ = + java.util.Collections.emptyList(); + private void ensurePairsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + pairs_ = new java.util.ArrayList(pairs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionPair, com.authzed.api.v1.BulkCheckPermissionPair.Builder, com.authzed.api.v1.BulkCheckPermissionPairOrBuilder> pairsBuilder_; + + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public java.util.List getPairsList() { + if (pairsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pairs_); + } else { + return pairsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public int getPairsCount() { + if (pairsBuilder_ == null) { + return pairs_.size(); + } else { + return pairsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.BulkCheckPermissionPair getPairs(int index) { + if (pairsBuilder_ == null) { + return pairs_.get(index); + } else { + return pairsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder setPairs( + int index, com.authzed.api.v1.BulkCheckPermissionPair value) { + if (pairsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePairsIsMutable(); + pairs_.set(index, value); + onChanged(); + } else { + pairsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder setPairs( + int index, com.authzed.api.v1.BulkCheckPermissionPair.Builder builderForValue) { + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + pairs_.set(index, builderForValue.build()); + onChanged(); + } else { + pairsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder addPairs(com.authzed.api.v1.BulkCheckPermissionPair value) { + if (pairsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePairsIsMutable(); + pairs_.add(value); + onChanged(); + } else { + pairsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder addPairs( + int index, com.authzed.api.v1.BulkCheckPermissionPair value) { + if (pairsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePairsIsMutable(); + pairs_.add(index, value); + onChanged(); + } else { + pairsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder addPairs( + com.authzed.api.v1.BulkCheckPermissionPair.Builder builderForValue) { + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + pairs_.add(builderForValue.build()); + onChanged(); + } else { + pairsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder addPairs( + int index, com.authzed.api.v1.BulkCheckPermissionPair.Builder builderForValue) { + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + pairs_.add(index, builderForValue.build()); + onChanged(); + } else { + pairsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder addAllPairs( + java.lang.Iterable values) { + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pairs_); + onChanged(); + } else { + pairsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder clearPairs() { + if (pairsBuilder_ == null) { + pairs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + pairsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder removePairs(int index) { + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + pairs_.remove(index); + onChanged(); + } else { + pairsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.BulkCheckPermissionPair.Builder getPairsBuilder( + int index) { + return getPairsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.BulkCheckPermissionPairOrBuilder getPairsOrBuilder( + int index) { + if (pairsBuilder_ == null) { + return pairs_.get(index); } else { + return pairsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public java.util.List + getPairsOrBuilderList() { + if (pairsBuilder_ != null) { + return pairsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pairs_); + } + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.BulkCheckPermissionPair.Builder addPairsBuilder() { + return getPairsFieldBuilder().addBuilder( + com.authzed.api.v1.BulkCheckPermissionPair.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.BulkCheckPermissionPair.Builder addPairsBuilder( + int index) { + return getPairsFieldBuilder().addBuilder( + index, com.authzed.api.v1.BulkCheckPermissionPair.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public java.util.List + getPairsBuilderList() { + return getPairsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionPair, com.authzed.api.v1.BulkCheckPermissionPair.Builder, com.authzed.api.v1.BulkCheckPermissionPairOrBuilder> + getPairsFieldBuilder() { + if (pairsBuilder_ == null) { + pairsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.BulkCheckPermissionPair, com.authzed.api.v1.BulkCheckPermissionPair.Builder, com.authzed.api.v1.BulkCheckPermissionPairOrBuilder>( + pairs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + pairs_ = null; + } + return pairsBuilder_; + } + @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.BulkCheckPermissionResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.BulkCheckPermissionResponse) + private static final com.authzed.api.v1.BulkCheckPermissionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.BulkCheckPermissionResponse(); + } + + public static com.authzed.api.v1.BulkCheckPermissionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkCheckPermissionResponse 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.BulkCheckPermissionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/BulkCheckPermissionResponseItem.java b/generated/com/authzed/api/v1/BulkCheckPermissionResponseItem.java new file mode 100644 index 00000000..c77f386e --- /dev/null +++ b/generated/com/authzed/api/v1/BulkCheckPermissionResponseItem.java @@ -0,0 +1,683 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.BulkCheckPermissionResponseItem} + */ +public final class BulkCheckPermissionResponseItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.BulkCheckPermissionResponseItem) + BulkCheckPermissionResponseItemOrBuilder { +private static final long serialVersionUID = 0L; + // Use BulkCheckPermissionResponseItem.newBuilder() to construct. + private BulkCheckPermissionResponseItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BulkCheckPermissionResponseItem() { + permissionship_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BulkCheckPermissionResponseItem(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionResponseItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionResponseItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkCheckPermissionResponseItem.class, com.authzed.api.v1.BulkCheckPermissionResponseItem.Builder.class); + } + + public static final int PERMISSIONSHIP_FIELD_NUMBER = 1; + private int permissionship_ = 0; + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + @java.lang.Override public com.authzed.api.v1.CheckPermissionResponse.Permissionship getPermissionship() { + com.authzed.api.v1.CheckPermissionResponse.Permissionship result = com.authzed.api.v1.CheckPermissionResponse.Permissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.CheckPermissionResponse.Permissionship.UNRECOGNIZED : result; + } + + public static final int PARTIAL_CAVEAT_INFO_FIELD_NUMBER = 2; + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + @java.lang.Override + public boolean hasPartialCaveatInfo() { + return partialCaveatInfo_ != null; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + + 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 (permissionship_ != com.authzed.api.v1.CheckPermissionResponse.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + output.writeEnum(1, permissionship_); + } + if (partialCaveatInfo_ != null) { + output.writeMessage(2, getPartialCaveatInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (permissionship_ != com.authzed.api.v1.CheckPermissionResponse.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, permissionship_); + } + if (partialCaveatInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPartialCaveatInfo()); + } + 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.BulkCheckPermissionResponseItem)) { + return super.equals(obj); + } + com.authzed.api.v1.BulkCheckPermissionResponseItem other = (com.authzed.api.v1.BulkCheckPermissionResponseItem) obj; + + if (permissionship_ != other.permissionship_) return false; + if (hasPartialCaveatInfo() != other.hasPartialCaveatInfo()) return false; + if (hasPartialCaveatInfo()) { + if (!getPartialCaveatInfo() + .equals(other.getPartialCaveatInfo())) 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) + PERMISSIONSHIP_FIELD_NUMBER; + hash = (53 * hash) + permissionship_; + if (hasPartialCaveatInfo()) { + hash = (37 * hash) + PARTIAL_CAVEAT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPartialCaveatInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.BulkCheckPermissionResponseItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionResponseItem 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.BulkCheckPermissionResponseItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionResponseItem 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.BulkCheckPermissionResponseItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkCheckPermissionResponseItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.BulkCheckPermissionResponseItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionResponseItem 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.BulkCheckPermissionResponseItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionResponseItem 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.BulkCheckPermissionResponseItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkCheckPermissionResponseItem 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.BulkCheckPermissionResponseItem 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; + } + /** + * Protobuf type {@code authzed.api.v1.BulkCheckPermissionResponseItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.BulkCheckPermissionResponseItem) + com.authzed.api.v1.BulkCheckPermissionResponseItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionResponseItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionResponseItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkCheckPermissionResponseItem.class, com.authzed.api.v1.BulkCheckPermissionResponseItem.Builder.class); + } + + // Construct using com.authzed.api.v1.BulkCheckPermissionResponseItem.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + permissionship_ = 0; + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkCheckPermissionResponseItem_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionResponseItem getDefaultInstanceForType() { + return com.authzed.api.v1.BulkCheckPermissionResponseItem.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionResponseItem build() { + com.authzed.api.v1.BulkCheckPermissionResponseItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.BulkCheckPermissionResponseItem buildPartial() { + com.authzed.api.v1.BulkCheckPermissionResponseItem result = new com.authzed.api.v1.BulkCheckPermissionResponseItem(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.BulkCheckPermissionResponseItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.permissionship_ = permissionship_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.partialCaveatInfo_ = partialCaveatInfoBuilder_ == null + ? partialCaveatInfo_ + : partialCaveatInfoBuilder_.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.BulkCheckPermissionResponseItem) { + return mergeFrom((com.authzed.api.v1.BulkCheckPermissionResponseItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.BulkCheckPermissionResponseItem other) { + if (other == com.authzed.api.v1.BulkCheckPermissionResponseItem.getDefaultInstance()) return this; + if (other.permissionship_ != 0) { + setPermissionshipValue(other.getPermissionshipValue()); + } + if (other.hasPartialCaveatInfo()) { + mergePartialCaveatInfo(other.getPartialCaveatInfo()); + } + 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: { + permissionship_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getPartialCaveatInfoFieldBuilder().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 permissionship_ = 0; + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @param value The enum numeric value on the wire for permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionshipValue(int value) { + permissionship_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + @java.lang.Override + public com.authzed.api.v1.CheckPermissionResponse.Permissionship getPermissionship() { + com.authzed.api.v1.CheckPermissionResponse.Permissionship result = com.authzed.api.v1.CheckPermissionResponse.Permissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.CheckPermissionResponse.Permissionship.UNRECOGNIZED : result; + } + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @param value The permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionship(com.authzed.api.v1.CheckPermissionResponse.Permissionship value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + permissionship_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermissionship() { + bitField0_ = (bitField0_ & ~0x00000001); + permissionship_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> partialCaveatInfoBuilder_; + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + public boolean hasPartialCaveatInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + if (partialCaveatInfoBuilder_ == null) { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } else { + return partialCaveatInfoBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder setPartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partialCaveatInfo_ = value; + } else { + partialCaveatInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder setPartialCaveatInfo( + com.authzed.api.v1.PartialCaveatInfo.Builder builderForValue) { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfo_ = builderForValue.build(); + } else { + partialCaveatInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder mergePartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + partialCaveatInfo_ != null && + partialCaveatInfo_ != com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance()) { + getPartialCaveatInfoBuilder().mergeFrom(value); + } else { + partialCaveatInfo_ = value; + } + } else { + partialCaveatInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder clearPartialCaveatInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PartialCaveatInfo.Builder getPartialCaveatInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPartialCaveatInfoFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + if (partialCaveatInfoBuilder_ != null) { + return partialCaveatInfoBuilder_.getMessageOrBuilder(); + } else { + return partialCaveatInfo_ == null ? + com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> + getPartialCaveatInfoFieldBuilder() { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder>( + getPartialCaveatInfo(), + getParentForChildren(), + isClean()); + partialCaveatInfo_ = null; + } + return partialCaveatInfoBuilder_; + } + @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.BulkCheckPermissionResponseItem) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.BulkCheckPermissionResponseItem) + private static final com.authzed.api.v1.BulkCheckPermissionResponseItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.BulkCheckPermissionResponseItem(); + } + + public static com.authzed.api.v1.BulkCheckPermissionResponseItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkCheckPermissionResponseItem 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.BulkCheckPermissionResponseItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/BulkCheckPermissionResponseItemOrBuilder.java b/generated/com/authzed/api/v1/BulkCheckPermissionResponseItemOrBuilder.java new file mode 100644 index 00000000..5e7e9ad9 --- /dev/null +++ b/generated/com/authzed/api/v1/BulkCheckPermissionResponseItemOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface BulkCheckPermissionResponseItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.BulkCheckPermissionResponseItem) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + int getPermissionshipValue(); + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + com.authzed.api.v1.CheckPermissionResponse.Permissionship getPermissionship(); + + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + boolean hasPartialCaveatInfo(); + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo(); + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/BulkCheckPermissionResponseOrBuilder.java b/generated/com/authzed/api/v1/BulkCheckPermissionResponseOrBuilder.java new file mode 100644 index 00000000..70a39a10 --- /dev/null +++ b/generated/com/authzed/api/v1/BulkCheckPermissionResponseOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface BulkCheckPermissionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.BulkCheckPermissionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return Whether the checkedAt field is set. + */ + boolean hasCheckedAt(); + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return The checkedAt. + */ + com.authzed.api.v1.ZedToken getCheckedAt(); + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ZedTokenOrBuilder getCheckedAtOrBuilder(); + + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + java.util.List + getPairsList(); + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + com.authzed.api.v1.BulkCheckPermissionPair getPairs(int index); + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + int getPairsCount(); + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + java.util.List + getPairsOrBuilderList(); + /** + * repeated .authzed.api.v1.BulkCheckPermissionPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + com.authzed.api.v1.BulkCheckPermissionPairOrBuilder getPairsOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/BulkExportRelationshipsRequest.java b/generated/com/authzed/api/v1/BulkExportRelationshipsRequest.java new file mode 100644 index 00000000..305c29ab --- /dev/null +++ b/generated/com/authzed/api/v1/BulkExportRelationshipsRequest.java @@ -0,0 +1,1187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * BulkExportRelationshipsRequest represents a resumable request for
+ * all relationships from the server.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.BulkExportRelationshipsRequest} + */ +public final class BulkExportRelationshipsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.BulkExportRelationshipsRequest) + BulkExportRelationshipsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BulkExportRelationshipsRequest.newBuilder() to construct. + private BulkExportRelationshipsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BulkExportRelationshipsRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BulkExportRelationshipsRequest(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkExportRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkExportRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkExportRelationshipsRequest.class, com.authzed.api.v1.BulkExportRelationshipsRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int OPTIONAL_LIMIT_FIELD_NUMBER = 2; + private int optionalLimit_ = 0; + /** + *
+   * optional_limit, if non-zero, specifies the limit on the number of
+   * relationships the server can return in one page. By default, the server
+   * will pick a page size, and the server is free to choose a smaller size
+   * at will.
+   * 
+ * + * uint32 optional_limit = 2 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + @java.lang.Override + public int getOptionalLimit() { + return optionalLimit_; + } + + public static final int OPTIONAL_CURSOR_FIELD_NUMBER = 3; + private com.authzed.api.v1.Cursor optionalCursor_; + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results
+   * should resume being returned. The cursor can be found on the
+   * BulkExportRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + @java.lang.Override + public boolean hasOptionalCursor() { + return optionalCursor_ != null; + } + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results
+   * should resume being returned. The cursor can be found on the
+   * BulkExportRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + @java.lang.Override + public com.authzed.api.v1.Cursor getOptionalCursor() { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results
+   * should resume being returned. The cursor can be found on the
+   * BulkExportRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + */ + @java.lang.Override + public com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder() { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + + public static final int OPTIONAL_RELATIONSHIP_FILTER_FIELD_NUMBER = 4; + private com.authzed.api.v1.RelationshipFilter optionalRelationshipFilter_; + /** + *
+   * optional_relationship_filter, if specified, indicates the
+   * filter to apply to each relationship to be exported.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + * @return Whether the optionalRelationshipFilter field is set. + */ + @java.lang.Override + public boolean hasOptionalRelationshipFilter() { + return optionalRelationshipFilter_ != null; + } + /** + *
+   * optional_relationship_filter, if specified, indicates the
+   * filter to apply to each relationship to be exported.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + * @return The optionalRelationshipFilter. + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilter getOptionalRelationshipFilter() { + return optionalRelationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : optionalRelationshipFilter_; + } + /** + *
+   * optional_relationship_filter, if specified, indicates the
+   * filter to apply to each relationship to be exported.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilterOrBuilder getOptionalRelationshipFilterOrBuilder() { + return optionalRelationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : optionalRelationshipFilter_; + } + + 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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + if (optionalLimit_ != 0) { + output.writeUInt32(2, optionalLimit_); + } + if (optionalCursor_ != null) { + output.writeMessage(3, getOptionalCursor()); + } + if (optionalRelationshipFilter_ != null) { + output.writeMessage(4, getOptionalRelationshipFilter()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + if (optionalLimit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, optionalLimit_); + } + if (optionalCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getOptionalCursor()); + } + if (optionalRelationshipFilter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOptionalRelationshipFilter()); + } + 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.BulkExportRelationshipsRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.BulkExportRelationshipsRequest other = (com.authzed.api.v1.BulkExportRelationshipsRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (getOptionalLimit() + != other.getOptionalLimit()) return false; + if (hasOptionalCursor() != other.hasOptionalCursor()) return false; + if (hasOptionalCursor()) { + if (!getOptionalCursor() + .equals(other.getOptionalCursor())) return false; + } + if (hasOptionalRelationshipFilter() != other.hasOptionalRelationshipFilter()) return false; + if (hasOptionalRelationshipFilter()) { + if (!getOptionalRelationshipFilter() + .equals(other.getOptionalRelationshipFilter())) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + hash = (37 * hash) + OPTIONAL_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getOptionalLimit(); + if (hasOptionalCursor()) { + hash = (37 * hash) + OPTIONAL_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getOptionalCursor().hashCode(); + } + if (hasOptionalRelationshipFilter()) { + hash = (37 * hash) + OPTIONAL_RELATIONSHIP_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getOptionalRelationshipFilter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.BulkExportRelationshipsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkExportRelationshipsRequest 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.BulkExportRelationshipsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkExportRelationshipsRequest 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.BulkExportRelationshipsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkExportRelationshipsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.BulkExportRelationshipsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkExportRelationshipsRequest 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.BulkExportRelationshipsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkExportRelationshipsRequest 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.BulkExportRelationshipsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkExportRelationshipsRequest 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.BulkExportRelationshipsRequest 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; + } + /** + *
+   * BulkExportRelationshipsRequest represents a resumable request for
+   * all relationships from the server.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.BulkExportRelationshipsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.BulkExportRelationshipsRequest) + com.authzed.api.v1.BulkExportRelationshipsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkExportRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkExportRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkExportRelationshipsRequest.class, com.authzed.api.v1.BulkExportRelationshipsRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.BulkExportRelationshipsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + optionalLimit_ = 0; + optionalCursor_ = null; + if (optionalCursorBuilder_ != null) { + optionalCursorBuilder_.dispose(); + optionalCursorBuilder_ = null; + } + optionalRelationshipFilter_ = null; + if (optionalRelationshipFilterBuilder_ != null) { + optionalRelationshipFilterBuilder_.dispose(); + optionalRelationshipFilterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkExportRelationshipsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.BulkExportRelationshipsRequest getDefaultInstanceForType() { + return com.authzed.api.v1.BulkExportRelationshipsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.BulkExportRelationshipsRequest build() { + com.authzed.api.v1.BulkExportRelationshipsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.BulkExportRelationshipsRequest buildPartial() { + com.authzed.api.v1.BulkExportRelationshipsRequest result = new com.authzed.api.v1.BulkExportRelationshipsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.BulkExportRelationshipsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optionalLimit_ = optionalLimit_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.optionalCursor_ = optionalCursorBuilder_ == null + ? optionalCursor_ + : optionalCursorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.optionalRelationshipFilter_ = optionalRelationshipFilterBuilder_ == null + ? optionalRelationshipFilter_ + : optionalRelationshipFilterBuilder_.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.BulkExportRelationshipsRequest) { + return mergeFrom((com.authzed.api.v1.BulkExportRelationshipsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.BulkExportRelationshipsRequest other) { + if (other == com.authzed.api.v1.BulkExportRelationshipsRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (other.getOptionalLimit() != 0) { + setOptionalLimit(other.getOptionalLimit()); + } + if (other.hasOptionalCursor()) { + mergeOptionalCursor(other.getOptionalCursor()); + } + if (other.hasOptionalRelationshipFilter()) { + mergeOptionalRelationshipFilter(other.getOptionalRelationshipFilter()); + } + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + optionalLimit_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getOptionalCursorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getOptionalRelationshipFilterFieldBuilder().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.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private int optionalLimit_ ; + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of
+     * relationships the server can return in one page. By default, the server
+     * will pick a page size, and the server is free to choose a smaller size
+     * at will.
+     * 
+ * + * uint32 optional_limit = 2 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + @java.lang.Override + public int getOptionalLimit() { + return optionalLimit_; + } + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of
+     * relationships the server can return in one page. By default, the server
+     * will pick a page size, and the server is free to choose a smaller size
+     * at will.
+     * 
+ * + * uint32 optional_limit = 2 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @param value The optionalLimit to set. + * @return This builder for chaining. + */ + public Builder setOptionalLimit(int value) { + + optionalLimit_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of
+     * relationships the server can return in one page. By default, the server
+     * will pick a page size, and the server is free to choose a smaller size
+     * at will.
+     * 
+ * + * uint32 optional_limit = 2 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + optionalLimit_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.Cursor optionalCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> optionalCursorBuilder_; + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results
+     * should resume being returned. The cursor can be found on the
+     * BulkExportRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + public boolean hasOptionalCursor() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results
+     * should resume being returned. The cursor can be found on the
+     * BulkExportRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + public com.authzed.api.v1.Cursor getOptionalCursor() { + if (optionalCursorBuilder_ == null) { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } else { + return optionalCursorBuilder_.getMessage(); + } + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results
+     * should resume being returned. The cursor can be found on the
+     * BulkExportRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + */ + public Builder setOptionalCursor(com.authzed.api.v1.Cursor value) { + if (optionalCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalCursor_ = value; + } else { + optionalCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results
+     * should resume being returned. The cursor can be found on the
+     * BulkExportRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + */ + public Builder setOptionalCursor( + com.authzed.api.v1.Cursor.Builder builderForValue) { + if (optionalCursorBuilder_ == null) { + optionalCursor_ = builderForValue.build(); + } else { + optionalCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results
+     * should resume being returned. The cursor can be found on the
+     * BulkExportRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + */ + public Builder mergeOptionalCursor(com.authzed.api.v1.Cursor value) { + if (optionalCursorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + optionalCursor_ != null && + optionalCursor_ != com.authzed.api.v1.Cursor.getDefaultInstance()) { + getOptionalCursorBuilder().mergeFrom(value); + } else { + optionalCursor_ = value; + } + } else { + optionalCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results
+     * should resume being returned. The cursor can be found on the
+     * BulkExportRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + */ + public Builder clearOptionalCursor() { + bitField0_ = (bitField0_ & ~0x00000004); + optionalCursor_ = null; + if (optionalCursorBuilder_ != null) { + optionalCursorBuilder_.dispose(); + optionalCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results
+     * should resume being returned. The cursor can be found on the
+     * BulkExportRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + */ + public com.authzed.api.v1.Cursor.Builder getOptionalCursorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOptionalCursorFieldBuilder().getBuilder(); + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results
+     * should resume being returned. The cursor can be found on the
+     * BulkExportRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + */ + public com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder() { + if (optionalCursorBuilder_ != null) { + return optionalCursorBuilder_.getMessageOrBuilder(); + } else { + return optionalCursor_ == null ? + com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results
+     * should resume being returned. The cursor can be found on the
+     * BulkExportRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> + getOptionalCursorFieldBuilder() { + if (optionalCursorBuilder_ == null) { + optionalCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder>( + getOptionalCursor(), + getParentForChildren(), + isClean()); + optionalCursor_ = null; + } + return optionalCursorBuilder_; + } + + private com.authzed.api.v1.RelationshipFilter optionalRelationshipFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> optionalRelationshipFilterBuilder_; + /** + *
+     * optional_relationship_filter, if specified, indicates the
+     * filter to apply to each relationship to be exported.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + * @return Whether the optionalRelationshipFilter field is set. + */ + public boolean hasOptionalRelationshipFilter() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * optional_relationship_filter, if specified, indicates the
+     * filter to apply to each relationship to be exported.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + * @return The optionalRelationshipFilter. + */ + public com.authzed.api.v1.RelationshipFilter getOptionalRelationshipFilter() { + if (optionalRelationshipFilterBuilder_ == null) { + return optionalRelationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : optionalRelationshipFilter_; + } else { + return optionalRelationshipFilterBuilder_.getMessage(); + } + } + /** + *
+     * optional_relationship_filter, if specified, indicates the
+     * filter to apply to each relationship to be exported.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + */ + public Builder setOptionalRelationshipFilter(com.authzed.api.v1.RelationshipFilter value) { + if (optionalRelationshipFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalRelationshipFilter_ = value; + } else { + optionalRelationshipFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * optional_relationship_filter, if specified, indicates the
+     * filter to apply to each relationship to be exported.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + */ + public Builder setOptionalRelationshipFilter( + com.authzed.api.v1.RelationshipFilter.Builder builderForValue) { + if (optionalRelationshipFilterBuilder_ == null) { + optionalRelationshipFilter_ = builderForValue.build(); + } else { + optionalRelationshipFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * optional_relationship_filter, if specified, indicates the
+     * filter to apply to each relationship to be exported.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + */ + public Builder mergeOptionalRelationshipFilter(com.authzed.api.v1.RelationshipFilter value) { + if (optionalRelationshipFilterBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + optionalRelationshipFilter_ != null && + optionalRelationshipFilter_ != com.authzed.api.v1.RelationshipFilter.getDefaultInstance()) { + getOptionalRelationshipFilterBuilder().mergeFrom(value); + } else { + optionalRelationshipFilter_ = value; + } + } else { + optionalRelationshipFilterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * optional_relationship_filter, if specified, indicates the
+     * filter to apply to each relationship to be exported.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + */ + public Builder clearOptionalRelationshipFilter() { + bitField0_ = (bitField0_ & ~0x00000008); + optionalRelationshipFilter_ = null; + if (optionalRelationshipFilterBuilder_ != null) { + optionalRelationshipFilterBuilder_.dispose(); + optionalRelationshipFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_relationship_filter, if specified, indicates the
+     * filter to apply to each relationship to be exported.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + */ + public com.authzed.api.v1.RelationshipFilter.Builder getOptionalRelationshipFilterBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getOptionalRelationshipFilterFieldBuilder().getBuilder(); + } + /** + *
+     * optional_relationship_filter, if specified, indicates the
+     * filter to apply to each relationship to be exported.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + */ + public com.authzed.api.v1.RelationshipFilterOrBuilder getOptionalRelationshipFilterOrBuilder() { + if (optionalRelationshipFilterBuilder_ != null) { + return optionalRelationshipFilterBuilder_.getMessageOrBuilder(); + } else { + return optionalRelationshipFilter_ == null ? + com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : optionalRelationshipFilter_; + } + } + /** + *
+     * optional_relationship_filter, if specified, indicates the
+     * filter to apply to each relationship to be exported.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> + getOptionalRelationshipFilterFieldBuilder() { + if (optionalRelationshipFilterBuilder_ == null) { + optionalRelationshipFilterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder>( + getOptionalRelationshipFilter(), + getParentForChildren(), + isClean()); + optionalRelationshipFilter_ = null; + } + return optionalRelationshipFilterBuilder_; + } + @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.BulkExportRelationshipsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.BulkExportRelationshipsRequest) + private static final com.authzed.api.v1.BulkExportRelationshipsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.BulkExportRelationshipsRequest(); + } + + public static com.authzed.api.v1.BulkExportRelationshipsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkExportRelationshipsRequest 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.BulkExportRelationshipsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/BulkExportRelationshipsRequestOrBuilder.java b/generated/com/authzed/api/v1/BulkExportRelationshipsRequestOrBuilder.java new file mode 100644 index 00000000..0c888121 --- /dev/null +++ b/generated/com/authzed/api/v1/BulkExportRelationshipsRequestOrBuilder.java @@ -0,0 +1,100 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface BulkExportRelationshipsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.BulkExportRelationshipsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + *
+   * optional_limit, if non-zero, specifies the limit on the number of
+   * relationships the server can return in one page. By default, the server
+   * will pick a page size, and the server is free to choose a smaller size
+   * at will.
+   * 
+ * + * uint32 optional_limit = 2 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + int getOptionalLimit(); + + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results
+   * should resume being returned. The cursor can be found on the
+   * BulkExportRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + boolean hasOptionalCursor(); + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results
+   * should resume being returned. The cursor can be found on the
+   * BulkExportRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + com.authzed.api.v1.Cursor getOptionalCursor(); + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results
+   * should resume being returned. The cursor can be found on the
+   * BulkExportRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 3 [json_name = "optionalCursor"]; + */ + com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder(); + + /** + *
+   * optional_relationship_filter, if specified, indicates the
+   * filter to apply to each relationship to be exported.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + * @return Whether the optionalRelationshipFilter field is set. + */ + boolean hasOptionalRelationshipFilter(); + /** + *
+   * optional_relationship_filter, if specified, indicates the
+   * filter to apply to each relationship to be exported.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + * @return The optionalRelationshipFilter. + */ + com.authzed.api.v1.RelationshipFilter getOptionalRelationshipFilter(); + /** + *
+   * optional_relationship_filter, if specified, indicates the
+   * filter to apply to each relationship to be exported.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter optional_relationship_filter = 4 [json_name = "optionalRelationshipFilter"]; + */ + com.authzed.api.v1.RelationshipFilterOrBuilder getOptionalRelationshipFilterOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/BulkExportRelationshipsResponse.java b/generated/com/authzed/api/v1/BulkExportRelationshipsResponse.java new file mode 100644 index 00000000..28ecd64d --- /dev/null +++ b/generated/com/authzed/api/v1/BulkExportRelationshipsResponse.java @@ -0,0 +1,957 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * BulkExportRelationshipsResponse is one page in a stream of relationship
+ * groups that meet the criteria specified by the originating request. The
+ * server will continue to stream back relationship groups as quickly as it can
+ * until all relationships have been transmitted back.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.BulkExportRelationshipsResponse} + */ +public final class BulkExportRelationshipsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.BulkExportRelationshipsResponse) + BulkExportRelationshipsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BulkExportRelationshipsResponse.newBuilder() to construct. + private BulkExportRelationshipsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BulkExportRelationshipsResponse() { + relationships_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BulkExportRelationshipsResponse(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkExportRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkExportRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkExportRelationshipsResponse.class, com.authzed.api.v1.BulkExportRelationshipsResponse.Builder.class); + } + + public static final int AFTER_RESULT_CURSOR_FIELD_NUMBER = 1; + private com.authzed.api.v1.Cursor afterResultCursor_; + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + @java.lang.Override + public boolean hasAfterResultCursor() { + return afterResultCursor_ != null; + } + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + @java.lang.Override + public com.authzed.api.v1.Cursor getAfterResultCursor() { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + */ + @java.lang.Override + public com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder() { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + + public static final int RELATIONSHIPS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List relationships_; + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + @java.lang.Override + public java.util.List getRelationshipsList() { + return relationships_; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + @java.lang.Override + public java.util.List + getRelationshipsOrBuilderList() { + return relationships_; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + @java.lang.Override + public int getRelationshipsCount() { + return relationships_.size(); + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + @java.lang.Override + public com.authzed.api.v1.Relationship getRelationships(int index) { + return relationships_.get(index); + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipOrBuilder getRelationshipsOrBuilder( + int index) { + return relationships_.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 (afterResultCursor_ != null) { + output.writeMessage(1, getAfterResultCursor()); + } + for (int i = 0; i < relationships_.size(); i++) { + output.writeMessage(2, relationships_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (afterResultCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAfterResultCursor()); + } + for (int i = 0; i < relationships_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, relationships_.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.BulkExportRelationshipsResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.BulkExportRelationshipsResponse other = (com.authzed.api.v1.BulkExportRelationshipsResponse) obj; + + if (hasAfterResultCursor() != other.hasAfterResultCursor()) return false; + if (hasAfterResultCursor()) { + if (!getAfterResultCursor() + .equals(other.getAfterResultCursor())) return false; + } + if (!getRelationshipsList() + .equals(other.getRelationshipsList())) 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 (hasAfterResultCursor()) { + hash = (37 * hash) + AFTER_RESULT_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getAfterResultCursor().hashCode(); + } + if (getRelationshipsCount() > 0) { + hash = (37 * hash) + RELATIONSHIPS_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.BulkExportRelationshipsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkExportRelationshipsResponse 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.BulkExportRelationshipsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkExportRelationshipsResponse 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.BulkExportRelationshipsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkExportRelationshipsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.BulkExportRelationshipsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkExportRelationshipsResponse 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.BulkExportRelationshipsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkExportRelationshipsResponse 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.BulkExportRelationshipsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkExportRelationshipsResponse 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.BulkExportRelationshipsResponse 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; + } + /** + *
+   * BulkExportRelationshipsResponse is one page in a stream of relationship
+   * groups that meet the criteria specified by the originating request. The
+   * server will continue to stream back relationship groups as quickly as it can
+   * until all relationships have been transmitted back.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.BulkExportRelationshipsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.BulkExportRelationshipsResponse) + com.authzed.api.v1.BulkExportRelationshipsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkExportRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkExportRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkExportRelationshipsResponse.class, com.authzed.api.v1.BulkExportRelationshipsResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.BulkExportRelationshipsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + afterResultCursor_ = null; + if (afterResultCursorBuilder_ != null) { + afterResultCursorBuilder_.dispose(); + afterResultCursorBuilder_ = null; + } + if (relationshipsBuilder_ == null) { + relationships_ = java.util.Collections.emptyList(); + } else { + relationships_ = null; + relationshipsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkExportRelationshipsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.BulkExportRelationshipsResponse getDefaultInstanceForType() { + return com.authzed.api.v1.BulkExportRelationshipsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.BulkExportRelationshipsResponse build() { + com.authzed.api.v1.BulkExportRelationshipsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.BulkExportRelationshipsResponse buildPartial() { + com.authzed.api.v1.BulkExportRelationshipsResponse result = new com.authzed.api.v1.BulkExportRelationshipsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.BulkExportRelationshipsResponse result) { + if (relationshipsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + relationships_ = java.util.Collections.unmodifiableList(relationships_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relationships_ = relationships_; + } else { + result.relationships_ = relationshipsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.BulkExportRelationshipsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.afterResultCursor_ = afterResultCursorBuilder_ == null + ? afterResultCursor_ + : afterResultCursorBuilder_.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.BulkExportRelationshipsResponse) { + return mergeFrom((com.authzed.api.v1.BulkExportRelationshipsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.BulkExportRelationshipsResponse other) { + if (other == com.authzed.api.v1.BulkExportRelationshipsResponse.getDefaultInstance()) return this; + if (other.hasAfterResultCursor()) { + mergeAfterResultCursor(other.getAfterResultCursor()); + } + if (relationshipsBuilder_ == null) { + if (!other.relationships_.isEmpty()) { + if (relationships_.isEmpty()) { + relationships_ = other.relationships_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelationshipsIsMutable(); + relationships_.addAll(other.relationships_); + } + onChanged(); + } + } else { + if (!other.relationships_.isEmpty()) { + if (relationshipsBuilder_.isEmpty()) { + relationshipsBuilder_.dispose(); + relationshipsBuilder_ = null; + relationships_ = other.relationships_; + bitField0_ = (bitField0_ & ~0x00000002); + relationshipsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelationshipsFieldBuilder() : null; + } else { + relationshipsBuilder_.addAllMessages(other.relationships_); + } + } + } + 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( + getAfterResultCursorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.authzed.api.v1.Relationship m = + input.readMessage( + com.authzed.api.v1.Relationship.parser(), + extensionRegistry); + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.add(m); + } else { + relationshipsBuilder_.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 com.authzed.api.v1.Cursor afterResultCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> afterResultCursorBuilder_; + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + public boolean hasAfterResultCursor() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + public com.authzed.api.v1.Cursor getAfterResultCursor() { + if (afterResultCursorBuilder_ == null) { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } else { + return afterResultCursorBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + */ + public Builder setAfterResultCursor(com.authzed.api.v1.Cursor value) { + if (afterResultCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + afterResultCursor_ = value; + } else { + afterResultCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + */ + public Builder setAfterResultCursor( + com.authzed.api.v1.Cursor.Builder builderForValue) { + if (afterResultCursorBuilder_ == null) { + afterResultCursor_ = builderForValue.build(); + } else { + afterResultCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + */ + public Builder mergeAfterResultCursor(com.authzed.api.v1.Cursor value) { + if (afterResultCursorBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + afterResultCursor_ != null && + afterResultCursor_ != com.authzed.api.v1.Cursor.getDefaultInstance()) { + getAfterResultCursorBuilder().mergeFrom(value); + } else { + afterResultCursor_ = value; + } + } else { + afterResultCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + */ + public Builder clearAfterResultCursor() { + bitField0_ = (bitField0_ & ~0x00000001); + afterResultCursor_ = null; + if (afterResultCursorBuilder_ != null) { + afterResultCursorBuilder_.dispose(); + afterResultCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + */ + public com.authzed.api.v1.Cursor.Builder getAfterResultCursorBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAfterResultCursorFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + */ + public com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder() { + if (afterResultCursorBuilder_ != null) { + return afterResultCursorBuilder_.getMessageOrBuilder(); + } else { + return afterResultCursor_ == null ? + com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + } + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> + getAfterResultCursorFieldBuilder() { + if (afterResultCursorBuilder_ == null) { + afterResultCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder>( + getAfterResultCursor(), + getParentForChildren(), + isClean()); + afterResultCursor_ = null; + } + return afterResultCursorBuilder_; + } + + private java.util.List relationships_ = + java.util.Collections.emptyList(); + private void ensureRelationshipsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relationships_ = new java.util.ArrayList(relationships_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder> relationshipsBuilder_; + + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public java.util.List getRelationshipsList() { + if (relationshipsBuilder_ == null) { + return java.util.Collections.unmodifiableList(relationships_); + } else { + return relationshipsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public int getRelationshipsCount() { + if (relationshipsBuilder_ == null) { + return relationships_.size(); + } else { + return relationshipsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public com.authzed.api.v1.Relationship getRelationships(int index) { + if (relationshipsBuilder_ == null) { + return relationships_.get(index); + } else { + return relationshipsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public Builder setRelationships( + int index, com.authzed.api.v1.Relationship value) { + if (relationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipsIsMutable(); + relationships_.set(index, value); + onChanged(); + } else { + relationshipsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public Builder setRelationships( + int index, com.authzed.api.v1.Relationship.Builder builderForValue) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.set(index, builderForValue.build()); + onChanged(); + } else { + relationshipsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public Builder addRelationships(com.authzed.api.v1.Relationship value) { + if (relationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipsIsMutable(); + relationships_.add(value); + onChanged(); + } else { + relationshipsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public Builder addRelationships( + int index, com.authzed.api.v1.Relationship value) { + if (relationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipsIsMutable(); + relationships_.add(index, value); + onChanged(); + } else { + relationshipsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public Builder addRelationships( + com.authzed.api.v1.Relationship.Builder builderForValue) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.add(builderForValue.build()); + onChanged(); + } else { + relationshipsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public Builder addRelationships( + int index, com.authzed.api.v1.Relationship.Builder builderForValue) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.add(index, builderForValue.build()); + onChanged(); + } else { + relationshipsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public Builder addAllRelationships( + java.lang.Iterable values) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relationships_); + onChanged(); + } else { + relationshipsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public Builder clearRelationships() { + if (relationshipsBuilder_ == null) { + relationships_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + relationshipsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public Builder removeRelationships(int index) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.remove(index); + onChanged(); + } else { + relationshipsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public com.authzed.api.v1.Relationship.Builder getRelationshipsBuilder( + int index) { + return getRelationshipsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public com.authzed.api.v1.RelationshipOrBuilder getRelationshipsOrBuilder( + int index) { + if (relationshipsBuilder_ == null) { + return relationships_.get(index); } else { + return relationshipsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public java.util.List + getRelationshipsOrBuilderList() { + if (relationshipsBuilder_ != null) { + return relationshipsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relationships_); + } + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public com.authzed.api.v1.Relationship.Builder addRelationshipsBuilder() { + return getRelationshipsFieldBuilder().addBuilder( + com.authzed.api.v1.Relationship.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public com.authzed.api.v1.Relationship.Builder addRelationshipsBuilder( + int index) { + return getRelationshipsFieldBuilder().addBuilder( + index, com.authzed.api.v1.Relationship.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + public java.util.List + getRelationshipsBuilderList() { + return getRelationshipsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder> + getRelationshipsFieldBuilder() { + if (relationshipsBuilder_ == null) { + relationshipsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder>( + relationships_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + relationships_ = null; + } + return relationshipsBuilder_; + } + @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.BulkExportRelationshipsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.BulkExportRelationshipsResponse) + private static final com.authzed.api.v1.BulkExportRelationshipsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.BulkExportRelationshipsResponse(); + } + + public static com.authzed.api.v1.BulkExportRelationshipsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkExportRelationshipsResponse 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.BulkExportRelationshipsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/BulkExportRelationshipsResponseOrBuilder.java b/generated/com/authzed/api/v1/BulkExportRelationshipsResponseOrBuilder.java new file mode 100644 index 00000000..36c6aa9c --- /dev/null +++ b/generated/com/authzed/api/v1/BulkExportRelationshipsResponseOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface BulkExportRelationshipsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.BulkExportRelationshipsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + boolean hasAfterResultCursor(); + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + com.authzed.api.v1.Cursor getAfterResultCursor(); + /** + * .authzed.api.v1.Cursor after_result_cursor = 1 [json_name = "afterResultCursor"]; + */ + com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder(); + + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + java.util.List + getRelationshipsList(); + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + com.authzed.api.v1.Relationship getRelationships(int index); + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + int getRelationshipsCount(); + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + java.util.List + getRelationshipsOrBuilderList(); + /** + * repeated .authzed.api.v1.Relationship relationships = 2 [json_name = "relationships"]; + */ + com.authzed.api.v1.RelationshipOrBuilder getRelationshipsOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/BulkImportRelationshipsRequest.java b/generated/com/authzed/api/v1/BulkImportRelationshipsRequest.java new file mode 100644 index 00000000..66cd8721 --- /dev/null +++ b/generated/com/authzed/api/v1/BulkImportRelationshipsRequest.java @@ -0,0 +1,776 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * BulkImportRelationshipsRequest represents one batch of the streaming
+ * BulkImportRelationships API. The maximum size is only limited by the backing
+ * datastore, and optimal size should be determined by the calling client
+ * experimentally.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.BulkImportRelationshipsRequest} + */ +public final class BulkImportRelationshipsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.BulkImportRelationshipsRequest) + BulkImportRelationshipsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BulkImportRelationshipsRequest.newBuilder() to construct. + private BulkImportRelationshipsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BulkImportRelationshipsRequest() { + relationships_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BulkImportRelationshipsRequest(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkImportRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkImportRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkImportRelationshipsRequest.class, com.authzed.api.v1.BulkImportRelationshipsRequest.Builder.class); + } + + public static final int RELATIONSHIPS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List relationships_; + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List getRelationshipsList() { + return relationships_; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List + getRelationshipsOrBuilderList() { + return relationships_; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + @java.lang.Override + public int getRelationshipsCount() { + return relationships_.size(); + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.Relationship getRelationships(int index) { + return relationships_.get(index); + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipOrBuilder getRelationshipsOrBuilder( + int index) { + return relationships_.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 < relationships_.size(); i++) { + output.writeMessage(1, relationships_.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 < relationships_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, relationships_.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.BulkImportRelationshipsRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.BulkImportRelationshipsRequest other = (com.authzed.api.v1.BulkImportRelationshipsRequest) obj; + + if (!getRelationshipsList() + .equals(other.getRelationshipsList())) 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 (getRelationshipsCount() > 0) { + hash = (37 * hash) + RELATIONSHIPS_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.BulkImportRelationshipsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkImportRelationshipsRequest 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.BulkImportRelationshipsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkImportRelationshipsRequest 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.BulkImportRelationshipsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkImportRelationshipsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.BulkImportRelationshipsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkImportRelationshipsRequest 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.BulkImportRelationshipsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkImportRelationshipsRequest 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.BulkImportRelationshipsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkImportRelationshipsRequest 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.BulkImportRelationshipsRequest 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; + } + /** + *
+   * BulkImportRelationshipsRequest represents one batch of the streaming
+   * BulkImportRelationships API. The maximum size is only limited by the backing
+   * datastore, and optimal size should be determined by the calling client
+   * experimentally.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.BulkImportRelationshipsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.BulkImportRelationshipsRequest) + com.authzed.api.v1.BulkImportRelationshipsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkImportRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkImportRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkImportRelationshipsRequest.class, com.authzed.api.v1.BulkImportRelationshipsRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.BulkImportRelationshipsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (relationshipsBuilder_ == null) { + relationships_ = java.util.Collections.emptyList(); + } else { + relationships_ = null; + relationshipsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkImportRelationshipsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.BulkImportRelationshipsRequest getDefaultInstanceForType() { + return com.authzed.api.v1.BulkImportRelationshipsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.BulkImportRelationshipsRequest build() { + com.authzed.api.v1.BulkImportRelationshipsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.BulkImportRelationshipsRequest buildPartial() { + com.authzed.api.v1.BulkImportRelationshipsRequest result = new com.authzed.api.v1.BulkImportRelationshipsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.BulkImportRelationshipsRequest result) { + if (relationshipsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + relationships_ = java.util.Collections.unmodifiableList(relationships_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.relationships_ = relationships_; + } else { + result.relationships_ = relationshipsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.BulkImportRelationshipsRequest 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.BulkImportRelationshipsRequest) { + return mergeFrom((com.authzed.api.v1.BulkImportRelationshipsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.BulkImportRelationshipsRequest other) { + if (other == com.authzed.api.v1.BulkImportRelationshipsRequest.getDefaultInstance()) return this; + if (relationshipsBuilder_ == null) { + if (!other.relationships_.isEmpty()) { + if (relationships_.isEmpty()) { + relationships_ = other.relationships_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRelationshipsIsMutable(); + relationships_.addAll(other.relationships_); + } + onChanged(); + } + } else { + if (!other.relationships_.isEmpty()) { + if (relationshipsBuilder_.isEmpty()) { + relationshipsBuilder_.dispose(); + relationshipsBuilder_ = null; + relationships_ = other.relationships_; + bitField0_ = (bitField0_ & ~0x00000001); + relationshipsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelationshipsFieldBuilder() : null; + } else { + relationshipsBuilder_.addAllMessages(other.relationships_); + } + } + } + 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.Relationship m = + input.readMessage( + com.authzed.api.v1.Relationship.parser(), + extensionRegistry); + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.add(m); + } else { + relationshipsBuilder_.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 relationships_ = + java.util.Collections.emptyList(); + private void ensureRelationshipsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + relationships_ = new java.util.ArrayList(relationships_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder> relationshipsBuilder_; + + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public java.util.List getRelationshipsList() { + if (relationshipsBuilder_ == null) { + return java.util.Collections.unmodifiableList(relationships_); + } else { + return relationshipsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public int getRelationshipsCount() { + if (relationshipsBuilder_ == null) { + return relationships_.size(); + } else { + return relationshipsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Relationship getRelationships(int index) { + if (relationshipsBuilder_ == null) { + return relationships_.get(index); + } else { + return relationshipsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public Builder setRelationships( + int index, com.authzed.api.v1.Relationship value) { + if (relationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipsIsMutable(); + relationships_.set(index, value); + onChanged(); + } else { + relationshipsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public Builder setRelationships( + int index, com.authzed.api.v1.Relationship.Builder builderForValue) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.set(index, builderForValue.build()); + onChanged(); + } else { + relationshipsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public Builder addRelationships(com.authzed.api.v1.Relationship value) { + if (relationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipsIsMutable(); + relationships_.add(value); + onChanged(); + } else { + relationshipsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public Builder addRelationships( + int index, com.authzed.api.v1.Relationship value) { + if (relationshipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipsIsMutable(); + relationships_.add(index, value); + onChanged(); + } else { + relationshipsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public Builder addRelationships( + com.authzed.api.v1.Relationship.Builder builderForValue) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.add(builderForValue.build()); + onChanged(); + } else { + relationshipsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public Builder addRelationships( + int index, com.authzed.api.v1.Relationship.Builder builderForValue) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.add(index, builderForValue.build()); + onChanged(); + } else { + relationshipsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public Builder addAllRelationships( + java.lang.Iterable values) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relationships_); + onChanged(); + } else { + relationshipsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public Builder clearRelationships() { + if (relationshipsBuilder_ == null) { + relationships_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + relationshipsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public Builder removeRelationships(int index) { + if (relationshipsBuilder_ == null) { + ensureRelationshipsIsMutable(); + relationships_.remove(index); + onChanged(); + } else { + relationshipsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Relationship.Builder getRelationshipsBuilder( + int index) { + return getRelationshipsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipOrBuilder getRelationshipsOrBuilder( + int index) { + if (relationshipsBuilder_ == null) { + return relationships_.get(index); } else { + return relationshipsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public java.util.List + getRelationshipsOrBuilderList() { + if (relationshipsBuilder_ != null) { + return relationshipsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relationships_); + } + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Relationship.Builder addRelationshipsBuilder() { + return getRelationshipsFieldBuilder().addBuilder( + com.authzed.api.v1.Relationship.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Relationship.Builder addRelationshipsBuilder( + int index) { + return getRelationshipsFieldBuilder().addBuilder( + index, com.authzed.api.v1.Relationship.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + public java.util.List + getRelationshipsBuilderList() { + return getRelationshipsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder> + getRelationshipsFieldBuilder() { + if (relationshipsBuilder_ == null) { + relationshipsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder>( + relationships_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + relationships_ = null; + } + return relationshipsBuilder_; + } + @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.BulkImportRelationshipsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.BulkImportRelationshipsRequest) + private static final com.authzed.api.v1.BulkImportRelationshipsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.BulkImportRelationshipsRequest(); + } + + public static com.authzed.api.v1.BulkImportRelationshipsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkImportRelationshipsRequest 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.BulkImportRelationshipsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/BulkImportRelationshipsRequestOrBuilder.java b/generated/com/authzed/api/v1/BulkImportRelationshipsRequestOrBuilder.java new file mode 100644 index 00000000..c42afae5 --- /dev/null +++ b/generated/com/authzed/api/v1/BulkImportRelationshipsRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface BulkImportRelationshipsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.BulkImportRelationshipsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + java.util.List + getRelationshipsList(); + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + com.authzed.api.v1.Relationship getRelationships(int index); + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + int getRelationshipsCount(); + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + java.util.List + getRelationshipsOrBuilderList(); + /** + * repeated .authzed.api.v1.Relationship relationships = 1 [json_name = "relationships", (.validate.rules) = { ... } + */ + com.authzed.api.v1.RelationshipOrBuilder getRelationshipsOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/BulkImportRelationshipsResponse.java b/generated/com/authzed/api/v1/BulkImportRelationshipsResponse.java new file mode 100644 index 00000000..0a57f091 --- /dev/null +++ b/generated/com/authzed/api/v1/BulkImportRelationshipsResponse.java @@ -0,0 +1,485 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * BulkImportRelationshipsResponse is returned on successful completion of the
+ * bulk load stream, and contains the total number of relationships loaded.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.BulkImportRelationshipsResponse} + */ +public final class BulkImportRelationshipsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.BulkImportRelationshipsResponse) + BulkImportRelationshipsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BulkImportRelationshipsResponse.newBuilder() to construct. + private BulkImportRelationshipsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BulkImportRelationshipsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BulkImportRelationshipsResponse(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkImportRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkImportRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkImportRelationshipsResponse.class, com.authzed.api.v1.BulkImportRelationshipsResponse.Builder.class); + } + + public static final int NUM_LOADED_FIELD_NUMBER = 1; + private long numLoaded_ = 0L; + /** + * uint64 num_loaded = 1 [json_name = "numLoaded"]; + * @return The numLoaded. + */ + @java.lang.Override + public long getNumLoaded() { + return numLoaded_; + } + + 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 (numLoaded_ != 0L) { + output.writeUInt64(1, numLoaded_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (numLoaded_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, numLoaded_); + } + 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.BulkImportRelationshipsResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.BulkImportRelationshipsResponse other = (com.authzed.api.v1.BulkImportRelationshipsResponse) obj; + + if (getNumLoaded() + != other.getNumLoaded()) 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) + NUM_LOADED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNumLoaded()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.BulkImportRelationshipsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkImportRelationshipsResponse 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.BulkImportRelationshipsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkImportRelationshipsResponse 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.BulkImportRelationshipsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.BulkImportRelationshipsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.BulkImportRelationshipsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkImportRelationshipsResponse 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.BulkImportRelationshipsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkImportRelationshipsResponse 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.BulkImportRelationshipsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.BulkImportRelationshipsResponse 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.BulkImportRelationshipsResponse 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; + } + /** + *
+   * BulkImportRelationshipsResponse is returned on successful completion of the
+   * bulk load stream, and contains the total number of relationships loaded.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.BulkImportRelationshipsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.BulkImportRelationshipsResponse) + com.authzed.api.v1.BulkImportRelationshipsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkImportRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkImportRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.BulkImportRelationshipsResponse.class, com.authzed.api.v1.BulkImportRelationshipsResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.BulkImportRelationshipsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + numLoaded_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_BulkImportRelationshipsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.BulkImportRelationshipsResponse getDefaultInstanceForType() { + return com.authzed.api.v1.BulkImportRelationshipsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.BulkImportRelationshipsResponse build() { + com.authzed.api.v1.BulkImportRelationshipsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.BulkImportRelationshipsResponse buildPartial() { + com.authzed.api.v1.BulkImportRelationshipsResponse result = new com.authzed.api.v1.BulkImportRelationshipsResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.BulkImportRelationshipsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.numLoaded_ = numLoaded_; + } + } + + @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.BulkImportRelationshipsResponse) { + return mergeFrom((com.authzed.api.v1.BulkImportRelationshipsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.BulkImportRelationshipsResponse other) { + if (other == com.authzed.api.v1.BulkImportRelationshipsResponse.getDefaultInstance()) return this; + if (other.getNumLoaded() != 0L) { + setNumLoaded(other.getNumLoaded()); + } + 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: { + numLoaded_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 long numLoaded_ ; + /** + * uint64 num_loaded = 1 [json_name = "numLoaded"]; + * @return The numLoaded. + */ + @java.lang.Override + public long getNumLoaded() { + return numLoaded_; + } + /** + * uint64 num_loaded = 1 [json_name = "numLoaded"]; + * @param value The numLoaded to set. + * @return This builder for chaining. + */ + public Builder setNumLoaded(long value) { + + numLoaded_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 num_loaded = 1 [json_name = "numLoaded"]; + * @return This builder for chaining. + */ + public Builder clearNumLoaded() { + bitField0_ = (bitField0_ & ~0x00000001); + numLoaded_ = 0L; + 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.BulkImportRelationshipsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.BulkImportRelationshipsResponse) + private static final com.authzed.api.v1.BulkImportRelationshipsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.BulkImportRelationshipsResponse(); + } + + public static com.authzed.api.v1.BulkImportRelationshipsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkImportRelationshipsResponse 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.BulkImportRelationshipsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/BulkImportRelationshipsResponseOrBuilder.java b/generated/com/authzed/api/v1/BulkImportRelationshipsResponseOrBuilder.java new file mode 100644 index 00000000..199a331e --- /dev/null +++ b/generated/com/authzed/api/v1/BulkImportRelationshipsResponseOrBuilder.java @@ -0,0 +1,15 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface BulkImportRelationshipsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.BulkImportRelationshipsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 num_loaded = 1 [json_name = "numLoaded"]; + * @return The numLoaded. + */ + long getNumLoaded(); +} diff --git a/generated/com/authzed/api/v1/CaveatEvalInfo.java b/generated/com/authzed/api/v1/CaveatEvalInfo.java new file mode 100644 index 00000000..8de62aa7 --- /dev/null +++ b/generated/com/authzed/api/v1/CaveatEvalInfo.java @@ -0,0 +1,1459 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/debug.proto + +package com.authzed.api.v1; + +/** + *
+ * CaveatEvalInfo holds information about a caveat expression that was evaluated.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.CaveatEvalInfo} + */ +public final class CaveatEvalInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.CaveatEvalInfo) + CaveatEvalInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use CaveatEvalInfo.newBuilder() to construct. + private CaveatEvalInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CaveatEvalInfo() { + expression_ = ""; + result_ = 0; + caveatName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CaveatEvalInfo(); + } + + @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.Debug.internal_static_authzed_api_v1_CaveatEvalInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CaveatEvalInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CaveatEvalInfo.class, com.authzed.api.v1.CaveatEvalInfo.Builder.class); + } + + /** + * Protobuf enum {@code authzed.api.v1.CaveatEvalInfo.Result} + */ + public enum Result + implements com.google.protobuf.ProtocolMessageEnum { + /** + * RESULT_UNSPECIFIED = 0; + */ + RESULT_UNSPECIFIED(0), + /** + * RESULT_UNEVALUATED = 1; + */ + RESULT_UNEVALUATED(1), + /** + * RESULT_FALSE = 2; + */ + RESULT_FALSE(2), + /** + * RESULT_TRUE = 3; + */ + RESULT_TRUE(3), + /** + * RESULT_MISSING_SOME_CONTEXT = 4; + */ + RESULT_MISSING_SOME_CONTEXT(4), + UNRECOGNIZED(-1), + ; + + /** + * RESULT_UNSPECIFIED = 0; + */ + public static final int RESULT_UNSPECIFIED_VALUE = 0; + /** + * RESULT_UNEVALUATED = 1; + */ + public static final int RESULT_UNEVALUATED_VALUE = 1; + /** + * RESULT_FALSE = 2; + */ + public static final int RESULT_FALSE_VALUE = 2; + /** + * RESULT_TRUE = 3; + */ + public static final int RESULT_TRUE_VALUE = 3; + /** + * RESULT_MISSING_SOME_CONTEXT = 4; + */ + public static final int RESULT_MISSING_SOME_CONTEXT_VALUE = 4; + + + 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 Result 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 Result forNumber(int value) { + switch (value) { + case 0: return RESULT_UNSPECIFIED; + case 1: return RESULT_UNEVALUATED; + case 2: return RESULT_FALSE; + case 3: return RESULT_TRUE; + case 4: return RESULT_MISSING_SOME_CONTEXT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Result> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Result findValueByNumber(int number) { + return Result.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.CaveatEvalInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final Result[] VALUES = values(); + + public static Result 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 Result(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v1.CaveatEvalInfo.Result) + } + + public static final int EXPRESSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object expression_ = ""; + /** + *
+   * expression is the expression that was evaluated.
+   * 
+ * + * string expression = 1 [json_name = "expression"]; + * @return The expression. + */ + @java.lang.Override + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + 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(); + expression_ = s; + return s; + } + } + /** + *
+   * expression is the expression that was evaluated.
+   * 
+ * + * string expression = 1 [json_name = "expression"]; + * @return The bytes for expression. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESULT_FIELD_NUMBER = 2; + private int result_ = 0; + /** + *
+   * result is the result of the evaluation.
+   * 
+ * + * .authzed.api.v1.CaveatEvalInfo.Result result = 2 [json_name = "result"]; + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override public int getResultValue() { + return result_; + } + /** + *
+   * result is the result of the evaluation.
+   * 
+ * + * .authzed.api.v1.CaveatEvalInfo.Result result = 2 [json_name = "result"]; + * @return The result. + */ + @java.lang.Override public com.authzed.api.v1.CaveatEvalInfo.Result getResult() { + com.authzed.api.v1.CaveatEvalInfo.Result result = com.authzed.api.v1.CaveatEvalInfo.Result.forNumber(result_); + return result == null ? com.authzed.api.v1.CaveatEvalInfo.Result.UNRECOGNIZED : result; + } + + public static final int CONTEXT_FIELD_NUMBER = 3; + private com.google.protobuf.Struct context_; + /** + *
+   * context consists of any named values that were used for evaluating the caveat expression.
+   * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * context consists of any named values that were used for evaluating the caveat expression.
+   * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + * @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 were used for evaluating the caveat expression.
+   * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getContextOrBuilder() { + return context_ == null ? com.google.protobuf.Struct.getDefaultInstance() : context_; + } + + public static final int PARTIAL_CAVEAT_INFO_FIELD_NUMBER = 4; + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + * @return Whether the partialCaveatInfo field is set. + */ + @java.lang.Override + public boolean hasPartialCaveatInfo() { + return partialCaveatInfo_ != null; + } + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + * @return The partialCaveatInfo. + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + + public static final int CAVEAT_NAME_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object caveatName_ = ""; + /** + *
+   * caveat_name is the name of the caveat that was executed, if applicable.
+   * 
+ * + * string caveat_name = 5 [json_name = "caveatName"]; + * @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 that was executed, if applicable.
+   * 
+ * + * string caveat_name = 5 [json_name = "caveatName"]; + * @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; + } + } + + 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(expression_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, expression_); + } + if (result_ != com.authzed.api.v1.CaveatEvalInfo.Result.RESULT_UNSPECIFIED.getNumber()) { + output.writeEnum(2, result_); + } + if (context_ != null) { + output.writeMessage(3, getContext()); + } + if (partialCaveatInfo_ != null) { + output.writeMessage(4, getPartialCaveatInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(caveatName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, caveatName_); + } + 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(expression_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, expression_); + } + if (result_ != com.authzed.api.v1.CaveatEvalInfo.Result.RESULT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, result_); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getContext()); + } + if (partialCaveatInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPartialCaveatInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(caveatName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, caveatName_); + } + 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.CaveatEvalInfo)) { + return super.equals(obj); + } + com.authzed.api.v1.CaveatEvalInfo other = (com.authzed.api.v1.CaveatEvalInfo) obj; + + if (!getExpression() + .equals(other.getExpression())) return false; + if (result_ != other.result_) return false; + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (hasPartialCaveatInfo() != other.hasPartialCaveatInfo()) return false; + if (hasPartialCaveatInfo()) { + if (!getPartialCaveatInfo() + .equals(other.getPartialCaveatInfo())) return false; + } + if (!getCaveatName() + .equals(other.getCaveatName())) 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) + EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getExpression().hashCode(); + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + result_; + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + if (hasPartialCaveatInfo()) { + hash = (37 * hash) + PARTIAL_CAVEAT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPartialCaveatInfo().hashCode(); + } + hash = (37 * hash) + CAVEAT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCaveatName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.CaveatEvalInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CaveatEvalInfo 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.CaveatEvalInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CaveatEvalInfo 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.CaveatEvalInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CaveatEvalInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.CaveatEvalInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CaveatEvalInfo 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.CaveatEvalInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CaveatEvalInfo 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.CaveatEvalInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CaveatEvalInfo 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.CaveatEvalInfo 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; + } + /** + *
+   * CaveatEvalInfo holds information about a caveat expression that was evaluated.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.CaveatEvalInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.CaveatEvalInfo) + com.authzed.api.v1.CaveatEvalInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CaveatEvalInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CaveatEvalInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CaveatEvalInfo.class, com.authzed.api.v1.CaveatEvalInfo.Builder.class); + } + + // Construct using com.authzed.api.v1.CaveatEvalInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + expression_ = ""; + result_ = 0; + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + caveatName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CaveatEvalInfo_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.CaveatEvalInfo getDefaultInstanceForType() { + return com.authzed.api.v1.CaveatEvalInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.CaveatEvalInfo build() { + com.authzed.api.v1.CaveatEvalInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.CaveatEvalInfo buildPartial() { + com.authzed.api.v1.CaveatEvalInfo result = new com.authzed.api.v1.CaveatEvalInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.CaveatEvalInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.expression_ = expression_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.result_ = result_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.context_ = contextBuilder_ == null + ? context_ + : contextBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.partialCaveatInfo_ = partialCaveatInfoBuilder_ == null + ? partialCaveatInfo_ + : partialCaveatInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.caveatName_ = caveatName_; + } + } + + @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.CaveatEvalInfo) { + return mergeFrom((com.authzed.api.v1.CaveatEvalInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.CaveatEvalInfo other) { + if (other == com.authzed.api.v1.CaveatEvalInfo.getDefaultInstance()) return this; + if (!other.getExpression().isEmpty()) { + expression_ = other.expression_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (other.hasPartialCaveatInfo()) { + mergePartialCaveatInfo(other.getPartialCaveatInfo()); + } + if (!other.getCaveatName().isEmpty()) { + caveatName_ = other.caveatName_; + bitField0_ |= 0x00000010; + 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: { + expression_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + result_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getContextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getPartialCaveatInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + caveatName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 expression_ = ""; + /** + *
+     * expression is the expression that was evaluated.
+     * 
+ * + * string expression = 1 [json_name = "expression"]; + * @return The expression. + */ + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expression_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * expression is the expression that was evaluated.
+     * 
+ * + * string expression = 1 [json_name = "expression"]; + * @return The bytes for expression. + */ + public com.google.protobuf.ByteString + getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * expression is the expression that was evaluated.
+     * 
+ * + * string expression = 1 [json_name = "expression"]; + * @param value The expression to set. + * @return This builder for chaining. + */ + public Builder setExpression( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + expression_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * expression is the expression that was evaluated.
+     * 
+ * + * string expression = 1 [json_name = "expression"]; + * @return This builder for chaining. + */ + public Builder clearExpression() { + expression_ = getDefaultInstance().getExpression(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * expression is the expression that was evaluated.
+     * 
+ * + * string expression = 1 [json_name = "expression"]; + * @param value The bytes for expression to set. + * @return This builder for chaining. + */ + public Builder setExpressionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + expression_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int result_ = 0; + /** + *
+     * result is the result of the evaluation.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo.Result result = 2 [json_name = "result"]; + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override public int getResultValue() { + return result_; + } + /** + *
+     * result is the result of the evaluation.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo.Result result = 2 [json_name = "result"]; + * @param value The enum numeric value on the wire for result to set. + * @return This builder for chaining. + */ + public Builder setResultValue(int value) { + result_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * result is the result of the evaluation.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo.Result result = 2 [json_name = "result"]; + * @return The result. + */ + @java.lang.Override + public com.authzed.api.v1.CaveatEvalInfo.Result getResult() { + com.authzed.api.v1.CaveatEvalInfo.Result result = com.authzed.api.v1.CaveatEvalInfo.Result.forNumber(result_); + return result == null ? com.authzed.api.v1.CaveatEvalInfo.Result.UNRECOGNIZED : result; + } + /** + *
+     * result is the result of the evaluation.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo.Result result = 2 [json_name = "result"]; + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult(com.authzed.api.v1.CaveatEvalInfo.Result value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * result is the result of the evaluation.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo.Result result = 2 [json_name = "result"]; + * @return This builder for chaining. + */ + public Builder clearResult() { + bitField0_ = (bitField0_ & ~0x00000002); + result_ = 0; + 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 were used for evaluating the caveat expression.
+     * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * context consists of any named values that were used for evaluating the caveat expression.
+     * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + * @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 were used for evaluating the caveat expression.
+     * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + */ + public Builder setContext(com.google.protobuf.Struct value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + } else { + contextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * context consists of any named values that were used for evaluating the caveat expression.
+     * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + */ + public Builder setContext( + com.google.protobuf.Struct.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * context consists of any named values that were used for evaluating the caveat expression.
+     * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + */ + public Builder mergeContext(com.google.protobuf.Struct value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + context_ != null && + context_ != com.google.protobuf.Struct.getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * context consists of any named values that were used for evaluating the caveat expression.
+     * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000004); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * context consists of any named values that were used for evaluating the caveat expression.
+     * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + */ + public com.google.protobuf.Struct.Builder getContextBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * context consists of any named values that were used for evaluating the caveat expression.
+     * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + */ + 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 were used for evaluating the caveat expression.
+     * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + */ + 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_; + } + + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> partialCaveatInfoBuilder_; + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + * @return Whether the partialCaveatInfo field is set. + */ + public boolean hasPartialCaveatInfo() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + * @return The partialCaveatInfo. + */ + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + if (partialCaveatInfoBuilder_ == null) { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } else { + return partialCaveatInfoBuilder_.getMessage(); + } + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + */ + public Builder setPartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partialCaveatInfo_ = value; + } else { + partialCaveatInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + */ + public Builder setPartialCaveatInfo( + com.authzed.api.v1.PartialCaveatInfo.Builder builderForValue) { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfo_ = builderForValue.build(); + } else { + partialCaveatInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + */ + public Builder mergePartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + partialCaveatInfo_ != null && + partialCaveatInfo_ != com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance()) { + getPartialCaveatInfoBuilder().mergeFrom(value); + } else { + partialCaveatInfo_ = value; + } + } else { + partialCaveatInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + */ + public Builder clearPartialCaveatInfo() { + bitField0_ = (bitField0_ & ~0x00000008); + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + */ + public com.authzed.api.v1.PartialCaveatInfo.Builder getPartialCaveatInfoBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPartialCaveatInfoFieldBuilder().getBuilder(); + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + */ + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + if (partialCaveatInfoBuilder_ != null) { + return partialCaveatInfoBuilder_.getMessageOrBuilder(); + } else { + return partialCaveatInfo_ == null ? + com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> + getPartialCaveatInfoFieldBuilder() { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder>( + getPartialCaveatInfo(), + getParentForChildren(), + isClean()); + partialCaveatInfo_ = null; + } + return partialCaveatInfoBuilder_; + } + + private java.lang.Object caveatName_ = ""; + /** + *
+     * caveat_name is the name of the caveat that was executed, if applicable.
+     * 
+ * + * string caveat_name = 5 [json_name = "caveatName"]; + * @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 that was executed, if applicable.
+     * 
+ * + * string caveat_name = 5 [json_name = "caveatName"]; + * @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 that was executed, if applicable.
+     * 
+ * + * string caveat_name = 5 [json_name = "caveatName"]; + * @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_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * caveat_name is the name of the caveat that was executed, if applicable.
+     * 
+ * + * string caveat_name = 5 [json_name = "caveatName"]; + * @return This builder for chaining. + */ + public Builder clearCaveatName() { + caveatName_ = getDefaultInstance().getCaveatName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * caveat_name is the name of the caveat that was executed, if applicable.
+     * 
+ * + * string caveat_name = 5 [json_name = "caveatName"]; + * @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_ |= 0x00000010; + 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.CaveatEvalInfo) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.CaveatEvalInfo) + private static final com.authzed.api.v1.CaveatEvalInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.CaveatEvalInfo(); + } + + public static com.authzed.api.v1.CaveatEvalInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CaveatEvalInfo 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.CaveatEvalInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/CaveatEvalInfoOrBuilder.java b/generated/com/authzed/api/v1/CaveatEvalInfoOrBuilder.java new file mode 100644 index 00000000..fc260199 --- /dev/null +++ b/generated/com/authzed/api/v1/CaveatEvalInfoOrBuilder.java @@ -0,0 +1,122 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/debug.proto + +package com.authzed.api.v1; + +public interface CaveatEvalInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.CaveatEvalInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * expression is the expression that was evaluated.
+   * 
+ * + * string expression = 1 [json_name = "expression"]; + * @return The expression. + */ + java.lang.String getExpression(); + /** + *
+   * expression is the expression that was evaluated.
+   * 
+ * + * string expression = 1 [json_name = "expression"]; + * @return The bytes for expression. + */ + com.google.protobuf.ByteString + getExpressionBytes(); + + /** + *
+   * result is the result of the evaluation.
+   * 
+ * + * .authzed.api.v1.CaveatEvalInfo.Result result = 2 [json_name = "result"]; + * @return The enum numeric value on the wire for result. + */ + int getResultValue(); + /** + *
+   * result is the result of the evaluation.
+   * 
+ * + * .authzed.api.v1.CaveatEvalInfo.Result result = 2 [json_name = "result"]; + * @return The result. + */ + com.authzed.api.v1.CaveatEvalInfo.Result getResult(); + + /** + *
+   * context consists of any named values that were used for evaluating the caveat expression.
+   * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * context consists of any named values that were used for evaluating the caveat expression.
+   * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + * @return The context. + */ + com.google.protobuf.Struct getContext(); + /** + *
+   * context consists of any named values that were used for evaluating the caveat expression.
+   * 
+ * + * .google.protobuf.Struct context = 3 [json_name = "context"]; + */ + com.google.protobuf.StructOrBuilder getContextOrBuilder(); + + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + * @return Whether the partialCaveatInfo field is set. + */ + boolean hasPartialCaveatInfo(); + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + * @return The partialCaveatInfo. + */ + com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo(); + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo"]; + */ + com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder(); + + /** + *
+   * caveat_name is the name of the caveat that was executed, if applicable.
+   * 
+ * + * string caveat_name = 5 [json_name = "caveatName"]; + * @return The caveatName. + */ + java.lang.String getCaveatName(); + /** + *
+   * caveat_name is the name of the caveat that was executed, if applicable.
+   * 
+ * + * string caveat_name = 5 [json_name = "caveatName"]; + * @return The bytes for caveatName. + */ + com.google.protobuf.ByteString + getCaveatNameBytes(); +} diff --git a/generated/com/authzed/api/v1/CheckBulkPermissionsPair.java b/generated/com/authzed/api/v1/CheckBulkPermissionsPair.java new file mode 100644 index 00000000..6144f30d --- /dev/null +++ b/generated/com/authzed/api/v1/CheckBulkPermissionsPair.java @@ -0,0 +1,1079 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.CheckBulkPermissionsPair} + */ +public final class CheckBulkPermissionsPair extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.CheckBulkPermissionsPair) + CheckBulkPermissionsPairOrBuilder { +private static final long serialVersionUID = 0L; + // Use CheckBulkPermissionsPair.newBuilder() to construct. + private CheckBulkPermissionsPair(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CheckBulkPermissionsPair() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CheckBulkPermissionsPair(); + } + + @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.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsPair_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsPair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckBulkPermissionsPair.class, com.authzed.api.v1.CheckBulkPermissionsPair.Builder.class); + } + + private int responseCase_ = 0; + private java.lang.Object response_; + public enum ResponseCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ITEM(2), + ERROR(3), + RESPONSE_NOT_SET(0); + private final int value; + private ResponseCase(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 ResponseCase valueOf(int value) { + return forNumber(value); + } + + public static ResponseCase forNumber(int value) { + switch (value) { + case 2: return ITEM; + case 3: return ERROR; + case 0: return RESPONSE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public static final int REQUEST_FIELD_NUMBER = 1; + private com.authzed.api.v1.CheckBulkPermissionsRequestItem request_; + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + * @return Whether the request field is set. + */ + @java.lang.Override + public boolean hasRequest() { + return request_ != null; + } + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + * @return The request. + */ + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsRequestItem getRequest() { + return request_ == null ? com.authzed.api.v1.CheckBulkPermissionsRequestItem.getDefaultInstance() : request_; + } + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + */ + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder getRequestOrBuilder() { + return request_ == null ? com.authzed.api.v1.CheckBulkPermissionsRequestItem.getDefaultInstance() : request_; + } + + public static final int ITEM_FIELD_NUMBER = 2; + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return responseCase_ == 2; + } + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + * @return The item. + */ + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsResponseItem getItem() { + if (responseCase_ == 2) { + return (com.authzed.api.v1.CheckBulkPermissionsResponseItem) response_; + } + return com.authzed.api.v1.CheckBulkPermissionsResponseItem.getDefaultInstance(); + } + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + */ + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsResponseItemOrBuilder getItemOrBuilder() { + if (responseCase_ == 2) { + return (com.authzed.api.v1.CheckBulkPermissionsResponseItem) response_; + } + return com.authzed.api.v1.CheckBulkPermissionsResponseItem.getDefaultInstance(); + } + + public static final int ERROR_FIELD_NUMBER = 3; + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return responseCase_ == 3; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + 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 (request_ != null) { + output.writeMessage(1, getRequest()); + } + if (responseCase_ == 2) { + output.writeMessage(2, (com.authzed.api.v1.CheckBulkPermissionsResponseItem) response_); + } + if (responseCase_ == 3) { + output.writeMessage(3, (com.google.rpc.Status) response_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRequest()); + } + if (responseCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.authzed.api.v1.CheckBulkPermissionsResponseItem) response_); + } + if (responseCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.rpc.Status) response_); + } + 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.CheckBulkPermissionsPair)) { + return super.equals(obj); + } + com.authzed.api.v1.CheckBulkPermissionsPair other = (com.authzed.api.v1.CheckBulkPermissionsPair) obj; + + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest() + .equals(other.getRequest())) return false; + } + if (!getResponseCase().equals(other.getResponseCase())) return false; + switch (responseCase_) { + case 2: + if (!getItem() + .equals(other.getItem())) return false; + break; + case 3: + if (!getError() + .equals(other.getError())) 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 (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + switch (responseCase_) { + case 2: + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + break; + case 3: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.CheckBulkPermissionsPair parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsPair 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.CheckBulkPermissionsPair parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsPair 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.CheckBulkPermissionsPair parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsPair parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.CheckBulkPermissionsPair parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsPair 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.CheckBulkPermissionsPair parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsPair 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.CheckBulkPermissionsPair parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsPair 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.CheckBulkPermissionsPair 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; + } + /** + * Protobuf type {@code authzed.api.v1.CheckBulkPermissionsPair} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.CheckBulkPermissionsPair) + com.authzed.api.v1.CheckBulkPermissionsPairOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsPair_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsPair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckBulkPermissionsPair.class, com.authzed.api.v1.CheckBulkPermissionsPair.Builder.class); + } + + // Construct using com.authzed.api.v1.CheckBulkPermissionsPair.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + request_ = null; + if (requestBuilder_ != null) { + requestBuilder_.dispose(); + requestBuilder_ = null; + } + if (itemBuilder_ != null) { + itemBuilder_.clear(); + } + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + responseCase_ = 0; + response_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsPair_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsPair getDefaultInstanceForType() { + return com.authzed.api.v1.CheckBulkPermissionsPair.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsPair build() { + com.authzed.api.v1.CheckBulkPermissionsPair result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsPair buildPartial() { + com.authzed.api.v1.CheckBulkPermissionsPair result = new com.authzed.api.v1.CheckBulkPermissionsPair(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.CheckBulkPermissionsPair result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.request_ = requestBuilder_ == null + ? request_ + : requestBuilder_.build(); + } + } + + private void buildPartialOneofs(com.authzed.api.v1.CheckBulkPermissionsPair result) { + result.responseCase_ = responseCase_; + result.response_ = this.response_; + if (responseCase_ == 2 && + itemBuilder_ != null) { + result.response_ = itemBuilder_.build(); + } + if (responseCase_ == 3 && + errorBuilder_ != null) { + result.response_ = errorBuilder_.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.CheckBulkPermissionsPair) { + return mergeFrom((com.authzed.api.v1.CheckBulkPermissionsPair)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.CheckBulkPermissionsPair other) { + if (other == com.authzed.api.v1.CheckBulkPermissionsPair.getDefaultInstance()) return this; + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + switch (other.getResponseCase()) { + case ITEM: { + mergeItem(other.getItem()); + break; + } + case ERROR: { + mergeError(other.getError()); + break; + } + case RESPONSE_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( + getRequestFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getItemFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getErrorFieldBuilder().getBuilder(), + extensionRegistry); + responseCase_ = 3; + break; + } // case 26 + 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 responseCase_ = 0; + private java.lang.Object response_; + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public Builder clearResponse() { + responseCase_ = 0; + response_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.authzed.api.v1.CheckBulkPermissionsRequestItem request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsRequestItem, com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder, com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder> requestBuilder_; + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + * @return Whether the request field is set. + */ + public boolean hasRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + * @return The request. + */ + public com.authzed.api.v1.CheckBulkPermissionsRequestItem getRequest() { + if (requestBuilder_ == null) { + return request_ == null ? com.authzed.api.v1.CheckBulkPermissionsRequestItem.getDefaultInstance() : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + */ + public Builder setRequest(com.authzed.api.v1.CheckBulkPermissionsRequestItem value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + } else { + requestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + */ + public Builder setRequest( + com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + */ + public Builder mergeRequest(com.authzed.api.v1.CheckBulkPermissionsRequestItem value) { + if (requestBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + request_ != null && + request_ != com.authzed.api.v1.CheckBulkPermissionsRequestItem.getDefaultInstance()) { + getRequestBuilder().mergeFrom(value); + } else { + request_ = value; + } + } else { + requestBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + */ + public Builder clearRequest() { + bitField0_ = (bitField0_ & ~0x00000001); + request_ = null; + if (requestBuilder_ != null) { + requestBuilder_.dispose(); + requestBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + */ + public com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder getRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + */ + public com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null ? + com.authzed.api.v1.CheckBulkPermissionsRequestItem.getDefaultInstance() : request_; + } + } + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsRequestItem, com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder, com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsRequestItem, com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder, com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder>( + getRequest(), + getParentForChildren(), + isClean()); + request_ = null; + } + return requestBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsResponseItem, com.authzed.api.v1.CheckBulkPermissionsResponseItem.Builder, com.authzed.api.v1.CheckBulkPermissionsResponseItemOrBuilder> itemBuilder_; + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return responseCase_ == 2; + } + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + * @return The item. + */ + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsResponseItem getItem() { + if (itemBuilder_ == null) { + if (responseCase_ == 2) { + return (com.authzed.api.v1.CheckBulkPermissionsResponseItem) response_; + } + return com.authzed.api.v1.CheckBulkPermissionsResponseItem.getDefaultInstance(); + } else { + if (responseCase_ == 2) { + return itemBuilder_.getMessage(); + } + return com.authzed.api.v1.CheckBulkPermissionsResponseItem.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + */ + public Builder setItem(com.authzed.api.v1.CheckBulkPermissionsResponseItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + itemBuilder_.setMessage(value); + } + responseCase_ = 2; + return this; + } + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + */ + public Builder setItem( + com.authzed.api.v1.CheckBulkPermissionsResponseItem.Builder builderForValue) { + if (itemBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 2; + return this; + } + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + */ + public Builder mergeItem(com.authzed.api.v1.CheckBulkPermissionsResponseItem value) { + if (itemBuilder_ == null) { + if (responseCase_ == 2 && + response_ != com.authzed.api.v1.CheckBulkPermissionsResponseItem.getDefaultInstance()) { + response_ = com.authzed.api.v1.CheckBulkPermissionsResponseItem.newBuilder((com.authzed.api.v1.CheckBulkPermissionsResponseItem) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 2) { + itemBuilder_.mergeFrom(value); + } else { + itemBuilder_.setMessage(value); + } + } + responseCase_ = 2; + return this; + } + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + */ + public Builder clearItem() { + if (itemBuilder_ == null) { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + } + itemBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + */ + public com.authzed.api.v1.CheckBulkPermissionsResponseItem.Builder getItemBuilder() { + return getItemFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + */ + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsResponseItemOrBuilder getItemOrBuilder() { + if ((responseCase_ == 2) && (itemBuilder_ != null)) { + return itemBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 2) { + return (com.authzed.api.v1.CheckBulkPermissionsResponseItem) response_; + } + return com.authzed.api.v1.CheckBulkPermissionsResponseItem.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsResponseItem, com.authzed.api.v1.CheckBulkPermissionsResponseItem.Builder, com.authzed.api.v1.CheckBulkPermissionsResponseItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + if (!(responseCase_ == 2)) { + response_ = com.authzed.api.v1.CheckBulkPermissionsResponseItem.getDefaultInstance(); + } + itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsResponseItem, com.authzed.api.v1.CheckBulkPermissionsResponseItem.Builder, com.authzed.api.v1.CheckBulkPermissionsResponseItemOrBuilder>( + (com.authzed.api.v1.CheckBulkPermissionsResponseItem) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 2; + onChanged(); + return itemBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return responseCase_ == 3; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } else { + if (responseCase_ == 3) { + return errorBuilder_.getMessage(); + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + responseCase_ = 3; + return this; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 3; + return this; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (responseCase_ == 3 && + response_ != com.google.rpc.Status.getDefaultInstance()) { + response_ = com.google.rpc.Status.newBuilder((com.google.rpc.Status) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 3) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + responseCase_ = 3; + return this; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if ((responseCase_ == 3) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(responseCase_ == 3)) { + response_ = com.google.rpc.Status.getDefaultInstance(); + } + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + (com.google.rpc.Status) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 3; + onChanged(); + return errorBuilder_; + } + @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.CheckBulkPermissionsPair) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.CheckBulkPermissionsPair) + private static final com.authzed.api.v1.CheckBulkPermissionsPair DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.CheckBulkPermissionsPair(); + } + + public static com.authzed.api.v1.CheckBulkPermissionsPair getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckBulkPermissionsPair 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.CheckBulkPermissionsPair getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/CheckBulkPermissionsPairOrBuilder.java b/generated/com/authzed/api/v1/CheckBulkPermissionsPairOrBuilder.java new file mode 100644 index 00000000..67392f69 --- /dev/null +++ b/generated/com/authzed/api/v1/CheckBulkPermissionsPairOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface CheckBulkPermissionsPairOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.CheckBulkPermissionsPair) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + * @return Whether the request field is set. + */ + boolean hasRequest(); + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + * @return The request. + */ + com.authzed.api.v1.CheckBulkPermissionsRequestItem getRequest(); + /** + * .authzed.api.v1.CheckBulkPermissionsRequestItem request = 1 [json_name = "request"]; + */ + com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder getRequestOrBuilder(); + + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + * @return The item. + */ + com.authzed.api.v1.CheckBulkPermissionsResponseItem getItem(); + /** + * .authzed.api.v1.CheckBulkPermissionsResponseItem item = 2 [json_name = "item"]; + */ + com.authzed.api.v1.CheckBulkPermissionsResponseItemOrBuilder getItemOrBuilder(); + + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * .google.rpc.Status error = 3 [json_name = "error"]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + public com.authzed.api.v1.CheckBulkPermissionsPair.ResponseCase getResponseCase(); +} diff --git a/generated/com/authzed/api/v1/CheckBulkPermissionsRequest.java b/generated/com/authzed/api/v1/CheckBulkPermissionsRequest.java new file mode 100644 index 00000000..c1e760eb --- /dev/null +++ b/generated/com/authzed/api/v1/CheckBulkPermissionsRequest.java @@ -0,0 +1,957 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * CheckBulkPermissionsRequest issues a check on whether a subject has permission 
+ * or is a member of a relation on a specific resource for each item in the list.
+ * The ordering of the items in the response is maintained in the response.
+ * Checks with the same subject/permission will automatically be batched for performance optimization.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.CheckBulkPermissionsRequest} + */ +public final class CheckBulkPermissionsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.CheckBulkPermissionsRequest) + CheckBulkPermissionsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CheckBulkPermissionsRequest.newBuilder() to construct. + private CheckBulkPermissionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CheckBulkPermissionsRequest() { + items_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CheckBulkPermissionsRequest(); + } + + @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.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckBulkPermissionsRequest.class, com.authzed.api.v1.CheckBulkPermissionsRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int ITEMS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List items_; + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List getItemsList() { + return items_; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List + getItemsOrBuilderList() { + return items_; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + @java.lang.Override + public int getItemsCount() { + return items_.size(); + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsRequestItem getItems(int index) { + return items_.get(index); + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder getItemsOrBuilder( + int index) { + return items_.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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + for (int i = 0; i < items_.size(); i++) { + output.writeMessage(2, items_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + for (int i = 0; i < items_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, items_.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.CheckBulkPermissionsRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.CheckBulkPermissionsRequest other = (com.authzed.api.v1.CheckBulkPermissionsRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (!getItemsList() + .equals(other.getItemsList())) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + if (getItemsCount() > 0) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getItemsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.CheckBulkPermissionsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequest 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.CheckBulkPermissionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequest 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.CheckBulkPermissionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequest 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.CheckBulkPermissionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequest 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.CheckBulkPermissionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequest 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.CheckBulkPermissionsRequest 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; + } + /** + *
+   * CheckBulkPermissionsRequest issues a check on whether a subject has permission 
+   * or is a member of a relation on a specific resource for each item in the list.
+   * The ordering of the items in the response is maintained in the response.
+   * Checks with the same subject/permission will automatically be batched for performance optimization.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.CheckBulkPermissionsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.CheckBulkPermissionsRequest) + com.authzed.api.v1.CheckBulkPermissionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckBulkPermissionsRequest.class, com.authzed.api.v1.CheckBulkPermissionsRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.CheckBulkPermissionsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + } else { + items_ = null; + itemsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsRequest getDefaultInstanceForType() { + return com.authzed.api.v1.CheckBulkPermissionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsRequest build() { + com.authzed.api.v1.CheckBulkPermissionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsRequest buildPartial() { + com.authzed.api.v1.CheckBulkPermissionsRequest result = new com.authzed.api.v1.CheckBulkPermissionsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.CheckBulkPermissionsRequest result) { + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.items_ = items_; + } else { + result.items_ = itemsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.CheckBulkPermissionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.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.CheckBulkPermissionsRequest) { + return mergeFrom((com.authzed.api.v1.CheckBulkPermissionsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.CheckBulkPermissionsRequest other) { + if (other == com.authzed.api.v1.CheckBulkPermissionsRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (itemsBuilder_ == null) { + if (!other.items_.isEmpty()) { + if (items_.isEmpty()) { + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureItemsIsMutable(); + items_.addAll(other.items_); + } + onChanged(); + } + } else { + if (!other.items_.isEmpty()) { + if (itemsBuilder_.isEmpty()) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000002); + itemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getItemsFieldBuilder() : null; + } else { + itemsBuilder_.addAllMessages(other.items_); + } + } + } + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.authzed.api.v1.CheckBulkPermissionsRequestItem m = + input.readMessage( + com.authzed.api.v1.CheckBulkPermissionsRequestItem.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.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 com.authzed.api.v1.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private java.util.List items_ = + java.util.Collections.emptyList(); + private void ensureItemsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + items_ = new java.util.ArrayList(items_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsRequestItem, com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder, com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder> itemsBuilder_; + + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public java.util.List getItemsList() { + if (itemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(items_); + } else { + return itemsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public int getItemsCount() { + if (itemsBuilder_ == null) { + return items_.size(); + } else { + return itemsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.CheckBulkPermissionsRequestItem getItems(int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public Builder setItems( + int index, com.authzed.api.v1.CheckBulkPermissionsRequestItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.set(index, value); + onChanged(); + } else { + itemsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public Builder setItems( + int index, com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.set(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public Builder addItems(com.authzed.api.v1.CheckBulkPermissionsRequestItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(value); + onChanged(); + } else { + itemsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public Builder addItems( + int index, com.authzed.api.v1.CheckBulkPermissionsRequestItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(index, value); + onChanged(); + } else { + itemsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public Builder addItems( + com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public Builder addItems( + int index, com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public Builder addAllItems( + java.lang.Iterable values) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, items_); + onChanged(); + } else { + itemsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public Builder clearItems() { + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + itemsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public Builder removeItems(int index) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.remove(index); + onChanged(); + } else { + itemsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder getItemsBuilder( + int index) { + return getItemsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder getItemsOrBuilder( + int index) { + if (itemsBuilder_ == null) { + return items_.get(index); } else { + return itemsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public java.util.List + getItemsOrBuilderList() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(items_); + } + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder addItemsBuilder() { + return getItemsFieldBuilder().addBuilder( + com.authzed.api.v1.CheckBulkPermissionsRequestItem.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder addItemsBuilder( + int index) { + return getItemsFieldBuilder().addBuilder( + index, com.authzed.api.v1.CheckBulkPermissionsRequestItem.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + public java.util.List + getItemsBuilderList() { + return getItemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsRequestItem, com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder, com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder> + getItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsRequestItem, com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder, com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder>( + items_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + items_ = null; + } + return itemsBuilder_; + } + @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.CheckBulkPermissionsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.CheckBulkPermissionsRequest) + private static final com.authzed.api.v1.CheckBulkPermissionsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.CheckBulkPermissionsRequest(); + } + + public static com.authzed.api.v1.CheckBulkPermissionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckBulkPermissionsRequest 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.CheckBulkPermissionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/CheckBulkPermissionsRequestItem.java b/generated/com/authzed/api/v1/CheckBulkPermissionsRequestItem.java new file mode 100644 index 00000000..9cbb7f7c --- /dev/null +++ b/generated/com/authzed/api/v1/CheckBulkPermissionsRequestItem.java @@ -0,0 +1,1087 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.CheckBulkPermissionsRequestItem} + */ +public final class CheckBulkPermissionsRequestItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.CheckBulkPermissionsRequestItem) + CheckBulkPermissionsRequestItemOrBuilder { +private static final long serialVersionUID = 0L; + // Use CheckBulkPermissionsRequestItem.newBuilder() to construct. + private CheckBulkPermissionsRequestItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CheckBulkPermissionsRequestItem() { + permission_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CheckBulkPermissionsRequestItem(); + } + + @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.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsRequestItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsRequestItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckBulkPermissionsRequestItem.class, com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder.class); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private com.authzed.api.v1.ObjectReference resource_; + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getResource() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + + public static final int PERMISSION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object permission_ = ""; + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_FIELD_NUMBER = 3; + private com.authzed.api.v1.SubjectReference subject_; + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + @java.lang.Override + public boolean hasSubject() { + return subject_ != null; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReference getSubject() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + + public static final int CONTEXT_FIELD_NUMBER = 4; + private com.google.protobuf.Struct context_; + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + * @return The context. + */ + @java.lang.Override + public com.google.protobuf.Struct getContext() { + return context_ == null ? com.google.protobuf.Struct.getDefaultInstance() : context_; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.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 (resource_ != null) { + output.writeMessage(1, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permission_); + } + if (subject_ != null) { + output.writeMessage(3, getSubject()); + } + if (context_ != null) { + output.writeMessage(4, getContext()); + } + 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(permission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, permission_); + } + if (subject_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getSubject()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, 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.CheckBulkPermissionsRequestItem)) { + return super.equals(obj); + } + com.authzed.api.v1.CheckBulkPermissionsRequestItem other = (com.authzed.api.v1.CheckBulkPermissionsRequestItem) obj; + + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (!getPermission() + .equals(other.getPermission())) return false; + if (hasSubject() != other.hasSubject()) return false; + if (hasSubject()) { + if (!getSubject() + .equals(other.getSubject())) 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(); + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + if (hasSubject()) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().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.CheckBulkPermissionsRequestItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequestItem 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.CheckBulkPermissionsRequestItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequestItem 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.CheckBulkPermissionsRequestItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequestItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequestItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequestItem 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.CheckBulkPermissionsRequestItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequestItem 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.CheckBulkPermissionsRequestItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsRequestItem 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.CheckBulkPermissionsRequestItem 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; + } + /** + * Protobuf type {@code authzed.api.v1.CheckBulkPermissionsRequestItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.CheckBulkPermissionsRequestItem) + com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsRequestItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsRequestItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckBulkPermissionsRequestItem.class, com.authzed.api.v1.CheckBulkPermissionsRequestItem.Builder.class); + } + + // Construct using com.authzed.api.v1.CheckBulkPermissionsRequestItem.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; + } + permission_ = ""; + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + 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.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsRequestItem_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsRequestItem getDefaultInstanceForType() { + return com.authzed.api.v1.CheckBulkPermissionsRequestItem.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsRequestItem build() { + com.authzed.api.v1.CheckBulkPermissionsRequestItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsRequestItem buildPartial() { + com.authzed.api.v1.CheckBulkPermissionsRequestItem result = new com.authzed.api.v1.CheckBulkPermissionsRequestItem(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.CheckBulkPermissionsRequestItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resource_ = resourceBuilder_ == null + ? resource_ + : resourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.permission_ = permission_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subject_ = subjectBuilder_ == null + ? subject_ + : subjectBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 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.CheckBulkPermissionsRequestItem) { + return mergeFrom((com.authzed.api.v1.CheckBulkPermissionsRequestItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.CheckBulkPermissionsRequestItem other) { + if (other == com.authzed.api.v1.CheckBulkPermissionsRequestItem.getDefaultInstance()) return this; + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSubject()) { + mergeSubject(other.getSubject()); + } + 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: { + input.readMessage( + getResourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + permission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getSubjectFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getContextFieldBuilder().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.ObjectReference resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> resourceBuilder_; + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + public com.authzed.api.v1.ObjectReference getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + } else { + resourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource( + com.authzed.api.v1.ObjectReference.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder mergeResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + resource_ != null && + resource_ != com.authzed.api.v1.ObjectReference.getDefaultInstance()) { + getResourceBuilder().mergeFrom(value); + } else { + resource_ = value; + } + } else { + resourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder clearResource() { + bitField0_ = (bitField0_ & ~0x00000001); + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReference.Builder getResourceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + } + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private java.lang.Object permission_ = ""; + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermission() { + permission_ = getDefaultInstance().getPermission(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.authzed.api.v1.SubjectReference subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> subjectBuilder_; + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + public boolean hasSubject() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + public com.authzed.api.v1.SubjectReference getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } else { + return subjectBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subject_ = value; + } else { + subjectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject( + com.authzed.api.v1.SubjectReference.Builder builderForValue) { + if (subjectBuilder_ == null) { + subject_ = builderForValue.build(); + } else { + subjectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder mergeSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + subject_ != null && + subject_ != com.authzed.api.v1.SubjectReference.getDefaultInstance()) { + getSubjectBuilder().mergeFrom(value); + } else { + subject_ = value; + } + } else { + subjectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder clearSubject() { + bitField0_ = (bitField0_ & ~0x00000004); + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReference.Builder getSubjectBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubjectFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null ? + com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + } + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder>( + getSubject(), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + 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_; + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.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(); + } + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder setContext( + com.google.protobuf.Struct.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder mergeContext(com.google.protobuf.Struct value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + context_ != null && + context_ != com.google.protobuf.Struct.getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000008); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + public com.google.protobuf.Struct.Builder getContextBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + public com.google.protobuf.StructOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : context_; + } + } + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.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.CheckBulkPermissionsRequestItem) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.CheckBulkPermissionsRequestItem) + private static final com.authzed.api.v1.CheckBulkPermissionsRequestItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.CheckBulkPermissionsRequestItem(); + } + + public static com.authzed.api.v1.CheckBulkPermissionsRequestItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckBulkPermissionsRequestItem 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.CheckBulkPermissionsRequestItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/CheckBulkPermissionsRequestItemOrBuilder.java b/generated/com/authzed/api/v1/CheckBulkPermissionsRequestItemOrBuilder.java new file mode 100644 index 00000000..4436c47a --- /dev/null +++ b/generated/com/authzed/api/v1/CheckBulkPermissionsRequestItemOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface CheckBulkPermissionsRequestItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.CheckBulkPermissionsRequestItem) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + com.authzed.api.v1.ObjectReference getResource(); + /** + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder(); + + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + java.lang.String getPermission(); + /** + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + boolean hasSubject(); + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + com.authzed.api.v1.SubjectReference getSubject(); + /** + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder(); + + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + * @return The context. + */ + com.google.protobuf.Struct getContext(); + /** + * .google.protobuf.Struct context = 4 [json_name = "context", (.validate.rules) = { ... } + */ + com.google.protobuf.StructOrBuilder getContextOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/CheckBulkPermissionsRequestOrBuilder.java b/generated/com/authzed/api/v1/CheckBulkPermissionsRequestOrBuilder.java new file mode 100644 index 00000000..e66609ad --- /dev/null +++ b/generated/com/authzed/api/v1/CheckBulkPermissionsRequestOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface CheckBulkPermissionsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.CheckBulkPermissionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + java.util.List + getItemsList(); + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + com.authzed.api.v1.CheckBulkPermissionsRequestItem getItems(int index); + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + int getItemsCount(); + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + java.util.List + getItemsOrBuilderList(); + /** + * repeated .authzed.api.v1.CheckBulkPermissionsRequestItem items = 2 [json_name = "items", (.validate.rules) = { ... } + */ + com.authzed.api.v1.CheckBulkPermissionsRequestItemOrBuilder getItemsOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/CheckBulkPermissionsResponse.java b/generated/com/authzed/api/v1/CheckBulkPermissionsResponse.java new file mode 100644 index 00000000..63d9b5cf --- /dev/null +++ b/generated/com/authzed/api/v1/CheckBulkPermissionsResponse.java @@ -0,0 +1,943 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.CheckBulkPermissionsResponse} + */ +public final class CheckBulkPermissionsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.CheckBulkPermissionsResponse) + CheckBulkPermissionsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CheckBulkPermissionsResponse.newBuilder() to construct. + private CheckBulkPermissionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CheckBulkPermissionsResponse() { + pairs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CheckBulkPermissionsResponse(); + } + + @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.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckBulkPermissionsResponse.class, com.authzed.api.v1.CheckBulkPermissionsResponse.Builder.class); + } + + public static final int CHECKED_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken checkedAt_; + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return Whether the checkedAt field is set. + */ + @java.lang.Override + public boolean hasCheckedAt() { + return checkedAt_ != null; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return The checkedAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getCheckedAt() { + return checkedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getCheckedAtOrBuilder() { + return checkedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } + + public static final int PAIRS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List pairs_; + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List getPairsList() { + return pairs_; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List + getPairsOrBuilderList() { + return pairs_; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + @java.lang.Override + public int getPairsCount() { + return pairs_.size(); + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsPair getPairs(int index) { + return pairs_.get(index); + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsPairOrBuilder getPairsOrBuilder( + int index) { + return pairs_.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 (checkedAt_ != null) { + output.writeMessage(1, getCheckedAt()); + } + for (int i = 0; i < pairs_.size(); i++) { + output.writeMessage(2, pairs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (checkedAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCheckedAt()); + } + for (int i = 0; i < pairs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, pairs_.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.CheckBulkPermissionsResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.CheckBulkPermissionsResponse other = (com.authzed.api.v1.CheckBulkPermissionsResponse) obj; + + if (hasCheckedAt() != other.hasCheckedAt()) return false; + if (hasCheckedAt()) { + if (!getCheckedAt() + .equals(other.getCheckedAt())) return false; + } + if (!getPairsList() + .equals(other.getPairsList())) 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 (hasCheckedAt()) { + hash = (37 * hash) + CHECKED_AT_FIELD_NUMBER; + hash = (53 * hash) + getCheckedAt().hashCode(); + } + if (getPairsCount() > 0) { + hash = (37 * hash) + PAIRS_FIELD_NUMBER; + hash = (53 * hash) + getPairsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.CheckBulkPermissionsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponse 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.CheckBulkPermissionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponse 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.CheckBulkPermissionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponse 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.CheckBulkPermissionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponse 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.CheckBulkPermissionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponse 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.CheckBulkPermissionsResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.CheckBulkPermissionsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.CheckBulkPermissionsResponse) + com.authzed.api.v1.CheckBulkPermissionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckBulkPermissionsResponse.class, com.authzed.api.v1.CheckBulkPermissionsResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.CheckBulkPermissionsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + checkedAt_ = null; + if (checkedAtBuilder_ != null) { + checkedAtBuilder_.dispose(); + checkedAtBuilder_ = null; + } + if (pairsBuilder_ == null) { + pairs_ = java.util.Collections.emptyList(); + } else { + pairs_ = null; + pairsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsResponse getDefaultInstanceForType() { + return com.authzed.api.v1.CheckBulkPermissionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsResponse build() { + com.authzed.api.v1.CheckBulkPermissionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsResponse buildPartial() { + com.authzed.api.v1.CheckBulkPermissionsResponse result = new com.authzed.api.v1.CheckBulkPermissionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.CheckBulkPermissionsResponse result) { + if (pairsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + pairs_ = java.util.Collections.unmodifiableList(pairs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.pairs_ = pairs_; + } else { + result.pairs_ = pairsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.CheckBulkPermissionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.checkedAt_ = checkedAtBuilder_ == null + ? checkedAt_ + : checkedAtBuilder_.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.CheckBulkPermissionsResponse) { + return mergeFrom((com.authzed.api.v1.CheckBulkPermissionsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.CheckBulkPermissionsResponse other) { + if (other == com.authzed.api.v1.CheckBulkPermissionsResponse.getDefaultInstance()) return this; + if (other.hasCheckedAt()) { + mergeCheckedAt(other.getCheckedAt()); + } + if (pairsBuilder_ == null) { + if (!other.pairs_.isEmpty()) { + if (pairs_.isEmpty()) { + pairs_ = other.pairs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePairsIsMutable(); + pairs_.addAll(other.pairs_); + } + onChanged(); + } + } else { + if (!other.pairs_.isEmpty()) { + if (pairsBuilder_.isEmpty()) { + pairsBuilder_.dispose(); + pairsBuilder_ = null; + pairs_ = other.pairs_; + bitField0_ = (bitField0_ & ~0x00000002); + pairsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPairsFieldBuilder() : null; + } else { + pairsBuilder_.addAllMessages(other.pairs_); + } + } + } + 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( + getCheckedAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.authzed.api.v1.CheckBulkPermissionsPair m = + input.readMessage( + com.authzed.api.v1.CheckBulkPermissionsPair.parser(), + extensionRegistry); + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + pairs_.add(m); + } else { + pairsBuilder_.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 com.authzed.api.v1.ZedToken checkedAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> checkedAtBuilder_; + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return Whether the checkedAt field is set. + */ + public boolean hasCheckedAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return The checkedAt. + */ + public com.authzed.api.v1.ZedToken getCheckedAt() { + if (checkedAtBuilder_ == null) { + return checkedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } else { + return checkedAtBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder setCheckedAt(com.authzed.api.v1.ZedToken value) { + if (checkedAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + checkedAt_ = value; + } else { + checkedAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder setCheckedAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (checkedAtBuilder_ == null) { + checkedAt_ = builderForValue.build(); + } else { + checkedAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder mergeCheckedAt(com.authzed.api.v1.ZedToken value) { + if (checkedAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + checkedAt_ != null && + checkedAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getCheckedAtBuilder().mergeFrom(value); + } else { + checkedAt_ = value; + } + } else { + checkedAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder clearCheckedAt() { + bitField0_ = (bitField0_ & ~0x00000001); + checkedAt_ = null; + if (checkedAtBuilder_ != null) { + checkedAtBuilder_.dispose(); + checkedAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedToken.Builder getCheckedAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCheckedAtFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedTokenOrBuilder getCheckedAtOrBuilder() { + if (checkedAtBuilder_ != null) { + return checkedAtBuilder_.getMessageOrBuilder(); + } else { + return checkedAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getCheckedAtFieldBuilder() { + if (checkedAtBuilder_ == null) { + checkedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getCheckedAt(), + getParentForChildren(), + isClean()); + checkedAt_ = null; + } + return checkedAtBuilder_; + } + + private java.util.List pairs_ = + java.util.Collections.emptyList(); + private void ensurePairsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + pairs_ = new java.util.ArrayList(pairs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsPair, com.authzed.api.v1.CheckBulkPermissionsPair.Builder, com.authzed.api.v1.CheckBulkPermissionsPairOrBuilder> pairsBuilder_; + + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public java.util.List getPairsList() { + if (pairsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pairs_); + } else { + return pairsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public int getPairsCount() { + if (pairsBuilder_ == null) { + return pairs_.size(); + } else { + return pairsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.CheckBulkPermissionsPair getPairs(int index) { + if (pairsBuilder_ == null) { + return pairs_.get(index); + } else { + return pairsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder setPairs( + int index, com.authzed.api.v1.CheckBulkPermissionsPair value) { + if (pairsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePairsIsMutable(); + pairs_.set(index, value); + onChanged(); + } else { + pairsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder setPairs( + int index, com.authzed.api.v1.CheckBulkPermissionsPair.Builder builderForValue) { + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + pairs_.set(index, builderForValue.build()); + onChanged(); + } else { + pairsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder addPairs(com.authzed.api.v1.CheckBulkPermissionsPair value) { + if (pairsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePairsIsMutable(); + pairs_.add(value); + onChanged(); + } else { + pairsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder addPairs( + int index, com.authzed.api.v1.CheckBulkPermissionsPair value) { + if (pairsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePairsIsMutable(); + pairs_.add(index, value); + onChanged(); + } else { + pairsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder addPairs( + com.authzed.api.v1.CheckBulkPermissionsPair.Builder builderForValue) { + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + pairs_.add(builderForValue.build()); + onChanged(); + } else { + pairsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder addPairs( + int index, com.authzed.api.v1.CheckBulkPermissionsPair.Builder builderForValue) { + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + pairs_.add(index, builderForValue.build()); + onChanged(); + } else { + pairsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder addAllPairs( + java.lang.Iterable values) { + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pairs_); + onChanged(); + } else { + pairsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder clearPairs() { + if (pairsBuilder_ == null) { + pairs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + pairsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public Builder removePairs(int index) { + if (pairsBuilder_ == null) { + ensurePairsIsMutable(); + pairs_.remove(index); + onChanged(); + } else { + pairsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.CheckBulkPermissionsPair.Builder getPairsBuilder( + int index) { + return getPairsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.CheckBulkPermissionsPairOrBuilder getPairsOrBuilder( + int index) { + if (pairsBuilder_ == null) { + return pairs_.get(index); } else { + return pairsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public java.util.List + getPairsOrBuilderList() { + if (pairsBuilder_ != null) { + return pairsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pairs_); + } + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.CheckBulkPermissionsPair.Builder addPairsBuilder() { + return getPairsFieldBuilder().addBuilder( + com.authzed.api.v1.CheckBulkPermissionsPair.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.CheckBulkPermissionsPair.Builder addPairsBuilder( + int index) { + return getPairsFieldBuilder().addBuilder( + index, com.authzed.api.v1.CheckBulkPermissionsPair.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + public java.util.List + getPairsBuilderList() { + return getPairsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsPair, com.authzed.api.v1.CheckBulkPermissionsPair.Builder, com.authzed.api.v1.CheckBulkPermissionsPairOrBuilder> + getPairsFieldBuilder() { + if (pairsBuilder_ == null) { + pairsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.CheckBulkPermissionsPair, com.authzed.api.v1.CheckBulkPermissionsPair.Builder, com.authzed.api.v1.CheckBulkPermissionsPairOrBuilder>( + pairs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + pairs_ = null; + } + return pairsBuilder_; + } + @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.CheckBulkPermissionsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.CheckBulkPermissionsResponse) + private static final com.authzed.api.v1.CheckBulkPermissionsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.CheckBulkPermissionsResponse(); + } + + public static com.authzed.api.v1.CheckBulkPermissionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckBulkPermissionsResponse 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.CheckBulkPermissionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/CheckBulkPermissionsResponseItem.java b/generated/com/authzed/api/v1/CheckBulkPermissionsResponseItem.java new file mode 100644 index 00000000..e419f4ef --- /dev/null +++ b/generated/com/authzed/api/v1/CheckBulkPermissionsResponseItem.java @@ -0,0 +1,683 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.CheckBulkPermissionsResponseItem} + */ +public final class CheckBulkPermissionsResponseItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.CheckBulkPermissionsResponseItem) + CheckBulkPermissionsResponseItemOrBuilder { +private static final long serialVersionUID = 0L; + // Use CheckBulkPermissionsResponseItem.newBuilder() to construct. + private CheckBulkPermissionsResponseItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CheckBulkPermissionsResponseItem() { + permissionship_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CheckBulkPermissionsResponseItem(); + } + + @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.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsResponseItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsResponseItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckBulkPermissionsResponseItem.class, com.authzed.api.v1.CheckBulkPermissionsResponseItem.Builder.class); + } + + public static final int PERMISSIONSHIP_FIELD_NUMBER = 1; + private int permissionship_ = 0; + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + @java.lang.Override public com.authzed.api.v1.CheckPermissionResponse.Permissionship getPermissionship() { + com.authzed.api.v1.CheckPermissionResponse.Permissionship result = com.authzed.api.v1.CheckPermissionResponse.Permissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.CheckPermissionResponse.Permissionship.UNRECOGNIZED : result; + } + + public static final int PARTIAL_CAVEAT_INFO_FIELD_NUMBER = 2; + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + @java.lang.Override + public boolean hasPartialCaveatInfo() { + return partialCaveatInfo_ != null; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + + 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 (permissionship_ != com.authzed.api.v1.CheckPermissionResponse.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + output.writeEnum(1, permissionship_); + } + if (partialCaveatInfo_ != null) { + output.writeMessage(2, getPartialCaveatInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (permissionship_ != com.authzed.api.v1.CheckPermissionResponse.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, permissionship_); + } + if (partialCaveatInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPartialCaveatInfo()); + } + 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.CheckBulkPermissionsResponseItem)) { + return super.equals(obj); + } + com.authzed.api.v1.CheckBulkPermissionsResponseItem other = (com.authzed.api.v1.CheckBulkPermissionsResponseItem) obj; + + if (permissionship_ != other.permissionship_) return false; + if (hasPartialCaveatInfo() != other.hasPartialCaveatInfo()) return false; + if (hasPartialCaveatInfo()) { + if (!getPartialCaveatInfo() + .equals(other.getPartialCaveatInfo())) 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) + PERMISSIONSHIP_FIELD_NUMBER; + hash = (53 * hash) + permissionship_; + if (hasPartialCaveatInfo()) { + hash = (37 * hash) + PARTIAL_CAVEAT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPartialCaveatInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.CheckBulkPermissionsResponseItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponseItem 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.CheckBulkPermissionsResponseItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponseItem 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.CheckBulkPermissionsResponseItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponseItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponseItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponseItem 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.CheckBulkPermissionsResponseItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponseItem 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.CheckBulkPermissionsResponseItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckBulkPermissionsResponseItem 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.CheckBulkPermissionsResponseItem 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; + } + /** + * Protobuf type {@code authzed.api.v1.CheckBulkPermissionsResponseItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.CheckBulkPermissionsResponseItem) + com.authzed.api.v1.CheckBulkPermissionsResponseItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsResponseItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsResponseItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckBulkPermissionsResponseItem.class, com.authzed.api.v1.CheckBulkPermissionsResponseItem.Builder.class); + } + + // Construct using com.authzed.api.v1.CheckBulkPermissionsResponseItem.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + permissionship_ = 0; + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckBulkPermissionsResponseItem_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsResponseItem getDefaultInstanceForType() { + return com.authzed.api.v1.CheckBulkPermissionsResponseItem.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsResponseItem build() { + com.authzed.api.v1.CheckBulkPermissionsResponseItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.CheckBulkPermissionsResponseItem buildPartial() { + com.authzed.api.v1.CheckBulkPermissionsResponseItem result = new com.authzed.api.v1.CheckBulkPermissionsResponseItem(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.CheckBulkPermissionsResponseItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.permissionship_ = permissionship_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.partialCaveatInfo_ = partialCaveatInfoBuilder_ == null + ? partialCaveatInfo_ + : partialCaveatInfoBuilder_.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.CheckBulkPermissionsResponseItem) { + return mergeFrom((com.authzed.api.v1.CheckBulkPermissionsResponseItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.CheckBulkPermissionsResponseItem other) { + if (other == com.authzed.api.v1.CheckBulkPermissionsResponseItem.getDefaultInstance()) return this; + if (other.permissionship_ != 0) { + setPermissionshipValue(other.getPermissionshipValue()); + } + if (other.hasPartialCaveatInfo()) { + mergePartialCaveatInfo(other.getPartialCaveatInfo()); + } + 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: { + permissionship_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getPartialCaveatInfoFieldBuilder().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 permissionship_ = 0; + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @param value The enum numeric value on the wire for permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionshipValue(int value) { + permissionship_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + @java.lang.Override + public com.authzed.api.v1.CheckPermissionResponse.Permissionship getPermissionship() { + com.authzed.api.v1.CheckPermissionResponse.Permissionship result = com.authzed.api.v1.CheckPermissionResponse.Permissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.CheckPermissionResponse.Permissionship.UNRECOGNIZED : result; + } + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @param value The permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionship(com.authzed.api.v1.CheckPermissionResponse.Permissionship value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + permissionship_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermissionship() { + bitField0_ = (bitField0_ & ~0x00000001); + permissionship_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> partialCaveatInfoBuilder_; + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + public boolean hasPartialCaveatInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + if (partialCaveatInfoBuilder_ == null) { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } else { + return partialCaveatInfoBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder setPartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partialCaveatInfo_ = value; + } else { + partialCaveatInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder setPartialCaveatInfo( + com.authzed.api.v1.PartialCaveatInfo.Builder builderForValue) { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfo_ = builderForValue.build(); + } else { + partialCaveatInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder mergePartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + partialCaveatInfo_ != null && + partialCaveatInfo_ != com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance()) { + getPartialCaveatInfoBuilder().mergeFrom(value); + } else { + partialCaveatInfo_ = value; + } + } else { + partialCaveatInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder clearPartialCaveatInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PartialCaveatInfo.Builder getPartialCaveatInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPartialCaveatInfoFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + if (partialCaveatInfoBuilder_ != null) { + return partialCaveatInfoBuilder_.getMessageOrBuilder(); + } else { + return partialCaveatInfo_ == null ? + com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + } + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> + getPartialCaveatInfoFieldBuilder() { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder>( + getPartialCaveatInfo(), + getParentForChildren(), + isClean()); + partialCaveatInfo_ = null; + } + return partialCaveatInfoBuilder_; + } + @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.CheckBulkPermissionsResponseItem) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.CheckBulkPermissionsResponseItem) + private static final com.authzed.api.v1.CheckBulkPermissionsResponseItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.CheckBulkPermissionsResponseItem(); + } + + public static com.authzed.api.v1.CheckBulkPermissionsResponseItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckBulkPermissionsResponseItem 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.CheckBulkPermissionsResponseItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/CheckBulkPermissionsResponseItemOrBuilder.java b/generated/com/authzed/api/v1/CheckBulkPermissionsResponseItemOrBuilder.java new file mode 100644 index 00000000..c8f8d397 --- /dev/null +++ b/generated/com/authzed/api/v1/CheckBulkPermissionsResponseItemOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface CheckBulkPermissionsResponseItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.CheckBulkPermissionsResponseItem) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + int getPermissionshipValue(); + /** + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 1 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + com.authzed.api.v1.CheckPermissionResponse.Permissionship getPermissionship(); + + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + boolean hasPartialCaveatInfo(); + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo(); + /** + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 2 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/CheckBulkPermissionsResponseOrBuilder.java b/generated/com/authzed/api/v1/CheckBulkPermissionsResponseOrBuilder.java new file mode 100644 index 00000000..fe68887c --- /dev/null +++ b/generated/com/authzed/api/v1/CheckBulkPermissionsResponseOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface CheckBulkPermissionsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.CheckBulkPermissionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return Whether the checkedAt field is set. + */ + boolean hasCheckedAt(); + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return The checkedAt. + */ + com.authzed.api.v1.ZedToken getCheckedAt(); + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ZedTokenOrBuilder getCheckedAtOrBuilder(); + + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + java.util.List + getPairsList(); + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + com.authzed.api.v1.CheckBulkPermissionsPair getPairs(int index); + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + int getPairsCount(); + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + java.util.List + getPairsOrBuilderList(); + /** + * repeated .authzed.api.v1.CheckBulkPermissionsPair pairs = 2 [json_name = "pairs", (.validate.rules) = { ... } + */ + com.authzed.api.v1.CheckBulkPermissionsPairOrBuilder getPairsOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/CheckDebugTrace.java b/generated/com/authzed/api/v1/CheckDebugTrace.java new file mode 100644 index 00000000..da236a2f --- /dev/null +++ b/generated/com/authzed/api/v1/CheckDebugTrace.java @@ -0,0 +1,3240 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/debug.proto + +package com.authzed.api.v1; + +/** + *
+ * CheckDebugTrace is a recursive trace of the requests made for resolving a CheckPermission
+ * API call.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.CheckDebugTrace} + */ +public final class CheckDebugTrace extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.CheckDebugTrace) + CheckDebugTraceOrBuilder { +private static final long serialVersionUID = 0L; + // Use CheckDebugTrace.newBuilder() to construct. + private CheckDebugTrace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CheckDebugTrace() { + permission_ = ""; + permissionType_ = 0; + result_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CheckDebugTrace(); + } + + @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.Debug.internal_static_authzed_api_v1_CheckDebugTrace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CheckDebugTrace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckDebugTrace.class, com.authzed.api.v1.CheckDebugTrace.Builder.class); + } + + /** + * Protobuf enum {@code authzed.api.v1.CheckDebugTrace.PermissionType} + */ + public enum PermissionType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PERMISSION_TYPE_UNSPECIFIED = 0; + */ + PERMISSION_TYPE_UNSPECIFIED(0), + /** + * PERMISSION_TYPE_RELATION = 1; + */ + PERMISSION_TYPE_RELATION(1), + /** + * PERMISSION_TYPE_PERMISSION = 2; + */ + PERMISSION_TYPE_PERMISSION(2), + UNRECOGNIZED(-1), + ; + + /** + * PERMISSION_TYPE_UNSPECIFIED = 0; + */ + public static final int PERMISSION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * PERMISSION_TYPE_RELATION = 1; + */ + public static final int PERMISSION_TYPE_RELATION_VALUE = 1; + /** + * PERMISSION_TYPE_PERMISSION = 2; + */ + public static final int PERMISSION_TYPE_PERMISSION_VALUE = 2; + + + 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 PermissionType 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 PermissionType forNumber(int value) { + switch (value) { + case 0: return PERMISSION_TYPE_UNSPECIFIED; + case 1: return PERMISSION_TYPE_RELATION; + case 2: return PERMISSION_TYPE_PERMISSION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PermissionType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PermissionType findValueByNumber(int number) { + return PermissionType.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.CheckDebugTrace.getDescriptor().getEnumTypes().get(0); + } + + private static final PermissionType[] VALUES = values(); + + public static PermissionType 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 PermissionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v1.CheckDebugTrace.PermissionType) + } + + /** + * Protobuf enum {@code authzed.api.v1.CheckDebugTrace.Permissionship} + */ + public enum Permissionship + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PERMISSIONSHIP_UNSPECIFIED = 0; + */ + PERMISSIONSHIP_UNSPECIFIED(0), + /** + * PERMISSIONSHIP_NO_PERMISSION = 1; + */ + PERMISSIONSHIP_NO_PERMISSION(1), + /** + * PERMISSIONSHIP_HAS_PERMISSION = 2; + */ + PERMISSIONSHIP_HAS_PERMISSION(2), + /** + * PERMISSIONSHIP_CONDITIONAL_PERMISSION = 3; + */ + PERMISSIONSHIP_CONDITIONAL_PERMISSION(3), + UNRECOGNIZED(-1), + ; + + /** + * PERMISSIONSHIP_UNSPECIFIED = 0; + */ + public static final int PERMISSIONSHIP_UNSPECIFIED_VALUE = 0; + /** + * PERMISSIONSHIP_NO_PERMISSION = 1; + */ + public static final int PERMISSIONSHIP_NO_PERMISSION_VALUE = 1; + /** + * PERMISSIONSHIP_HAS_PERMISSION = 2; + */ + public static final int PERMISSIONSHIP_HAS_PERMISSION_VALUE = 2; + /** + * PERMISSIONSHIP_CONDITIONAL_PERMISSION = 3; + */ + public static final int PERMISSIONSHIP_CONDITIONAL_PERMISSION_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 Permissionship 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 Permissionship forNumber(int value) { + switch (value) { + case 0: return PERMISSIONSHIP_UNSPECIFIED; + case 1: return PERMISSIONSHIP_NO_PERMISSION; + case 2: return PERMISSIONSHIP_HAS_PERMISSION; + case 3: return PERMISSIONSHIP_CONDITIONAL_PERMISSION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Permissionship> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Permissionship findValueByNumber(int number) { + return Permissionship.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.CheckDebugTrace.getDescriptor().getEnumTypes().get(1); + } + + private static final Permissionship[] VALUES = values(); + + public static Permissionship 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 Permissionship(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v1.CheckDebugTrace.Permissionship) + } + + public interface SubProblemsOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.CheckDebugTrace.SubProblems) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + java.util.List + getTracesList(); + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + com.authzed.api.v1.CheckDebugTrace getTraces(int index); + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + int getTracesCount(); + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + java.util.List + getTracesOrBuilderList(); + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + com.authzed.api.v1.CheckDebugTraceOrBuilder getTracesOrBuilder( + int index); + } + /** + * Protobuf type {@code authzed.api.v1.CheckDebugTrace.SubProblems} + */ + public static final class SubProblems extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.CheckDebugTrace.SubProblems) + SubProblemsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubProblems.newBuilder() to construct. + private SubProblems(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubProblems() { + traces_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubProblems(); + } + + @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.Debug.internal_static_authzed_api_v1_CheckDebugTrace_SubProblems_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CheckDebugTrace_SubProblems_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckDebugTrace.SubProblems.class, com.authzed.api.v1.CheckDebugTrace.SubProblems.Builder.class); + } + + public static final int TRACES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List traces_; + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + @java.lang.Override + public java.util.List getTracesList() { + return traces_; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + @java.lang.Override + public java.util.List + getTracesOrBuilderList() { + return traces_; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + @java.lang.Override + public int getTracesCount() { + return traces_.size(); + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace getTraces(int index) { + return traces_.get(index); + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + @java.lang.Override + public com.authzed.api.v1.CheckDebugTraceOrBuilder getTracesOrBuilder( + int index) { + return traces_.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 < traces_.size(); i++) { + output.writeMessage(1, traces_.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 < traces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, traces_.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.CheckDebugTrace.SubProblems)) { + return super.equals(obj); + } + com.authzed.api.v1.CheckDebugTrace.SubProblems other = (com.authzed.api.v1.CheckDebugTrace.SubProblems) obj; + + if (!getTracesList() + .equals(other.getTracesList())) 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 (getTracesCount() > 0) { + hash = (37 * hash) + TRACES_FIELD_NUMBER; + hash = (53 * hash) + getTracesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.CheckDebugTrace.SubProblems parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckDebugTrace.SubProblems 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.CheckDebugTrace.SubProblems parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckDebugTrace.SubProblems 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.CheckDebugTrace.SubProblems parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckDebugTrace.SubProblems parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.CheckDebugTrace.SubProblems parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckDebugTrace.SubProblems 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.CheckDebugTrace.SubProblems parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckDebugTrace.SubProblems 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.CheckDebugTrace.SubProblems parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckDebugTrace.SubProblems 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.CheckDebugTrace.SubProblems 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; + } + /** + * Protobuf type {@code authzed.api.v1.CheckDebugTrace.SubProblems} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.CheckDebugTrace.SubProblems) + com.authzed.api.v1.CheckDebugTrace.SubProblemsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CheckDebugTrace_SubProblems_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CheckDebugTrace_SubProblems_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckDebugTrace.SubProblems.class, com.authzed.api.v1.CheckDebugTrace.SubProblems.Builder.class); + } + + // Construct using com.authzed.api.v1.CheckDebugTrace.SubProblems.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tracesBuilder_ == null) { + traces_ = java.util.Collections.emptyList(); + } else { + traces_ = null; + tracesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CheckDebugTrace_SubProblems_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace.SubProblems getDefaultInstanceForType() { + return com.authzed.api.v1.CheckDebugTrace.SubProblems.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace.SubProblems build() { + com.authzed.api.v1.CheckDebugTrace.SubProblems result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace.SubProblems buildPartial() { + com.authzed.api.v1.CheckDebugTrace.SubProblems result = new com.authzed.api.v1.CheckDebugTrace.SubProblems(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.CheckDebugTrace.SubProblems result) { + if (tracesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + traces_ = java.util.Collections.unmodifiableList(traces_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.traces_ = traces_; + } else { + result.traces_ = tracesBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.CheckDebugTrace.SubProblems 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.CheckDebugTrace.SubProblems) { + return mergeFrom((com.authzed.api.v1.CheckDebugTrace.SubProblems)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.CheckDebugTrace.SubProblems other) { + if (other == com.authzed.api.v1.CheckDebugTrace.SubProblems.getDefaultInstance()) return this; + if (tracesBuilder_ == null) { + if (!other.traces_.isEmpty()) { + if (traces_.isEmpty()) { + traces_ = other.traces_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTracesIsMutable(); + traces_.addAll(other.traces_); + } + onChanged(); + } + } else { + if (!other.traces_.isEmpty()) { + if (tracesBuilder_.isEmpty()) { + tracesBuilder_.dispose(); + tracesBuilder_ = null; + traces_ = other.traces_; + bitField0_ = (bitField0_ & ~0x00000001); + tracesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTracesFieldBuilder() : null; + } else { + tracesBuilder_.addAllMessages(other.traces_); + } + } + } + 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.CheckDebugTrace m = + input.readMessage( + com.authzed.api.v1.CheckDebugTrace.parser(), + extensionRegistry); + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(m); + } else { + tracesBuilder_.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 traces_ = + java.util.Collections.emptyList(); + private void ensureTracesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + traces_ = new java.util.ArrayList(traces_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.CheckDebugTrace, com.authzed.api.v1.CheckDebugTrace.Builder, com.authzed.api.v1.CheckDebugTraceOrBuilder> tracesBuilder_; + + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public java.util.List getTracesList() { + if (tracesBuilder_ == null) { + return java.util.Collections.unmodifiableList(traces_); + } else { + return tracesBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public int getTracesCount() { + if (tracesBuilder_ == null) { + return traces_.size(); + } else { + return tracesBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public com.authzed.api.v1.CheckDebugTrace getTraces(int index) { + if (tracesBuilder_ == null) { + return traces_.get(index); + } else { + return tracesBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public Builder setTraces( + int index, com.authzed.api.v1.CheckDebugTrace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.set(index, value); + onChanged(); + } else { + tracesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public Builder setTraces( + int index, com.authzed.api.v1.CheckDebugTrace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.set(index, builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public Builder addTraces(com.authzed.api.v1.CheckDebugTrace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.add(value); + onChanged(); + } else { + tracesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public Builder addTraces( + int index, com.authzed.api.v1.CheckDebugTrace value) { + if (tracesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTracesIsMutable(); + traces_.add(index, value); + onChanged(); + } else { + tracesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public Builder addTraces( + com.authzed.api.v1.CheckDebugTrace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public Builder addTraces( + int index, com.authzed.api.v1.CheckDebugTrace.Builder builderForValue) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.add(index, builderForValue.build()); + onChanged(); + } else { + tracesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public Builder addAllTraces( + java.lang.Iterable values) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, traces_); + onChanged(); + } else { + tracesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public Builder clearTraces() { + if (tracesBuilder_ == null) { + traces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tracesBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public Builder removeTraces(int index) { + if (tracesBuilder_ == null) { + ensureTracesIsMutable(); + traces_.remove(index); + onChanged(); + } else { + tracesBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public com.authzed.api.v1.CheckDebugTrace.Builder getTracesBuilder( + int index) { + return getTracesFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public com.authzed.api.v1.CheckDebugTraceOrBuilder getTracesOrBuilder( + int index) { + if (tracesBuilder_ == null) { + return traces_.get(index); } else { + return tracesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public java.util.List + getTracesOrBuilderList() { + if (tracesBuilder_ != null) { + return tracesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(traces_); + } + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public com.authzed.api.v1.CheckDebugTrace.Builder addTracesBuilder() { + return getTracesFieldBuilder().addBuilder( + com.authzed.api.v1.CheckDebugTrace.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public com.authzed.api.v1.CheckDebugTrace.Builder addTracesBuilder( + int index) { + return getTracesFieldBuilder().addBuilder( + index, com.authzed.api.v1.CheckDebugTrace.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.CheckDebugTrace traces = 1 [json_name = "traces"]; + */ + public java.util.List + getTracesBuilderList() { + return getTracesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.CheckDebugTrace, com.authzed.api.v1.CheckDebugTrace.Builder, com.authzed.api.v1.CheckDebugTraceOrBuilder> + getTracesFieldBuilder() { + if (tracesBuilder_ == null) { + tracesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.CheckDebugTrace, com.authzed.api.v1.CheckDebugTrace.Builder, com.authzed.api.v1.CheckDebugTraceOrBuilder>( + traces_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + traces_ = null; + } + return tracesBuilder_; + } + @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.CheckDebugTrace.SubProblems) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.CheckDebugTrace.SubProblems) + private static final com.authzed.api.v1.CheckDebugTrace.SubProblems DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.CheckDebugTrace.SubProblems(); + } + + public static com.authzed.api.v1.CheckDebugTrace.SubProblems getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubProblems 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.CheckDebugTrace.SubProblems getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int resolutionCase_ = 0; + private java.lang.Object resolution_; + public enum ResolutionCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + WAS_CACHED_RESULT(6), + SUB_PROBLEMS(7), + RESOLUTION_NOT_SET(0); + private final int value; + private ResolutionCase(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 ResolutionCase valueOf(int value) { + return forNumber(value); + } + + public static ResolutionCase forNumber(int value) { + switch (value) { + case 6: return WAS_CACHED_RESULT; + case 7: return SUB_PROBLEMS; + case 0: return RESOLUTION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResolutionCase + getResolutionCase() { + return ResolutionCase.forNumber( + resolutionCase_); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private com.authzed.api.v1.ObjectReference resource_; + /** + *
+   * resource holds the resource on which the Check was performed.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+   * resource holds the resource on which the Check was performed.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getResource() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + /** + *
+   * resource holds the resource on which the Check was performed.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + + public static final int PERMISSION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object permission_ = ""; + /** + *
+   * permission holds the name of the permission or relation on which the Check was performed.
+   * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + *
+   * permission holds the name of the permission or relation on which the Check was performed.
+   * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_TYPE_FIELD_NUMBER = 3; + private int permissionType_ = 0; + /** + *
+   * permission_type holds information indicating whether it was a permission or relation.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.PermissionType permission_type = 3 [json_name = "permissionType", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionType. + */ + @java.lang.Override public int getPermissionTypeValue() { + return permissionType_; + } + /** + *
+   * permission_type holds information indicating whether it was a permission or relation.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.PermissionType permission_type = 3 [json_name = "permissionType", (.validate.rules) = { ... } + * @return The permissionType. + */ + @java.lang.Override public com.authzed.api.v1.CheckDebugTrace.PermissionType getPermissionType() { + com.authzed.api.v1.CheckDebugTrace.PermissionType result = com.authzed.api.v1.CheckDebugTrace.PermissionType.forNumber(permissionType_); + return result == null ? com.authzed.api.v1.CheckDebugTrace.PermissionType.UNRECOGNIZED : result; + } + + public static final int SUBJECT_FIELD_NUMBER = 4; + private com.authzed.api.v1.SubjectReference subject_; + /** + *
+   * subject holds the subject on which the Check was performed. This will be static across all calls within
+   * the same Check tree.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + @java.lang.Override + public boolean hasSubject() { + return subject_ != null; + } + /** + *
+   * subject holds the subject on which the Check was performed. This will be static across all calls within
+   * the same Check tree.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReference getSubject() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + /** + *
+   * subject holds the subject on which the Check was performed. This will be static across all calls within
+   * the same Check tree.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + + public static final int RESULT_FIELD_NUMBER = 5; + private int result_ = 0; + /** + *
+   * result holds the result of the Check call.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.Permissionship result = 5 [json_name = "result", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override public int getResultValue() { + return result_; + } + /** + *
+   * result holds the result of the Check call.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.Permissionship result = 5 [json_name = "result", (.validate.rules) = { ... } + * @return The result. + */ + @java.lang.Override public com.authzed.api.v1.CheckDebugTrace.Permissionship getResult() { + com.authzed.api.v1.CheckDebugTrace.Permissionship result = com.authzed.api.v1.CheckDebugTrace.Permissionship.forNumber(result_); + return result == null ? com.authzed.api.v1.CheckDebugTrace.Permissionship.UNRECOGNIZED : result; + } + + public static final int CAVEAT_EVALUATION_INFO_FIELD_NUMBER = 8; + private com.authzed.api.v1.CaveatEvalInfo caveatEvaluationInfo_; + /** + *
+   * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+   * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + * @return Whether the caveatEvaluationInfo field is set. + */ + @java.lang.Override + public boolean hasCaveatEvaluationInfo() { + return caveatEvaluationInfo_ != null; + } + /** + *
+   * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+   * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + * @return The caveatEvaluationInfo. + */ + @java.lang.Override + public com.authzed.api.v1.CaveatEvalInfo getCaveatEvaluationInfo() { + return caveatEvaluationInfo_ == null ? com.authzed.api.v1.CaveatEvalInfo.getDefaultInstance() : caveatEvaluationInfo_; + } + /** + *
+   * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+   * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + */ + @java.lang.Override + public com.authzed.api.v1.CaveatEvalInfoOrBuilder getCaveatEvaluationInfoOrBuilder() { + return caveatEvaluationInfo_ == null ? com.authzed.api.v1.CaveatEvalInfo.getDefaultInstance() : caveatEvaluationInfo_; + } + + public static final int DURATION_FIELD_NUMBER = 9; + private com.google.protobuf.Duration duration_; + /** + *
+   * duration holds the time spent executing this Check operation.
+   * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + * @return Whether the duration field is set. + */ + @java.lang.Override + public boolean hasDuration() { + return duration_ != null; + } + /** + *
+   * duration holds the time spent executing this Check operation.
+   * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + * @return The duration. + */ + @java.lang.Override + public com.google.protobuf.Duration getDuration() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + /** + *
+   * duration holds the time spent executing this Check operation.
+   * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + + public static final int WAS_CACHED_RESULT_FIELD_NUMBER = 6; + /** + *
+   * was_cached_result, if true, indicates that the result was found in the cache and returned directly.
+   * 
+ * + * bool was_cached_result = 6 [json_name = "wasCachedResult"]; + * @return Whether the wasCachedResult field is set. + */ + @java.lang.Override + public boolean hasWasCachedResult() { + return resolutionCase_ == 6; + } + /** + *
+   * was_cached_result, if true, indicates that the result was found in the cache and returned directly.
+   * 
+ * + * bool was_cached_result = 6 [json_name = "wasCachedResult"]; + * @return The wasCachedResult. + */ + @java.lang.Override + public boolean getWasCachedResult() { + if (resolutionCase_ == 6) { + return (java.lang.Boolean) resolution_; + } + return false; + } + + public static final int SUB_PROBLEMS_FIELD_NUMBER = 7; + /** + *
+   * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+   * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + * @return Whether the subProblems field is set. + */ + @java.lang.Override + public boolean hasSubProblems() { + return resolutionCase_ == 7; + } + /** + *
+   * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+   * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + * @return The subProblems. + */ + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace.SubProblems getSubProblems() { + if (resolutionCase_ == 7) { + return (com.authzed.api.v1.CheckDebugTrace.SubProblems) resolution_; + } + return com.authzed.api.v1.CheckDebugTrace.SubProblems.getDefaultInstance(); + } + /** + *
+   * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+   * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + */ + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace.SubProblemsOrBuilder getSubProblemsOrBuilder() { + if (resolutionCase_ == 7) { + return (com.authzed.api.v1.CheckDebugTrace.SubProblems) resolution_; + } + return com.authzed.api.v1.CheckDebugTrace.SubProblems.getDefaultInstance(); + } + + 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(permission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permission_); + } + if (permissionType_ != com.authzed.api.v1.CheckDebugTrace.PermissionType.PERMISSION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, permissionType_); + } + if (subject_ != null) { + output.writeMessage(4, getSubject()); + } + if (result_ != com.authzed.api.v1.CheckDebugTrace.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + output.writeEnum(5, result_); + } + if (resolutionCase_ == 6) { + output.writeBool( + 6, (boolean)((java.lang.Boolean) resolution_)); + } + if (resolutionCase_ == 7) { + output.writeMessage(7, (com.authzed.api.v1.CheckDebugTrace.SubProblems) resolution_); + } + if (caveatEvaluationInfo_ != null) { + output.writeMessage(8, getCaveatEvaluationInfo()); + } + if (duration_ != null) { + output.writeMessage(9, getDuration()); + } + 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(permission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, permission_); + } + if (permissionType_ != com.authzed.api.v1.CheckDebugTrace.PermissionType.PERMISSION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, permissionType_); + } + if (subject_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getSubject()); + } + if (result_ != com.authzed.api.v1.CheckDebugTrace.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, result_); + } + if (resolutionCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 6, (boolean)((java.lang.Boolean) resolution_)); + } + if (resolutionCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.authzed.api.v1.CheckDebugTrace.SubProblems) resolution_); + } + if (caveatEvaluationInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getCaveatEvaluationInfo()); + } + if (duration_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getDuration()); + } + 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.CheckDebugTrace)) { + return super.equals(obj); + } + com.authzed.api.v1.CheckDebugTrace other = (com.authzed.api.v1.CheckDebugTrace) obj; + + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (!getPermission() + .equals(other.getPermission())) return false; + if (permissionType_ != other.permissionType_) return false; + if (hasSubject() != other.hasSubject()) return false; + if (hasSubject()) { + if (!getSubject() + .equals(other.getSubject())) return false; + } + if (result_ != other.result_) return false; + if (hasCaveatEvaluationInfo() != other.hasCaveatEvaluationInfo()) return false; + if (hasCaveatEvaluationInfo()) { + if (!getCaveatEvaluationInfo() + .equals(other.getCaveatEvaluationInfo())) return false; + } + if (hasDuration() != other.hasDuration()) return false; + if (hasDuration()) { + if (!getDuration() + .equals(other.getDuration())) return false; + } + if (!getResolutionCase().equals(other.getResolutionCase())) return false; + switch (resolutionCase_) { + case 6: + if (getWasCachedResult() + != other.getWasCachedResult()) return false; + break; + case 7: + if (!getSubProblems() + .equals(other.getSubProblems())) 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 (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + hash = (37 * hash) + PERMISSION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + permissionType_; + if (hasSubject()) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().hashCode(); + } + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + result_; + if (hasCaveatEvaluationInfo()) { + hash = (37 * hash) + CAVEAT_EVALUATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getCaveatEvaluationInfo().hashCode(); + } + if (hasDuration()) { + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration().hashCode(); + } + switch (resolutionCase_) { + case 6: + hash = (37 * hash) + WAS_CACHED_RESULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWasCachedResult()); + break; + case 7: + hash = (37 * hash) + SUB_PROBLEMS_FIELD_NUMBER; + hash = (53 * hash) + getSubProblems().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.CheckDebugTrace parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckDebugTrace 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.CheckDebugTrace parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckDebugTrace 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.CheckDebugTrace parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckDebugTrace parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.CheckDebugTrace parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckDebugTrace 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.CheckDebugTrace parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckDebugTrace 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.CheckDebugTrace parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckDebugTrace 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.CheckDebugTrace 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; + } + /** + *
+   * CheckDebugTrace is a recursive trace of the requests made for resolving a CheckPermission
+   * API call.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.CheckDebugTrace} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.CheckDebugTrace) + com.authzed.api.v1.CheckDebugTraceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CheckDebugTrace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CheckDebugTrace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckDebugTrace.class, com.authzed.api.v1.CheckDebugTrace.Builder.class); + } + + // Construct using com.authzed.api.v1.CheckDebugTrace.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; + } + permission_ = ""; + permissionType_ = 0; + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + result_ = 0; + caveatEvaluationInfo_ = null; + if (caveatEvaluationInfoBuilder_ != null) { + caveatEvaluationInfoBuilder_.dispose(); + caveatEvaluationInfoBuilder_ = null; + } + duration_ = null; + if (durationBuilder_ != null) { + durationBuilder_.dispose(); + durationBuilder_ = null; + } + if (subProblemsBuilder_ != null) { + subProblemsBuilder_.clear(); + } + resolutionCase_ = 0; + resolution_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_CheckDebugTrace_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace getDefaultInstanceForType() { + return com.authzed.api.v1.CheckDebugTrace.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace build() { + com.authzed.api.v1.CheckDebugTrace result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace buildPartial() { + com.authzed.api.v1.CheckDebugTrace result = new com.authzed.api.v1.CheckDebugTrace(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.CheckDebugTrace result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resource_ = resourceBuilder_ == null + ? resource_ + : resourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.permission_ = permission_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permissionType_ = permissionType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.subject_ = subjectBuilder_ == null + ? subject_ + : subjectBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.result_ = result_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.caveatEvaluationInfo_ = caveatEvaluationInfoBuilder_ == null + ? caveatEvaluationInfo_ + : caveatEvaluationInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.duration_ = durationBuilder_ == null + ? duration_ + : durationBuilder_.build(); + } + } + + private void buildPartialOneofs(com.authzed.api.v1.CheckDebugTrace result) { + result.resolutionCase_ = resolutionCase_; + result.resolution_ = this.resolution_; + if (resolutionCase_ == 7 && + subProblemsBuilder_ != null) { + result.resolution_ = subProblemsBuilder_.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.CheckDebugTrace) { + return mergeFrom((com.authzed.api.v1.CheckDebugTrace)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.CheckDebugTrace other) { + if (other == com.authzed.api.v1.CheckDebugTrace.getDefaultInstance()) return this; + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.permissionType_ != 0) { + setPermissionTypeValue(other.getPermissionTypeValue()); + } + if (other.hasSubject()) { + mergeSubject(other.getSubject()); + } + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } + if (other.hasCaveatEvaluationInfo()) { + mergeCaveatEvaluationInfo(other.getCaveatEvaluationInfo()); + } + if (other.hasDuration()) { + mergeDuration(other.getDuration()); + } + switch (other.getResolutionCase()) { + case WAS_CACHED_RESULT: { + setWasCachedResult(other.getWasCachedResult()); + break; + } + case SUB_PROBLEMS: { + mergeSubProblems(other.getSubProblems()); + break; + } + case RESOLUTION_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( + getResourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + permission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + permissionType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + input.readMessage( + getSubjectFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + result_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + resolution_ = input.readBool(); + resolutionCase_ = 6; + break; + } // case 48 + case 58: { + input.readMessage( + getSubProblemsFieldBuilder().getBuilder(), + extensionRegistry); + resolutionCase_ = 7; + break; + } // case 58 + case 66: { + input.readMessage( + getCaveatEvaluationInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 + case 74: { + input.readMessage( + getDurationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 74 + 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 resolutionCase_ = 0; + private java.lang.Object resolution_; + public ResolutionCase + getResolutionCase() { + return ResolutionCase.forNumber( + resolutionCase_); + } + + public Builder clearResolution() { + resolutionCase_ = 0; + resolution_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.authzed.api.v1.ObjectReference resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> resourceBuilder_; + /** + *
+     * resource holds the resource on which the Check was performed.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * resource holds the resource on which the Check was performed.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + public com.authzed.api.v1.ObjectReference getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+     * resource holds the resource on which the Check was performed.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + } else { + resourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * resource holds the resource on which the Check was performed.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource( + com.authzed.api.v1.ObjectReference.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * resource holds the resource on which the Check was performed.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder mergeResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + resource_ != null && + resource_ != com.authzed.api.v1.ObjectReference.getDefaultInstance()) { + getResourceBuilder().mergeFrom(value); + } else { + resource_ = value; + } + } else { + resourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * resource holds the resource on which the Check was performed.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder clearResource() { + bitField0_ = (bitField0_ & ~0x00000001); + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * resource holds the resource on which the Check was performed.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReference.Builder getResourceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+     * resource holds the resource on which the Check was performed.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + } + /** + *
+     * resource holds the resource on which the Check was performed.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private java.lang.Object permission_ = ""; + /** + *
+     * permission holds the name of the permission or relation on which the Check was performed.
+     * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * permission holds the name of the permission or relation on which the Check was performed.
+     * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * permission holds the name of the permission or relation on which the Check was performed.
+     * 
+ * + * string permission = 2 [json_name = "permission"]; + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * permission holds the name of the permission or relation on which the Check was performed.
+     * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return This builder for chaining. + */ + public Builder clearPermission() { + permission_ = getDefaultInstance().getPermission(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * permission holds the name of the permission or relation on which the Check was performed.
+     * 
+ * + * string permission = 2 [json_name = "permission"]; + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int permissionType_ = 0; + /** + *
+     * permission_type holds information indicating whether it was a permission or relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.PermissionType permission_type = 3 [json_name = "permissionType", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionType. + */ + @java.lang.Override public int getPermissionTypeValue() { + return permissionType_; + } + /** + *
+     * permission_type holds information indicating whether it was a permission or relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.PermissionType permission_type = 3 [json_name = "permissionType", (.validate.rules) = { ... } + * @param value The enum numeric value on the wire for permissionType to set. + * @return This builder for chaining. + */ + public Builder setPermissionTypeValue(int value) { + permissionType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * permission_type holds information indicating whether it was a permission or relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.PermissionType permission_type = 3 [json_name = "permissionType", (.validate.rules) = { ... } + * @return The permissionType. + */ + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace.PermissionType getPermissionType() { + com.authzed.api.v1.CheckDebugTrace.PermissionType result = com.authzed.api.v1.CheckDebugTrace.PermissionType.forNumber(permissionType_); + return result == null ? com.authzed.api.v1.CheckDebugTrace.PermissionType.UNRECOGNIZED : result; + } + /** + *
+     * permission_type holds information indicating whether it was a permission or relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.PermissionType permission_type = 3 [json_name = "permissionType", (.validate.rules) = { ... } + * @param value The permissionType to set. + * @return This builder for chaining. + */ + public Builder setPermissionType(com.authzed.api.v1.CheckDebugTrace.PermissionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + permissionType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * permission_type holds information indicating whether it was a permission or relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.PermissionType permission_type = 3 [json_name = "permissionType", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermissionType() { + bitField0_ = (bitField0_ & ~0x00000004); + permissionType_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.SubjectReference subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> subjectBuilder_; + /** + *
+     * subject holds the subject on which the Check was performed. This will be static across all calls within
+     * the same Check tree.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + public boolean hasSubject() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * subject holds the subject on which the Check was performed. This will be static across all calls within
+     * the same Check tree.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + public com.authzed.api.v1.SubjectReference getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } else { + return subjectBuilder_.getMessage(); + } + } + /** + *
+     * subject holds the subject on which the Check was performed. This will be static across all calls within
+     * the same Check tree.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subject_ = value; + } else { + subjectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject holds the subject on which the Check was performed. This will be static across all calls within
+     * the same Check tree.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject( + com.authzed.api.v1.SubjectReference.Builder builderForValue) { + if (subjectBuilder_ == null) { + subject_ = builderForValue.build(); + } else { + subjectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject holds the subject on which the Check was performed. This will be static across all calls within
+     * the same Check tree.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder mergeSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + subject_ != null && + subject_ != com.authzed.api.v1.SubjectReference.getDefaultInstance()) { + getSubjectBuilder().mergeFrom(value); + } else { + subject_ = value; + } + } else { + subjectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject holds the subject on which the Check was performed. This will be static across all calls within
+     * the same Check tree.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder clearSubject() { + bitField0_ = (bitField0_ & ~0x00000008); + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * subject holds the subject on which the Check was performed. This will be static across all calls within
+     * the same Check tree.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReference.Builder getSubjectBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubjectFieldBuilder().getBuilder(); + } + /** + *
+     * subject holds the subject on which the Check was performed. This will be static across all calls within
+     * the same Check tree.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null ? + com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + } + /** + *
+     * subject holds the subject on which the Check was performed. This will be static across all calls within
+     * the same Check tree.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder>( + getSubject(), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + private int result_ = 0; + /** + *
+     * result holds the result of the Check call.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.Permissionship result = 5 [json_name = "result", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override public int getResultValue() { + return result_; + } + /** + *
+     * result holds the result of the Check call.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.Permissionship result = 5 [json_name = "result", (.validate.rules) = { ... } + * @param value The enum numeric value on the wire for result to set. + * @return This builder for chaining. + */ + public Builder setResultValue(int value) { + result_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * result holds the result of the Check call.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.Permissionship result = 5 [json_name = "result", (.validate.rules) = { ... } + * @return The result. + */ + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace.Permissionship getResult() { + com.authzed.api.v1.CheckDebugTrace.Permissionship result = com.authzed.api.v1.CheckDebugTrace.Permissionship.forNumber(result_); + return result == null ? com.authzed.api.v1.CheckDebugTrace.Permissionship.UNRECOGNIZED : result; + } + /** + *
+     * result holds the result of the Check call.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.Permissionship result = 5 [json_name = "result", (.validate.rules) = { ... } + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult(com.authzed.api.v1.CheckDebugTrace.Permissionship value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * result holds the result of the Check call.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.Permissionship result = 5 [json_name = "result", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearResult() { + bitField0_ = (bitField0_ & ~0x00000010); + result_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.CaveatEvalInfo caveatEvaluationInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CaveatEvalInfo, com.authzed.api.v1.CaveatEvalInfo.Builder, com.authzed.api.v1.CaveatEvalInfoOrBuilder> caveatEvaluationInfoBuilder_; + /** + *
+     * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + * @return Whether the caveatEvaluationInfo field is set. + */ + public boolean hasCaveatEvaluationInfo() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + * @return The caveatEvaluationInfo. + */ + public com.authzed.api.v1.CaveatEvalInfo getCaveatEvaluationInfo() { + if (caveatEvaluationInfoBuilder_ == null) { + return caveatEvaluationInfo_ == null ? com.authzed.api.v1.CaveatEvalInfo.getDefaultInstance() : caveatEvaluationInfo_; + } else { + return caveatEvaluationInfoBuilder_.getMessage(); + } + } + /** + *
+     * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + */ + public Builder setCaveatEvaluationInfo(com.authzed.api.v1.CaveatEvalInfo value) { + if (caveatEvaluationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + caveatEvaluationInfo_ = value; + } else { + caveatEvaluationInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + */ + public Builder setCaveatEvaluationInfo( + com.authzed.api.v1.CaveatEvalInfo.Builder builderForValue) { + if (caveatEvaluationInfoBuilder_ == null) { + caveatEvaluationInfo_ = builderForValue.build(); + } else { + caveatEvaluationInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + */ + public Builder mergeCaveatEvaluationInfo(com.authzed.api.v1.CaveatEvalInfo value) { + if (caveatEvaluationInfoBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + caveatEvaluationInfo_ != null && + caveatEvaluationInfo_ != com.authzed.api.v1.CaveatEvalInfo.getDefaultInstance()) { + getCaveatEvaluationInfoBuilder().mergeFrom(value); + } else { + caveatEvaluationInfo_ = value; + } + } else { + caveatEvaluationInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + */ + public Builder clearCaveatEvaluationInfo() { + bitField0_ = (bitField0_ & ~0x00000020); + caveatEvaluationInfo_ = null; + if (caveatEvaluationInfoBuilder_ != null) { + caveatEvaluationInfoBuilder_.dispose(); + caveatEvaluationInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + */ + public com.authzed.api.v1.CaveatEvalInfo.Builder getCaveatEvaluationInfoBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCaveatEvaluationInfoFieldBuilder().getBuilder(); + } + /** + *
+     * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + */ + public com.authzed.api.v1.CaveatEvalInfoOrBuilder getCaveatEvaluationInfoOrBuilder() { + if (caveatEvaluationInfoBuilder_ != null) { + return caveatEvaluationInfoBuilder_.getMessageOrBuilder(); + } else { + return caveatEvaluationInfo_ == null ? + com.authzed.api.v1.CaveatEvalInfo.getDefaultInstance() : caveatEvaluationInfo_; + } + } + /** + *
+     * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+     * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CaveatEvalInfo, com.authzed.api.v1.CaveatEvalInfo.Builder, com.authzed.api.v1.CaveatEvalInfoOrBuilder> + getCaveatEvaluationInfoFieldBuilder() { + if (caveatEvaluationInfoBuilder_ == null) { + caveatEvaluationInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CaveatEvalInfo, com.authzed.api.v1.CaveatEvalInfo.Builder, com.authzed.api.v1.CaveatEvalInfoOrBuilder>( + getCaveatEvaluationInfo(), + getParentForChildren(), + isClean()); + caveatEvaluationInfo_ = null; + } + return caveatEvaluationInfoBuilder_; + } + + private com.google.protobuf.Duration duration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> durationBuilder_; + /** + *
+     * duration holds the time spent executing this Check operation.
+     * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * duration holds the time spent executing this Check operation.
+     * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + if (durationBuilder_ == null) { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } else { + return durationBuilder_.getMessage(); + } + } + /** + *
+     * duration holds the time spent executing this Check operation.
+     * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + */ + public Builder setDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + duration_ = value; + } else { + durationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * duration holds the time spent executing this Check operation.
+     * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + */ + public Builder setDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (durationBuilder_ == null) { + duration_ = builderForValue.build(); + } else { + durationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * duration holds the time spent executing this Check operation.
+     * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + */ + public Builder mergeDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + duration_ != null && + duration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDurationBuilder().mergeFrom(value); + } else { + duration_ = value; + } + } else { + durationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * duration holds the time spent executing this Check operation.
+     * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + */ + public Builder clearDuration() { + bitField0_ = (bitField0_ & ~0x00000040); + duration_ = null; + if (durationBuilder_ != null) { + durationBuilder_.dispose(); + durationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * duration holds the time spent executing this Check operation.
+     * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + */ + public com.google.protobuf.Duration.Builder getDurationBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getDurationFieldBuilder().getBuilder(); + } + /** + *
+     * duration holds the time spent executing this Check operation.
+     * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + if (durationBuilder_ != null) { + return durationBuilder_.getMessageOrBuilder(); + } else { + return duration_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + } + /** + *
+     * duration holds the time spent executing this Check operation.
+     * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getDurationFieldBuilder() { + if (durationBuilder_ == null) { + durationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getDuration(), + getParentForChildren(), + isClean()); + duration_ = null; + } + return durationBuilder_; + } + + /** + *
+     * was_cached_result, if true, indicates that the result was found in the cache and returned directly.
+     * 
+ * + * bool was_cached_result = 6 [json_name = "wasCachedResult"]; + * @return Whether the wasCachedResult field is set. + */ + public boolean hasWasCachedResult() { + return resolutionCase_ == 6; + } + /** + *
+     * was_cached_result, if true, indicates that the result was found in the cache and returned directly.
+     * 
+ * + * bool was_cached_result = 6 [json_name = "wasCachedResult"]; + * @return The wasCachedResult. + */ + public boolean getWasCachedResult() { + if (resolutionCase_ == 6) { + return (java.lang.Boolean) resolution_; + } + return false; + } + /** + *
+     * was_cached_result, if true, indicates that the result was found in the cache and returned directly.
+     * 
+ * + * bool was_cached_result = 6 [json_name = "wasCachedResult"]; + * @param value The wasCachedResult to set. + * @return This builder for chaining. + */ + public Builder setWasCachedResult(boolean value) { + + resolutionCase_ = 6; + resolution_ = value; + onChanged(); + return this; + } + /** + *
+     * was_cached_result, if true, indicates that the result was found in the cache and returned directly.
+     * 
+ * + * bool was_cached_result = 6 [json_name = "wasCachedResult"]; + * @return This builder for chaining. + */ + public Builder clearWasCachedResult() { + if (resolutionCase_ == 6) { + resolutionCase_ = 0; + resolution_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckDebugTrace.SubProblems, com.authzed.api.v1.CheckDebugTrace.SubProblems.Builder, com.authzed.api.v1.CheckDebugTrace.SubProblemsOrBuilder> subProblemsBuilder_; + /** + *
+     * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+     * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + * @return Whether the subProblems field is set. + */ + @java.lang.Override + public boolean hasSubProblems() { + return resolutionCase_ == 7; + } + /** + *
+     * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+     * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + * @return The subProblems. + */ + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace.SubProblems getSubProblems() { + if (subProblemsBuilder_ == null) { + if (resolutionCase_ == 7) { + return (com.authzed.api.v1.CheckDebugTrace.SubProblems) resolution_; + } + return com.authzed.api.v1.CheckDebugTrace.SubProblems.getDefaultInstance(); + } else { + if (resolutionCase_ == 7) { + return subProblemsBuilder_.getMessage(); + } + return com.authzed.api.v1.CheckDebugTrace.SubProblems.getDefaultInstance(); + } + } + /** + *
+     * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+     * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + */ + public Builder setSubProblems(com.authzed.api.v1.CheckDebugTrace.SubProblems value) { + if (subProblemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resolution_ = value; + onChanged(); + } else { + subProblemsBuilder_.setMessage(value); + } + resolutionCase_ = 7; + return this; + } + /** + *
+     * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+     * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + */ + public Builder setSubProblems( + com.authzed.api.v1.CheckDebugTrace.SubProblems.Builder builderForValue) { + if (subProblemsBuilder_ == null) { + resolution_ = builderForValue.build(); + onChanged(); + } else { + subProblemsBuilder_.setMessage(builderForValue.build()); + } + resolutionCase_ = 7; + return this; + } + /** + *
+     * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+     * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + */ + public Builder mergeSubProblems(com.authzed.api.v1.CheckDebugTrace.SubProblems value) { + if (subProblemsBuilder_ == null) { + if (resolutionCase_ == 7 && + resolution_ != com.authzed.api.v1.CheckDebugTrace.SubProblems.getDefaultInstance()) { + resolution_ = com.authzed.api.v1.CheckDebugTrace.SubProblems.newBuilder((com.authzed.api.v1.CheckDebugTrace.SubProblems) resolution_) + .mergeFrom(value).buildPartial(); + } else { + resolution_ = value; + } + onChanged(); + } else { + if (resolutionCase_ == 7) { + subProblemsBuilder_.mergeFrom(value); + } else { + subProblemsBuilder_.setMessage(value); + } + } + resolutionCase_ = 7; + return this; + } + /** + *
+     * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+     * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + */ + public Builder clearSubProblems() { + if (subProblemsBuilder_ == null) { + if (resolutionCase_ == 7) { + resolutionCase_ = 0; + resolution_ = null; + onChanged(); + } + } else { + if (resolutionCase_ == 7) { + resolutionCase_ = 0; + resolution_ = null; + } + subProblemsBuilder_.clear(); + } + return this; + } + /** + *
+     * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+     * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + */ + public com.authzed.api.v1.CheckDebugTrace.SubProblems.Builder getSubProblemsBuilder() { + return getSubProblemsFieldBuilder().getBuilder(); + } + /** + *
+     * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+     * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + */ + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace.SubProblemsOrBuilder getSubProblemsOrBuilder() { + if ((resolutionCase_ == 7) && (subProblemsBuilder_ != null)) { + return subProblemsBuilder_.getMessageOrBuilder(); + } else { + if (resolutionCase_ == 7) { + return (com.authzed.api.v1.CheckDebugTrace.SubProblems) resolution_; + } + return com.authzed.api.v1.CheckDebugTrace.SubProblems.getDefaultInstance(); + } + } + /** + *
+     * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+     * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckDebugTrace.SubProblems, com.authzed.api.v1.CheckDebugTrace.SubProblems.Builder, com.authzed.api.v1.CheckDebugTrace.SubProblemsOrBuilder> + getSubProblemsFieldBuilder() { + if (subProblemsBuilder_ == null) { + if (!(resolutionCase_ == 7)) { + resolution_ = com.authzed.api.v1.CheckDebugTrace.SubProblems.getDefaultInstance(); + } + subProblemsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckDebugTrace.SubProblems, com.authzed.api.v1.CheckDebugTrace.SubProblems.Builder, com.authzed.api.v1.CheckDebugTrace.SubProblemsOrBuilder>( + (com.authzed.api.v1.CheckDebugTrace.SubProblems) resolution_, + getParentForChildren(), + isClean()); + resolution_ = null; + } + resolutionCase_ = 7; + onChanged(); + return subProblemsBuilder_; + } + @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.CheckDebugTrace) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.CheckDebugTrace) + private static final com.authzed.api.v1.CheckDebugTrace DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.CheckDebugTrace(); + } + + public static com.authzed.api.v1.CheckDebugTrace getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckDebugTrace 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.CheckDebugTrace getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/CheckDebugTraceOrBuilder.java b/generated/com/authzed/api/v1/CheckDebugTraceOrBuilder.java new file mode 100644 index 00000000..b5c10404 --- /dev/null +++ b/generated/com/authzed/api/v1/CheckDebugTraceOrBuilder.java @@ -0,0 +1,229 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/debug.proto + +package com.authzed.api.v1; + +public interface CheckDebugTraceOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.CheckDebugTrace) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * resource holds the resource on which the Check was performed.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+   * resource holds the resource on which the Check was performed.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + com.authzed.api.v1.ObjectReference getResource(); + /** + *
+   * resource holds the resource on which the Check was performed.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder(); + + /** + *
+   * permission holds the name of the permission or relation on which the Check was performed.
+   * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The permission. + */ + java.lang.String getPermission(); + /** + *
+   * permission holds the name of the permission or relation on which the Check was performed.
+   * 
+ * + * string permission = 2 [json_name = "permission"]; + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + *
+   * permission_type holds information indicating whether it was a permission or relation.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.PermissionType permission_type = 3 [json_name = "permissionType", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionType. + */ + int getPermissionTypeValue(); + /** + *
+   * permission_type holds information indicating whether it was a permission or relation.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.PermissionType permission_type = 3 [json_name = "permissionType", (.validate.rules) = { ... } + * @return The permissionType. + */ + com.authzed.api.v1.CheckDebugTrace.PermissionType getPermissionType(); + + /** + *
+   * subject holds the subject on which the Check was performed. This will be static across all calls within
+   * the same Check tree.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + boolean hasSubject(); + /** + *
+   * subject holds the subject on which the Check was performed. This will be static across all calls within
+   * the same Check tree.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + com.authzed.api.v1.SubjectReference getSubject(); + /** + *
+   * subject holds the subject on which the Check was performed. This will be static across all calls within
+   * the same Check tree.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder(); + + /** + *
+   * result holds the result of the Check call.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.Permissionship result = 5 [json_name = "result", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for result. + */ + int getResultValue(); + /** + *
+   * result holds the result of the Check call.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.Permissionship result = 5 [json_name = "result", (.validate.rules) = { ... } + * @return The result. + */ + com.authzed.api.v1.CheckDebugTrace.Permissionship getResult(); + + /** + *
+   * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+   * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + * @return Whether the caveatEvaluationInfo field is set. + */ + boolean hasCaveatEvaluationInfo(); + /** + *
+   * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+   * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + * @return The caveatEvaluationInfo. + */ + com.authzed.api.v1.CaveatEvalInfo getCaveatEvaluationInfo(); + /** + *
+   * caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+   * 
+ * + * .authzed.api.v1.CaveatEvalInfo caveat_evaluation_info = 8 [json_name = "caveatEvaluationInfo"]; + */ + com.authzed.api.v1.CaveatEvalInfoOrBuilder getCaveatEvaluationInfoOrBuilder(); + + /** + *
+   * duration holds the time spent executing this Check operation.
+   * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + * @return Whether the duration field is set. + */ + boolean hasDuration(); + /** + *
+   * duration holds the time spent executing this Check operation.
+   * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + * @return The duration. + */ + com.google.protobuf.Duration getDuration(); + /** + *
+   * duration holds the time spent executing this Check operation.
+   * 
+ * + * .google.protobuf.Duration duration = 9 [json_name = "duration"]; + */ + com.google.protobuf.DurationOrBuilder getDurationOrBuilder(); + + /** + *
+   * was_cached_result, if true, indicates that the result was found in the cache and returned directly.
+   * 
+ * + * bool was_cached_result = 6 [json_name = "wasCachedResult"]; + * @return Whether the wasCachedResult field is set. + */ + boolean hasWasCachedResult(); + /** + *
+   * was_cached_result, if true, indicates that the result was found in the cache and returned directly.
+   * 
+ * + * bool was_cached_result = 6 [json_name = "wasCachedResult"]; + * @return The wasCachedResult. + */ + boolean getWasCachedResult(); + + /** + *
+   * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+   * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + * @return Whether the subProblems field is set. + */ + boolean hasSubProblems(); + /** + *
+   * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+   * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + * @return The subProblems. + */ + com.authzed.api.v1.CheckDebugTrace.SubProblems getSubProblems(); + /** + *
+   * sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+   * and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace.SubProblems sub_problems = 7 [json_name = "subProblems"]; + */ + com.authzed.api.v1.CheckDebugTrace.SubProblemsOrBuilder getSubProblemsOrBuilder(); + + public com.authzed.api.v1.CheckDebugTrace.ResolutionCase getResolutionCase(); +} diff --git a/generated/com/authzed/api/v1/CheckPermissionRequest.java b/generated/com/authzed/api/v1/CheckPermissionRequest.java new file mode 100644 index 00000000..c0152c41 --- /dev/null +++ b/generated/com/authzed/api/v1/CheckPermissionRequest.java @@ -0,0 +1,1548 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * CheckPermissionRequest issues a check on whether a subject has a permission
+ * or is a member of a relation, on a specific resource.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.CheckPermissionRequest} + */ +public final class CheckPermissionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.CheckPermissionRequest) + CheckPermissionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CheckPermissionRequest.newBuilder() to construct. + private CheckPermissionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CheckPermissionRequest() { + permission_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CheckPermissionRequest(); + } + + @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.PermissionService.internal_static_authzed_api_v1_CheckPermissionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckPermissionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckPermissionRequest.class, com.authzed.api.v1.CheckPermissionRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int RESOURCE_FIELD_NUMBER = 2; + private com.authzed.api.v1.ObjectReference resource_; + /** + *
+   * resource is the resource on which to check the permission or relation.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+   * resource is the resource on which to check the permission or relation.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getResource() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + /** + *
+   * resource is the resource on which to check the permission or relation.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + + public static final int PERMISSION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object permission_ = ""; + /** + *
+   * permission is the name of the permission (or relation) on which to execute
+   * the check.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + *
+   * permission is the name of the permission (or relation) on which to execute
+   * the check.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_FIELD_NUMBER = 4; + private com.authzed.api.v1.SubjectReference subject_; + /** + *
+   * subject is the subject that will be checked for the permission or relation.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + @java.lang.Override + public boolean hasSubject() { + return subject_ != null; + } + /** + *
+   * subject is the subject that will be checked for the permission or relation.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReference getSubject() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + /** + *
+   * subject is the subject that will be checked for the permission or relation.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + + public static final int CONTEXT_FIELD_NUMBER = 5; + private com.google.protobuf.Struct context_; + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.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 named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getContextOrBuilder() { + return context_ == null ? com.google.protobuf.Struct.getDefaultInstance() : context_; + } + + public static final int WITH_TRACING_FIELD_NUMBER = 6; + private boolean withTracing_ = false; + /** + *
+   * with_tracing, if true, indicates that the response should include a debug trace.
+   * This can be useful for debugging and performance analysis, but adds a small amount
+   * of compute overhead to the request.
+   * 
+ * + * bool with_tracing = 6 [json_name = "withTracing"]; + * @return The withTracing. + */ + @java.lang.Override + public boolean getWithTracing() { + return withTracing_; + } + + 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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + if (resource_ != null) { + output.writeMessage(2, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, permission_); + } + if (subject_ != null) { + output.writeMessage(4, getSubject()); + } + if (context_ != null) { + output.writeMessage(5, getContext()); + } + if (withTracing_ != false) { + output.writeBool(6, withTracing_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, permission_); + } + if (subject_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getSubject()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getContext()); + } + if (withTracing_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, withTracing_); + } + 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.CheckPermissionRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.CheckPermissionRequest other = (com.authzed.api.v1.CheckPermissionRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (!getPermission() + .equals(other.getPermission())) return false; + if (hasSubject() != other.hasSubject()) return false; + if (hasSubject()) { + if (!getSubject() + .equals(other.getSubject())) return false; + } + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (getWithTracing() + != other.getWithTracing()) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + if (hasSubject()) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().hashCode(); + } + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + hash = (37 * hash) + WITH_TRACING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithTracing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.CheckPermissionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckPermissionRequest 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.CheckPermissionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckPermissionRequest 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.CheckPermissionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckPermissionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.CheckPermissionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckPermissionRequest 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.CheckPermissionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckPermissionRequest 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.CheckPermissionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckPermissionRequest 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.CheckPermissionRequest 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; + } + /** + *
+   * CheckPermissionRequest issues a check on whether a subject has a permission
+   * or is a member of a relation, on a specific resource.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.CheckPermissionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.CheckPermissionRequest) + com.authzed.api.v1.CheckPermissionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckPermissionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckPermissionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckPermissionRequest.class, com.authzed.api.v1.CheckPermissionRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.CheckPermissionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + permission_ = ""; + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + withTracing_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckPermissionRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.CheckPermissionRequest getDefaultInstanceForType() { + return com.authzed.api.v1.CheckPermissionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.CheckPermissionRequest build() { + com.authzed.api.v1.CheckPermissionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.CheckPermissionRequest buildPartial() { + com.authzed.api.v1.CheckPermissionRequest result = new com.authzed.api.v1.CheckPermissionRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.CheckPermissionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resource_ = resourceBuilder_ == null + ? resource_ + : resourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permission_ = permission_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.subject_ = subjectBuilder_ == null + ? subject_ + : subjectBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.context_ = contextBuilder_ == null + ? context_ + : contextBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.withTracing_ = withTracing_; + } + } + + @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.CheckPermissionRequest) { + return mergeFrom((com.authzed.api.v1.CheckPermissionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.CheckPermissionRequest other) { + if (other == com.authzed.api.v1.CheckPermissionRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasSubject()) { + mergeSubject(other.getSubject()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (other.getWithTracing() != false) { + setWithTracing(other.getWithTracing()); + } + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getResourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + permission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getSubjectFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getContextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + withTracing_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private com.authzed.api.v1.ObjectReference resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> resourceBuilder_; + /** + *
+     * resource is the resource on which to check the permission or relation.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * resource is the resource on which to check the permission or relation.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + public com.authzed.api.v1.ObjectReference getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+     * resource is the resource on which to check the permission or relation.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + } else { + resourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource on which to check the permission or relation.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource( + com.authzed.api.v1.ObjectReference.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource on which to check the permission or relation.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder mergeResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + resource_ != null && + resource_ != com.authzed.api.v1.ObjectReference.getDefaultInstance()) { + getResourceBuilder().mergeFrom(value); + } else { + resource_ = value; + } + } else { + resourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource on which to check the permission or relation.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder clearResource() { + bitField0_ = (bitField0_ & ~0x00000002); + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * resource is the resource on which to check the permission or relation.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReference.Builder getResourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+     * resource is the resource on which to check the permission or relation.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + } + /** + *
+     * resource is the resource on which to check the permission or relation.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private java.lang.Object permission_ = ""; + /** + *
+     * permission is the name of the permission (or relation) on which to execute
+     * the check.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * permission is the name of the permission (or relation) on which to execute
+     * the check.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * permission is the name of the permission (or relation) on which to execute
+     * the check.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * permission is the name of the permission (or relation) on which to execute
+     * the check.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermission() { + permission_ = getDefaultInstance().getPermission(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * permission is the name of the permission (or relation) on which to execute
+     * the check.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.authzed.api.v1.SubjectReference subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> subjectBuilder_; + /** + *
+     * subject is the subject that will be checked for the permission or relation.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + public boolean hasSubject() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * subject is the subject that will be checked for the permission or relation.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + public com.authzed.api.v1.SubjectReference getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } else { + return subjectBuilder_.getMessage(); + } + } + /** + *
+     * subject is the subject that will be checked for the permission or relation.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subject_ = value; + } else { + subjectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject is the subject that will be checked for the permission or relation.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject( + com.authzed.api.v1.SubjectReference.Builder builderForValue) { + if (subjectBuilder_ == null) { + subject_ = builderForValue.build(); + } else { + subjectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject is the subject that will be checked for the permission or relation.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder mergeSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + subject_ != null && + subject_ != com.authzed.api.v1.SubjectReference.getDefaultInstance()) { + getSubjectBuilder().mergeFrom(value); + } else { + subject_ = value; + } + } else { + subjectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject is the subject that will be checked for the permission or relation.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder clearSubject() { + bitField0_ = (bitField0_ & ~0x00000008); + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * subject is the subject that will be checked for the permission or relation.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReference.Builder getSubjectBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubjectFieldBuilder().getBuilder(); + } + /** + *
+     * subject is the subject that will be checked for the permission or relation.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null ? + com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + } + /** + *
+     * subject is the subject that will be checked for the permission or relation.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder>( + getSubject(), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + 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 named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.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 named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.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_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder setContext( + com.google.protobuf.Struct.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder mergeContext(com.google.protobuf.Struct value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + context_ != null && + context_ != com.google.protobuf.Struct.getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000010); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + public com.google.protobuf.Struct.Builder getContextBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.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 named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.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_; + } + + private boolean withTracing_ ; + /** + *
+     * with_tracing, if true, indicates that the response should include a debug trace.
+     * This can be useful for debugging and performance analysis, but adds a small amount
+     * of compute overhead to the request.
+     * 
+ * + * bool with_tracing = 6 [json_name = "withTracing"]; + * @return The withTracing. + */ + @java.lang.Override + public boolean getWithTracing() { + return withTracing_; + } + /** + *
+     * with_tracing, if true, indicates that the response should include a debug trace.
+     * This can be useful for debugging and performance analysis, but adds a small amount
+     * of compute overhead to the request.
+     * 
+ * + * bool with_tracing = 6 [json_name = "withTracing"]; + * @param value The withTracing to set. + * @return This builder for chaining. + */ + public Builder setWithTracing(boolean value) { + + withTracing_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * with_tracing, if true, indicates that the response should include a debug trace.
+     * This can be useful for debugging and performance analysis, but adds a small amount
+     * of compute overhead to the request.
+     * 
+ * + * bool with_tracing = 6 [json_name = "withTracing"]; + * @return This builder for chaining. + */ + public Builder clearWithTracing() { + bitField0_ = (bitField0_ & ~0x00000020); + withTracing_ = false; + 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.CheckPermissionRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.CheckPermissionRequest) + private static final com.authzed.api.v1.CheckPermissionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.CheckPermissionRequest(); + } + + public static com.authzed.api.v1.CheckPermissionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckPermissionRequest 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.CheckPermissionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/CheckPermissionRequestOrBuilder.java b/generated/com/authzed/api/v1/CheckPermissionRequestOrBuilder.java new file mode 100644 index 00000000..fe050c0a --- /dev/null +++ b/generated/com/authzed/api/v1/CheckPermissionRequestOrBuilder.java @@ -0,0 +1,139 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface CheckPermissionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.CheckPermissionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + *
+   * resource is the resource on which to check the permission or relation.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+   * resource is the resource on which to check the permission or relation.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + com.authzed.api.v1.ObjectReference getResource(); + /** + *
+   * resource is the resource on which to check the permission or relation.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder(); + + /** + *
+   * permission is the name of the permission (or relation) on which to execute
+   * the check.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + java.lang.String getPermission(); + /** + *
+   * permission is the name of the permission (or relation) on which to execute
+   * the check.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + *
+   * subject is the subject that will be checked for the permission or relation.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + boolean hasSubject(); + /** + *
+   * subject is the subject that will be checked for the permission or relation.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + com.authzed.api.v1.SubjectReference getSubject(); + /** + *
+   * subject is the subject that will be checked for the permission or relation.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder(); + + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + * @return The context. + */ + com.google.protobuf.Struct getContext(); + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + com.google.protobuf.StructOrBuilder getContextOrBuilder(); + + /** + *
+   * with_tracing, if true, indicates that the response should include a debug trace.
+   * This can be useful for debugging and performance analysis, but adds a small amount
+   * of compute overhead to the request.
+   * 
+ * + * bool with_tracing = 6 [json_name = "withTracing"]; + * @return The withTracing. + */ + boolean getWithTracing(); +} diff --git a/generated/com/authzed/api/v1/CheckPermissionResponse.java b/generated/com/authzed/api/v1/CheckPermissionResponse.java new file mode 100644 index 00000000..eaa1d991 --- /dev/null +++ b/generated/com/authzed/api/v1/CheckPermissionResponse.java @@ -0,0 +1,1337 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.CheckPermissionResponse} + */ +public final class CheckPermissionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.CheckPermissionResponse) + CheckPermissionResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CheckPermissionResponse.newBuilder() to construct. + private CheckPermissionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CheckPermissionResponse() { + permissionship_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CheckPermissionResponse(); + } + + @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.PermissionService.internal_static_authzed_api_v1_CheckPermissionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckPermissionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckPermissionResponse.class, com.authzed.api.v1.CheckPermissionResponse.Builder.class); + } + + /** + * Protobuf enum {@code authzed.api.v1.CheckPermissionResponse.Permissionship} + */ + public enum Permissionship + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PERMISSIONSHIP_UNSPECIFIED = 0; + */ + PERMISSIONSHIP_UNSPECIFIED(0), + /** + * PERMISSIONSHIP_NO_PERMISSION = 1; + */ + PERMISSIONSHIP_NO_PERMISSION(1), + /** + * PERMISSIONSHIP_HAS_PERMISSION = 2; + */ + PERMISSIONSHIP_HAS_PERMISSION(2), + /** + * PERMISSIONSHIP_CONDITIONAL_PERMISSION = 3; + */ + PERMISSIONSHIP_CONDITIONAL_PERMISSION(3), + UNRECOGNIZED(-1), + ; + + /** + * PERMISSIONSHIP_UNSPECIFIED = 0; + */ + public static final int PERMISSIONSHIP_UNSPECIFIED_VALUE = 0; + /** + * PERMISSIONSHIP_NO_PERMISSION = 1; + */ + public static final int PERMISSIONSHIP_NO_PERMISSION_VALUE = 1; + /** + * PERMISSIONSHIP_HAS_PERMISSION = 2; + */ + public static final int PERMISSIONSHIP_HAS_PERMISSION_VALUE = 2; + /** + * PERMISSIONSHIP_CONDITIONAL_PERMISSION = 3; + */ + public static final int PERMISSIONSHIP_CONDITIONAL_PERMISSION_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 Permissionship 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 Permissionship forNumber(int value) { + switch (value) { + case 0: return PERMISSIONSHIP_UNSPECIFIED; + case 1: return PERMISSIONSHIP_NO_PERMISSION; + case 2: return PERMISSIONSHIP_HAS_PERMISSION; + case 3: return PERMISSIONSHIP_CONDITIONAL_PERMISSION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Permissionship> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Permissionship findValueByNumber(int number) { + return Permissionship.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.CheckPermissionResponse.getDescriptor().getEnumTypes().get(0); + } + + private static final Permissionship[] VALUES = values(); + + public static Permissionship 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 Permissionship(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v1.CheckPermissionResponse.Permissionship) + } + + public static final int CHECKED_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken checkedAt_; + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return Whether the checkedAt field is set. + */ + @java.lang.Override + public boolean hasCheckedAt() { + return checkedAt_ != null; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return The checkedAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getCheckedAt() { + return checkedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getCheckedAtOrBuilder() { + return checkedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } + + public static final int PERMISSIONSHIP_FIELD_NUMBER = 2; + private int permissionship_ = 0; + /** + *
+   * Permissionship communicates whether or not the subject has the requested
+   * permission or has a relationship with the given resource, over the given
+   * relation.
+   * This value will be authzed.api.v1.PERMISSIONSHIP_HAS_PERMISSION if the
+   * requested subject is a member of the computed permission set or there
+   * exists a relationship with the requested relation from the given resource
+   * to the given subject.
+   * 
+ * + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + *
+   * Permissionship communicates whether or not the subject has the requested
+   * permission or has a relationship with the given resource, over the given
+   * relation.
+   * This value will be authzed.api.v1.PERMISSIONSHIP_HAS_PERMISSION if the
+   * requested subject is a member of the computed permission set or there
+   * exists a relationship with the requested relation from the given resource
+   * to the given subject.
+   * 
+ * + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + @java.lang.Override public com.authzed.api.v1.CheckPermissionResponse.Permissionship getPermissionship() { + com.authzed.api.v1.CheckPermissionResponse.Permissionship result = com.authzed.api.v1.CheckPermissionResponse.Permissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.CheckPermissionResponse.Permissionship.UNRECOGNIZED : result; + } + + public static final int PARTIAL_CAVEAT_INFO_FIELD_NUMBER = 3; + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + @java.lang.Override + public boolean hasPartialCaveatInfo() { + return partialCaveatInfo_ != null; + } + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + + public static final int DEBUG_TRACE_FIELD_NUMBER = 4; + private com.authzed.api.v1.DebugInformation debugTrace_; + /** + *
+   * debug_trace is the debugging trace of this check, if requested.
+   * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + * @return Whether the debugTrace field is set. + */ + @java.lang.Override + public boolean hasDebugTrace() { + return debugTrace_ != null; + } + /** + *
+   * debug_trace is the debugging trace of this check, if requested.
+   * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + * @return The debugTrace. + */ + @java.lang.Override + public com.authzed.api.v1.DebugInformation getDebugTrace() { + return debugTrace_ == null ? com.authzed.api.v1.DebugInformation.getDefaultInstance() : debugTrace_; + } + /** + *
+   * debug_trace is the debugging trace of this check, if requested.
+   * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + */ + @java.lang.Override + public com.authzed.api.v1.DebugInformationOrBuilder getDebugTraceOrBuilder() { + return debugTrace_ == null ? com.authzed.api.v1.DebugInformation.getDefaultInstance() : debugTrace_; + } + + 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 (checkedAt_ != null) { + output.writeMessage(1, getCheckedAt()); + } + if (permissionship_ != com.authzed.api.v1.CheckPermissionResponse.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + output.writeEnum(2, permissionship_); + } + if (partialCaveatInfo_ != null) { + output.writeMessage(3, getPartialCaveatInfo()); + } + if (debugTrace_ != null) { + output.writeMessage(4, getDebugTrace()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (checkedAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCheckedAt()); + } + if (permissionship_ != com.authzed.api.v1.CheckPermissionResponse.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, permissionship_); + } + if (partialCaveatInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPartialCaveatInfo()); + } + if (debugTrace_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getDebugTrace()); + } + 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.CheckPermissionResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.CheckPermissionResponse other = (com.authzed.api.v1.CheckPermissionResponse) obj; + + if (hasCheckedAt() != other.hasCheckedAt()) return false; + if (hasCheckedAt()) { + if (!getCheckedAt() + .equals(other.getCheckedAt())) return false; + } + if (permissionship_ != other.permissionship_) return false; + if (hasPartialCaveatInfo() != other.hasPartialCaveatInfo()) return false; + if (hasPartialCaveatInfo()) { + if (!getPartialCaveatInfo() + .equals(other.getPartialCaveatInfo())) return false; + } + if (hasDebugTrace() != other.hasDebugTrace()) return false; + if (hasDebugTrace()) { + if (!getDebugTrace() + .equals(other.getDebugTrace())) 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 (hasCheckedAt()) { + hash = (37 * hash) + CHECKED_AT_FIELD_NUMBER; + hash = (53 * hash) + getCheckedAt().hashCode(); + } + hash = (37 * hash) + PERMISSIONSHIP_FIELD_NUMBER; + hash = (53 * hash) + permissionship_; + if (hasPartialCaveatInfo()) { + hash = (37 * hash) + PARTIAL_CAVEAT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPartialCaveatInfo().hashCode(); + } + if (hasDebugTrace()) { + hash = (37 * hash) + DEBUG_TRACE_FIELD_NUMBER; + hash = (53 * hash) + getDebugTrace().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.CheckPermissionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckPermissionResponse 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.CheckPermissionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckPermissionResponse 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.CheckPermissionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.CheckPermissionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.CheckPermissionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckPermissionResponse 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.CheckPermissionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckPermissionResponse 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.CheckPermissionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.CheckPermissionResponse 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.CheckPermissionResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.CheckPermissionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.CheckPermissionResponse) + com.authzed.api.v1.CheckPermissionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckPermissionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckPermissionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.CheckPermissionResponse.class, com.authzed.api.v1.CheckPermissionResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.CheckPermissionResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + checkedAt_ = null; + if (checkedAtBuilder_ != null) { + checkedAtBuilder_.dispose(); + checkedAtBuilder_ = null; + } + permissionship_ = 0; + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + debugTrace_ = null; + if (debugTraceBuilder_ != null) { + debugTraceBuilder_.dispose(); + debugTraceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_CheckPermissionResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.CheckPermissionResponse getDefaultInstanceForType() { + return com.authzed.api.v1.CheckPermissionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.CheckPermissionResponse build() { + com.authzed.api.v1.CheckPermissionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.CheckPermissionResponse buildPartial() { + com.authzed.api.v1.CheckPermissionResponse result = new com.authzed.api.v1.CheckPermissionResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.CheckPermissionResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.checkedAt_ = checkedAtBuilder_ == null + ? checkedAt_ + : checkedAtBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.permissionship_ = permissionship_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.partialCaveatInfo_ = partialCaveatInfoBuilder_ == null + ? partialCaveatInfo_ + : partialCaveatInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.debugTrace_ = debugTraceBuilder_ == null + ? debugTrace_ + : debugTraceBuilder_.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.CheckPermissionResponse) { + return mergeFrom((com.authzed.api.v1.CheckPermissionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.CheckPermissionResponse other) { + if (other == com.authzed.api.v1.CheckPermissionResponse.getDefaultInstance()) return this; + if (other.hasCheckedAt()) { + mergeCheckedAt(other.getCheckedAt()); + } + if (other.permissionship_ != 0) { + setPermissionshipValue(other.getPermissionshipValue()); + } + if (other.hasPartialCaveatInfo()) { + mergePartialCaveatInfo(other.getPartialCaveatInfo()); + } + if (other.hasDebugTrace()) { + mergeDebugTrace(other.getDebugTrace()); + } + 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( + getCheckedAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + permissionship_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getPartialCaveatInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getDebugTraceFieldBuilder().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.ZedToken checkedAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> checkedAtBuilder_; + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return Whether the checkedAt field is set. + */ + public boolean hasCheckedAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return The checkedAt. + */ + public com.authzed.api.v1.ZedToken getCheckedAt() { + if (checkedAtBuilder_ == null) { + return checkedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } else { + return checkedAtBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder setCheckedAt(com.authzed.api.v1.ZedToken value) { + if (checkedAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + checkedAt_ = value; + } else { + checkedAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder setCheckedAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (checkedAtBuilder_ == null) { + checkedAt_ = builderForValue.build(); + } else { + checkedAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder mergeCheckedAt(com.authzed.api.v1.ZedToken value) { + if (checkedAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + checkedAt_ != null && + checkedAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getCheckedAtBuilder().mergeFrom(value); + } else { + checkedAt_ = value; + } + } else { + checkedAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public Builder clearCheckedAt() { + bitField0_ = (bitField0_ & ~0x00000001); + checkedAt_ = null; + if (checkedAtBuilder_ != null) { + checkedAtBuilder_.dispose(); + checkedAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedToken.Builder getCheckedAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCheckedAtFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedTokenOrBuilder getCheckedAtOrBuilder() { + if (checkedAtBuilder_ != null) { + return checkedAtBuilder_.getMessageOrBuilder(); + } else { + return checkedAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : checkedAt_; + } + } + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getCheckedAtFieldBuilder() { + if (checkedAtBuilder_ == null) { + checkedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getCheckedAt(), + getParentForChildren(), + isClean()); + checkedAt_ = null; + } + return checkedAtBuilder_; + } + + private int permissionship_ = 0; + /** + *
+     * Permissionship communicates whether or not the subject has the requested
+     * permission or has a relationship with the given resource, over the given
+     * relation.
+     * This value will be authzed.api.v1.PERMISSIONSHIP_HAS_PERMISSION if the
+     * requested subject is a member of the computed permission set or there
+     * exists a relationship with the requested relation from the given resource
+     * to the given subject.
+     * 
+ * + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + *
+     * Permissionship communicates whether or not the subject has the requested
+     * permission or has a relationship with the given resource, over the given
+     * relation.
+     * This value will be authzed.api.v1.PERMISSIONSHIP_HAS_PERMISSION if the
+     * requested subject is a member of the computed permission set or there
+     * exists a relationship with the requested relation from the given resource
+     * to the given subject.
+     * 
+ * + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @param value The enum numeric value on the wire for permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionshipValue(int value) { + permissionship_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Permissionship communicates whether or not the subject has the requested
+     * permission or has a relationship with the given resource, over the given
+     * relation.
+     * This value will be authzed.api.v1.PERMISSIONSHIP_HAS_PERMISSION if the
+     * requested subject is a member of the computed permission set or there
+     * exists a relationship with the requested relation from the given resource
+     * to the given subject.
+     * 
+ * + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + @java.lang.Override + public com.authzed.api.v1.CheckPermissionResponse.Permissionship getPermissionship() { + com.authzed.api.v1.CheckPermissionResponse.Permissionship result = com.authzed.api.v1.CheckPermissionResponse.Permissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.CheckPermissionResponse.Permissionship.UNRECOGNIZED : result; + } + /** + *
+     * Permissionship communicates whether or not the subject has the requested
+     * permission or has a relationship with the given resource, over the given
+     * relation.
+     * This value will be authzed.api.v1.PERMISSIONSHIP_HAS_PERMISSION if the
+     * requested subject is a member of the computed permission set or there
+     * exists a relationship with the requested relation from the given resource
+     * to the given subject.
+     * 
+ * + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @param value The permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionship(com.authzed.api.v1.CheckPermissionResponse.Permissionship value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + permissionship_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Permissionship communicates whether or not the subject has the requested
+     * permission or has a relationship with the given resource, over the given
+     * relation.
+     * This value will be authzed.api.v1.PERMISSIONSHIP_HAS_PERMISSION if the
+     * requested subject is a member of the computed permission set or there
+     * exists a relationship with the requested relation from the given resource
+     * to the given subject.
+     * 
+ * + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermissionship() { + bitField0_ = (bitField0_ & ~0x00000002); + permissionship_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> partialCaveatInfoBuilder_; + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + public boolean hasPartialCaveatInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + if (partialCaveatInfoBuilder_ == null) { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } else { + return partialCaveatInfoBuilder_.getMessage(); + } + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder setPartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partialCaveatInfo_ = value; + } else { + partialCaveatInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder setPartialCaveatInfo( + com.authzed.api.v1.PartialCaveatInfo.Builder builderForValue) { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfo_ = builderForValue.build(); + } else { + partialCaveatInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder mergePartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + partialCaveatInfo_ != null && + partialCaveatInfo_ != com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance()) { + getPartialCaveatInfoBuilder().mergeFrom(value); + } else { + partialCaveatInfo_ = value; + } + } else { + partialCaveatInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder clearPartialCaveatInfo() { + bitField0_ = (bitField0_ & ~0x00000004); + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PartialCaveatInfo.Builder getPartialCaveatInfoBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPartialCaveatInfoFieldBuilder().getBuilder(); + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + if (partialCaveatInfoBuilder_ != null) { + return partialCaveatInfoBuilder_.getMessageOrBuilder(); + } else { + return partialCaveatInfo_ == null ? + com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> + getPartialCaveatInfoFieldBuilder() { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder>( + getPartialCaveatInfo(), + getParentForChildren(), + isClean()); + partialCaveatInfo_ = null; + } + return partialCaveatInfoBuilder_; + } + + private com.authzed.api.v1.DebugInformation debugTrace_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.DebugInformation, com.authzed.api.v1.DebugInformation.Builder, com.authzed.api.v1.DebugInformationOrBuilder> debugTraceBuilder_; + /** + *
+     * debug_trace is the debugging trace of this check, if requested.
+     * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + * @return Whether the debugTrace field is set. + */ + public boolean hasDebugTrace() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * debug_trace is the debugging trace of this check, if requested.
+     * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + * @return The debugTrace. + */ + public com.authzed.api.v1.DebugInformation getDebugTrace() { + if (debugTraceBuilder_ == null) { + return debugTrace_ == null ? com.authzed.api.v1.DebugInformation.getDefaultInstance() : debugTrace_; + } else { + return debugTraceBuilder_.getMessage(); + } + } + /** + *
+     * debug_trace is the debugging trace of this check, if requested.
+     * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + */ + public Builder setDebugTrace(com.authzed.api.v1.DebugInformation value) { + if (debugTraceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + debugTrace_ = value; + } else { + debugTraceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * debug_trace is the debugging trace of this check, if requested.
+     * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + */ + public Builder setDebugTrace( + com.authzed.api.v1.DebugInformation.Builder builderForValue) { + if (debugTraceBuilder_ == null) { + debugTrace_ = builderForValue.build(); + } else { + debugTraceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * debug_trace is the debugging trace of this check, if requested.
+     * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + */ + public Builder mergeDebugTrace(com.authzed.api.v1.DebugInformation value) { + if (debugTraceBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + debugTrace_ != null && + debugTrace_ != com.authzed.api.v1.DebugInformation.getDefaultInstance()) { + getDebugTraceBuilder().mergeFrom(value); + } else { + debugTrace_ = value; + } + } else { + debugTraceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * debug_trace is the debugging trace of this check, if requested.
+     * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + */ + public Builder clearDebugTrace() { + bitField0_ = (bitField0_ & ~0x00000008); + debugTrace_ = null; + if (debugTraceBuilder_ != null) { + debugTraceBuilder_.dispose(); + debugTraceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * debug_trace is the debugging trace of this check, if requested.
+     * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + */ + public com.authzed.api.v1.DebugInformation.Builder getDebugTraceBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDebugTraceFieldBuilder().getBuilder(); + } + /** + *
+     * debug_trace is the debugging trace of this check, if requested.
+     * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + */ + public com.authzed.api.v1.DebugInformationOrBuilder getDebugTraceOrBuilder() { + if (debugTraceBuilder_ != null) { + return debugTraceBuilder_.getMessageOrBuilder(); + } else { + return debugTrace_ == null ? + com.authzed.api.v1.DebugInformation.getDefaultInstance() : debugTrace_; + } + } + /** + *
+     * debug_trace is the debugging trace of this check, if requested.
+     * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.DebugInformation, com.authzed.api.v1.DebugInformation.Builder, com.authzed.api.v1.DebugInformationOrBuilder> + getDebugTraceFieldBuilder() { + if (debugTraceBuilder_ == null) { + debugTraceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.DebugInformation, com.authzed.api.v1.DebugInformation.Builder, com.authzed.api.v1.DebugInformationOrBuilder>( + getDebugTrace(), + getParentForChildren(), + isClean()); + debugTrace_ = null; + } + return debugTraceBuilder_; + } + @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.CheckPermissionResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.CheckPermissionResponse) + private static final com.authzed.api.v1.CheckPermissionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.CheckPermissionResponse(); + } + + public static com.authzed.api.v1.CheckPermissionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckPermissionResponse 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.CheckPermissionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/CheckPermissionResponseOrBuilder.java b/generated/com/authzed/api/v1/CheckPermissionResponseOrBuilder.java new file mode 100644 index 00000000..f92e9208 --- /dev/null +++ b/generated/com/authzed/api/v1/CheckPermissionResponseOrBuilder.java @@ -0,0 +1,109 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface CheckPermissionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.CheckPermissionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return Whether the checkedAt field is set. + */ + boolean hasCheckedAt(); + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + * @return The checkedAt. + */ + com.authzed.api.v1.ZedToken getCheckedAt(); + /** + * .authzed.api.v1.ZedToken checked_at = 1 [json_name = "checkedAt", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ZedTokenOrBuilder getCheckedAtOrBuilder(); + + /** + *
+   * Permissionship communicates whether or not the subject has the requested
+   * permission or has a relationship with the given resource, over the given
+   * relation.
+   * This value will be authzed.api.v1.PERMISSIONSHIP_HAS_PERMISSION if the
+   * requested subject is a member of the computed permission set or there
+   * exists a relationship with the requested relation from the given resource
+   * to the given subject.
+   * 
+ * + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + int getPermissionshipValue(); + /** + *
+   * Permissionship communicates whether or not the subject has the requested
+   * permission or has a relationship with the given resource, over the given
+   * relation.
+   * This value will be authzed.api.v1.PERMISSIONSHIP_HAS_PERMISSION if the
+   * requested subject is a member of the computed permission set or there
+   * exists a relationship with the requested relation from the given resource
+   * to the given subject.
+   * 
+ * + * .authzed.api.v1.CheckPermissionResponse.Permissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + com.authzed.api.v1.CheckPermissionResponse.Permissionship getPermissionship(); + + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + boolean hasPartialCaveatInfo(); + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo(); + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder(); + + /** + *
+   * debug_trace is the debugging trace of this check, if requested.
+   * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + * @return Whether the debugTrace field is set. + */ + boolean hasDebugTrace(); + /** + *
+   * debug_trace is the debugging trace of this check, if requested.
+   * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + * @return The debugTrace. + */ + com.authzed.api.v1.DebugInformation getDebugTrace(); + /** + *
+   * debug_trace is the debugging trace of this check, if requested.
+   * 
+ * + * .authzed.api.v1.DebugInformation debug_trace = 4 [json_name = "debugTrace"]; + */ + com.authzed.api.v1.DebugInformationOrBuilder getDebugTraceOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/Consistency.java b/generated/com/authzed/api/v1/Consistency.java new file mode 100644 index 00000000..df23529e --- /dev/null +++ b/generated/com/authzed/api/v1/Consistency.java @@ -0,0 +1,1316 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * Consistency will define how a request is handled by the backend.
+ * By defining a consistency requirement, and a token at which those
+ * requirements should be applied, where applicable.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.Consistency} + */ +public final class Consistency extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.Consistency) + ConsistencyOrBuilder { +private static final long serialVersionUID = 0L; + // Use Consistency.newBuilder() to construct. + private Consistency(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Consistency() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Consistency(); + } + + @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.PermissionService.internal_static_authzed_api_v1_Consistency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_Consistency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.Consistency.class, com.authzed.api.v1.Consistency.Builder.class); + } + + private int requirementCase_ = 0; + private java.lang.Object requirement_; + public enum RequirementCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MINIMIZE_LATENCY(1), + AT_LEAST_AS_FRESH(2), + AT_EXACT_SNAPSHOT(3), + FULLY_CONSISTENT(4), + REQUIREMENT_NOT_SET(0); + private final int value; + private RequirementCase(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 RequirementCase valueOf(int value) { + return forNumber(value); + } + + public static RequirementCase forNumber(int value) { + switch (value) { + case 1: return MINIMIZE_LATENCY; + case 2: return AT_LEAST_AS_FRESH; + case 3: return AT_EXACT_SNAPSHOT; + case 4: return FULLY_CONSISTENT; + case 0: return REQUIREMENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public RequirementCase + getRequirementCase() { + return RequirementCase.forNumber( + requirementCase_); + } + + public static final int MINIMIZE_LATENCY_FIELD_NUMBER = 1; + /** + *
+   * minimize_latency indicates that the latency for the call should be
+   * minimized by having the system select the fastest snapshot available.
+   * 
+ * + * bool minimize_latency = 1 [json_name = "minimizeLatency", (.validate.rules) = { ... } + * @return Whether the minimizeLatency field is set. + */ + @java.lang.Override + public boolean hasMinimizeLatency() { + return requirementCase_ == 1; + } + /** + *
+   * minimize_latency indicates that the latency for the call should be
+   * minimized by having the system select the fastest snapshot available.
+   * 
+ * + * bool minimize_latency = 1 [json_name = "minimizeLatency", (.validate.rules) = { ... } + * @return The minimizeLatency. + */ + @java.lang.Override + public boolean getMinimizeLatency() { + if (requirementCase_ == 1) { + return (java.lang.Boolean) requirement_; + } + return false; + } + + public static final int AT_LEAST_AS_FRESH_FIELD_NUMBER = 2; + /** + *
+   * at_least_as_fresh indicates that all data used in the API call must be
+   * *at least as fresh* as that found in the ZedToken; more recent data might
+   * be used if available or faster.
+   * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + * @return Whether the atLeastAsFresh field is set. + */ + @java.lang.Override + public boolean hasAtLeastAsFresh() { + return requirementCase_ == 2; + } + /** + *
+   * at_least_as_fresh indicates that all data used in the API call must be
+   * *at least as fresh* as that found in the ZedToken; more recent data might
+   * be used if available or faster.
+   * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + * @return The atLeastAsFresh. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getAtLeastAsFresh() { + if (requirementCase_ == 2) { + return (com.authzed.api.v1.ZedToken) requirement_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + /** + *
+   * at_least_as_fresh indicates that all data used in the API call must be
+   * *at least as fresh* as that found in the ZedToken; more recent data might
+   * be used if available or faster.
+   * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getAtLeastAsFreshOrBuilder() { + if (requirementCase_ == 2) { + return (com.authzed.api.v1.ZedToken) requirement_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + + public static final int AT_EXACT_SNAPSHOT_FIELD_NUMBER = 3; + /** + *
+   * at_exact_snapshot indicates that all data used in the API call must be
+   * *at the given* snapshot in time; if the snapshot is no longer available,
+   * an error will be returned to the caller.
+   * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + * @return Whether the atExactSnapshot field is set. + */ + @java.lang.Override + public boolean hasAtExactSnapshot() { + return requirementCase_ == 3; + } + /** + *
+   * at_exact_snapshot indicates that all data used in the API call must be
+   * *at the given* snapshot in time; if the snapshot is no longer available,
+   * an error will be returned to the caller.
+   * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + * @return The atExactSnapshot. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getAtExactSnapshot() { + if (requirementCase_ == 3) { + return (com.authzed.api.v1.ZedToken) requirement_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + /** + *
+   * at_exact_snapshot indicates that all data used in the API call must be
+   * *at the given* snapshot in time; if the snapshot is no longer available,
+   * an error will be returned to the caller.
+   * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getAtExactSnapshotOrBuilder() { + if (requirementCase_ == 3) { + return (com.authzed.api.v1.ZedToken) requirement_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + + public static final int FULLY_CONSISTENT_FIELD_NUMBER = 4; + /** + *
+   * fully_consistent indicates that all data used in the API call *must* be
+   * at the most recent snapshot found.
+   * NOTE: using this method can be *quite slow*, so unless there is a need to
+   * do so, it is recommended to use `at_least_as_fresh` with a stored
+   * ZedToken.
+   * 
+ * + * bool fully_consistent = 4 [json_name = "fullyConsistent", (.validate.rules) = { ... } + * @return Whether the fullyConsistent field is set. + */ + @java.lang.Override + public boolean hasFullyConsistent() { + return requirementCase_ == 4; + } + /** + *
+   * fully_consistent indicates that all data used in the API call *must* be
+   * at the most recent snapshot found.
+   * NOTE: using this method can be *quite slow*, so unless there is a need to
+   * do so, it is recommended to use `at_least_as_fresh` with a stored
+   * ZedToken.
+   * 
+ * + * bool fully_consistent = 4 [json_name = "fullyConsistent", (.validate.rules) = { ... } + * @return The fullyConsistent. + */ + @java.lang.Override + public boolean getFullyConsistent() { + if (requirementCase_ == 4) { + return (java.lang.Boolean) requirement_; + } + return false; + } + + 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 (requirementCase_ == 1) { + output.writeBool( + 1, (boolean)((java.lang.Boolean) requirement_)); + } + if (requirementCase_ == 2) { + output.writeMessage(2, (com.authzed.api.v1.ZedToken) requirement_); + } + if (requirementCase_ == 3) { + output.writeMessage(3, (com.authzed.api.v1.ZedToken) requirement_); + } + if (requirementCase_ == 4) { + output.writeBool( + 4, (boolean)((java.lang.Boolean) requirement_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (requirementCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 1, (boolean)((java.lang.Boolean) requirement_)); + } + if (requirementCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.authzed.api.v1.ZedToken) requirement_); + } + if (requirementCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.authzed.api.v1.ZedToken) requirement_); + } + if (requirementCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 4, (boolean)((java.lang.Boolean) requirement_)); + } + 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.Consistency)) { + return super.equals(obj); + } + com.authzed.api.v1.Consistency other = (com.authzed.api.v1.Consistency) obj; + + if (!getRequirementCase().equals(other.getRequirementCase())) return false; + switch (requirementCase_) { + case 1: + if (getMinimizeLatency() + != other.getMinimizeLatency()) return false; + break; + case 2: + if (!getAtLeastAsFresh() + .equals(other.getAtLeastAsFresh())) return false; + break; + case 3: + if (!getAtExactSnapshot() + .equals(other.getAtExactSnapshot())) return false; + break; + case 4: + if (getFullyConsistent() + != other.getFullyConsistent()) 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(); + switch (requirementCase_) { + case 1: + hash = (37 * hash) + MINIMIZE_LATENCY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMinimizeLatency()); + break; + case 2: + hash = (37 * hash) + AT_LEAST_AS_FRESH_FIELD_NUMBER; + hash = (53 * hash) + getAtLeastAsFresh().hashCode(); + break; + case 3: + hash = (37 * hash) + AT_EXACT_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getAtExactSnapshot().hashCode(); + break; + case 4: + hash = (37 * hash) + FULLY_CONSISTENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFullyConsistent()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.Consistency parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.Consistency 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.Consistency parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.Consistency 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.Consistency parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.Consistency parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.Consistency parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.Consistency 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.Consistency parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.Consistency 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.Consistency parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.Consistency 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.Consistency 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; + } + /** + *
+   * Consistency will define how a request is handled by the backend.
+   * By defining a consistency requirement, and a token at which those
+   * requirements should be applied, where applicable.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.Consistency} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.Consistency) + com.authzed.api.v1.ConsistencyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_Consistency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_Consistency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.Consistency.class, com.authzed.api.v1.Consistency.Builder.class); + } + + // Construct using com.authzed.api.v1.Consistency.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (atLeastAsFreshBuilder_ != null) { + atLeastAsFreshBuilder_.clear(); + } + if (atExactSnapshotBuilder_ != null) { + atExactSnapshotBuilder_.clear(); + } + requirementCase_ = 0; + requirement_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_Consistency_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.Consistency getDefaultInstanceForType() { + return com.authzed.api.v1.Consistency.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.Consistency build() { + com.authzed.api.v1.Consistency result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.Consistency buildPartial() { + com.authzed.api.v1.Consistency result = new com.authzed.api.v1.Consistency(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.Consistency result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.authzed.api.v1.Consistency result) { + result.requirementCase_ = requirementCase_; + result.requirement_ = this.requirement_; + if (requirementCase_ == 2 && + atLeastAsFreshBuilder_ != null) { + result.requirement_ = atLeastAsFreshBuilder_.build(); + } + if (requirementCase_ == 3 && + atExactSnapshotBuilder_ != null) { + result.requirement_ = atExactSnapshotBuilder_.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.Consistency) { + return mergeFrom((com.authzed.api.v1.Consistency)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.Consistency other) { + if (other == com.authzed.api.v1.Consistency.getDefaultInstance()) return this; + switch (other.getRequirementCase()) { + case MINIMIZE_LATENCY: { + setMinimizeLatency(other.getMinimizeLatency()); + break; + } + case AT_LEAST_AS_FRESH: { + mergeAtLeastAsFresh(other.getAtLeastAsFresh()); + break; + } + case AT_EXACT_SNAPSHOT: { + mergeAtExactSnapshot(other.getAtExactSnapshot()); + break; + } + case FULLY_CONSISTENT: { + setFullyConsistent(other.getFullyConsistent()); + break; + } + case REQUIREMENT_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 8: { + requirement_ = input.readBool(); + requirementCase_ = 1; + break; + } // case 8 + case 18: { + input.readMessage( + getAtLeastAsFreshFieldBuilder().getBuilder(), + extensionRegistry); + requirementCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getAtExactSnapshotFieldBuilder().getBuilder(), + extensionRegistry); + requirementCase_ = 3; + break; + } // case 26 + case 32: { + requirement_ = input.readBool(); + requirementCase_ = 4; + break; + } // case 32 + 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 requirementCase_ = 0; + private java.lang.Object requirement_; + public RequirementCase + getRequirementCase() { + return RequirementCase.forNumber( + requirementCase_); + } + + public Builder clearRequirement() { + requirementCase_ = 0; + requirement_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * minimize_latency indicates that the latency for the call should be
+     * minimized by having the system select the fastest snapshot available.
+     * 
+ * + * bool minimize_latency = 1 [json_name = "minimizeLatency", (.validate.rules) = { ... } + * @return Whether the minimizeLatency field is set. + */ + public boolean hasMinimizeLatency() { + return requirementCase_ == 1; + } + /** + *
+     * minimize_latency indicates that the latency for the call should be
+     * minimized by having the system select the fastest snapshot available.
+     * 
+ * + * bool minimize_latency = 1 [json_name = "minimizeLatency", (.validate.rules) = { ... } + * @return The minimizeLatency. + */ + public boolean getMinimizeLatency() { + if (requirementCase_ == 1) { + return (java.lang.Boolean) requirement_; + } + return false; + } + /** + *
+     * minimize_latency indicates that the latency for the call should be
+     * minimized by having the system select the fastest snapshot available.
+     * 
+ * + * bool minimize_latency = 1 [json_name = "minimizeLatency", (.validate.rules) = { ... } + * @param value The minimizeLatency to set. + * @return This builder for chaining. + */ + public Builder setMinimizeLatency(boolean value) { + + requirementCase_ = 1; + requirement_ = value; + onChanged(); + return this; + } + /** + *
+     * minimize_latency indicates that the latency for the call should be
+     * minimized by having the system select the fastest snapshot available.
+     * 
+ * + * bool minimize_latency = 1 [json_name = "minimizeLatency", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearMinimizeLatency() { + if (requirementCase_ == 1) { + requirementCase_ = 0; + requirement_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> atLeastAsFreshBuilder_; + /** + *
+     * at_least_as_fresh indicates that all data used in the API call must be
+     * *at least as fresh* as that found in the ZedToken; more recent data might
+     * be used if available or faster.
+     * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + * @return Whether the atLeastAsFresh field is set. + */ + @java.lang.Override + public boolean hasAtLeastAsFresh() { + return requirementCase_ == 2; + } + /** + *
+     * at_least_as_fresh indicates that all data used in the API call must be
+     * *at least as fresh* as that found in the ZedToken; more recent data might
+     * be used if available or faster.
+     * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + * @return The atLeastAsFresh. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getAtLeastAsFresh() { + if (atLeastAsFreshBuilder_ == null) { + if (requirementCase_ == 2) { + return (com.authzed.api.v1.ZedToken) requirement_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } else { + if (requirementCase_ == 2) { + return atLeastAsFreshBuilder_.getMessage(); + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + } + /** + *
+     * at_least_as_fresh indicates that all data used in the API call must be
+     * *at least as fresh* as that found in the ZedToken; more recent data might
+     * be used if available or faster.
+     * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + */ + public Builder setAtLeastAsFresh(com.authzed.api.v1.ZedToken value) { + if (atLeastAsFreshBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requirement_ = value; + onChanged(); + } else { + atLeastAsFreshBuilder_.setMessage(value); + } + requirementCase_ = 2; + return this; + } + /** + *
+     * at_least_as_fresh indicates that all data used in the API call must be
+     * *at least as fresh* as that found in the ZedToken; more recent data might
+     * be used if available or faster.
+     * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + */ + public Builder setAtLeastAsFresh( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (atLeastAsFreshBuilder_ == null) { + requirement_ = builderForValue.build(); + onChanged(); + } else { + atLeastAsFreshBuilder_.setMessage(builderForValue.build()); + } + requirementCase_ = 2; + return this; + } + /** + *
+     * at_least_as_fresh indicates that all data used in the API call must be
+     * *at least as fresh* as that found in the ZedToken; more recent data might
+     * be used if available or faster.
+     * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + */ + public Builder mergeAtLeastAsFresh(com.authzed.api.v1.ZedToken value) { + if (atLeastAsFreshBuilder_ == null) { + if (requirementCase_ == 2 && + requirement_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + requirement_ = com.authzed.api.v1.ZedToken.newBuilder((com.authzed.api.v1.ZedToken) requirement_) + .mergeFrom(value).buildPartial(); + } else { + requirement_ = value; + } + onChanged(); + } else { + if (requirementCase_ == 2) { + atLeastAsFreshBuilder_.mergeFrom(value); + } else { + atLeastAsFreshBuilder_.setMessage(value); + } + } + requirementCase_ = 2; + return this; + } + /** + *
+     * at_least_as_fresh indicates that all data used in the API call must be
+     * *at least as fresh* as that found in the ZedToken; more recent data might
+     * be used if available or faster.
+     * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + */ + public Builder clearAtLeastAsFresh() { + if (atLeastAsFreshBuilder_ == null) { + if (requirementCase_ == 2) { + requirementCase_ = 0; + requirement_ = null; + onChanged(); + } + } else { + if (requirementCase_ == 2) { + requirementCase_ = 0; + requirement_ = null; + } + atLeastAsFreshBuilder_.clear(); + } + return this; + } + /** + *
+     * at_least_as_fresh indicates that all data used in the API call must be
+     * *at least as fresh* as that found in the ZedToken; more recent data might
+     * be used if available or faster.
+     * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + */ + public com.authzed.api.v1.ZedToken.Builder getAtLeastAsFreshBuilder() { + return getAtLeastAsFreshFieldBuilder().getBuilder(); + } + /** + *
+     * at_least_as_fresh indicates that all data used in the API call must be
+     * *at least as fresh* as that found in the ZedToken; more recent data might
+     * be used if available or faster.
+     * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getAtLeastAsFreshOrBuilder() { + if ((requirementCase_ == 2) && (atLeastAsFreshBuilder_ != null)) { + return atLeastAsFreshBuilder_.getMessageOrBuilder(); + } else { + if (requirementCase_ == 2) { + return (com.authzed.api.v1.ZedToken) requirement_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + } + /** + *
+     * at_least_as_fresh indicates that all data used in the API call must be
+     * *at least as fresh* as that found in the ZedToken; more recent data might
+     * be used if available or faster.
+     * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getAtLeastAsFreshFieldBuilder() { + if (atLeastAsFreshBuilder_ == null) { + if (!(requirementCase_ == 2)) { + requirement_ = com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + atLeastAsFreshBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + (com.authzed.api.v1.ZedToken) requirement_, + getParentForChildren(), + isClean()); + requirement_ = null; + } + requirementCase_ = 2; + onChanged(); + return atLeastAsFreshBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> atExactSnapshotBuilder_; + /** + *
+     * at_exact_snapshot indicates that all data used in the API call must be
+     * *at the given* snapshot in time; if the snapshot is no longer available,
+     * an error will be returned to the caller.
+     * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + * @return Whether the atExactSnapshot field is set. + */ + @java.lang.Override + public boolean hasAtExactSnapshot() { + return requirementCase_ == 3; + } + /** + *
+     * at_exact_snapshot indicates that all data used in the API call must be
+     * *at the given* snapshot in time; if the snapshot is no longer available,
+     * an error will be returned to the caller.
+     * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + * @return The atExactSnapshot. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getAtExactSnapshot() { + if (atExactSnapshotBuilder_ == null) { + if (requirementCase_ == 3) { + return (com.authzed.api.v1.ZedToken) requirement_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } else { + if (requirementCase_ == 3) { + return atExactSnapshotBuilder_.getMessage(); + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + } + /** + *
+     * at_exact_snapshot indicates that all data used in the API call must be
+     * *at the given* snapshot in time; if the snapshot is no longer available,
+     * an error will be returned to the caller.
+     * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + */ + public Builder setAtExactSnapshot(com.authzed.api.v1.ZedToken value) { + if (atExactSnapshotBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requirement_ = value; + onChanged(); + } else { + atExactSnapshotBuilder_.setMessage(value); + } + requirementCase_ = 3; + return this; + } + /** + *
+     * at_exact_snapshot indicates that all data used in the API call must be
+     * *at the given* snapshot in time; if the snapshot is no longer available,
+     * an error will be returned to the caller.
+     * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + */ + public Builder setAtExactSnapshot( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (atExactSnapshotBuilder_ == null) { + requirement_ = builderForValue.build(); + onChanged(); + } else { + atExactSnapshotBuilder_.setMessage(builderForValue.build()); + } + requirementCase_ = 3; + return this; + } + /** + *
+     * at_exact_snapshot indicates that all data used in the API call must be
+     * *at the given* snapshot in time; if the snapshot is no longer available,
+     * an error will be returned to the caller.
+     * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + */ + public Builder mergeAtExactSnapshot(com.authzed.api.v1.ZedToken value) { + if (atExactSnapshotBuilder_ == null) { + if (requirementCase_ == 3 && + requirement_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + requirement_ = com.authzed.api.v1.ZedToken.newBuilder((com.authzed.api.v1.ZedToken) requirement_) + .mergeFrom(value).buildPartial(); + } else { + requirement_ = value; + } + onChanged(); + } else { + if (requirementCase_ == 3) { + atExactSnapshotBuilder_.mergeFrom(value); + } else { + atExactSnapshotBuilder_.setMessage(value); + } + } + requirementCase_ = 3; + return this; + } + /** + *
+     * at_exact_snapshot indicates that all data used in the API call must be
+     * *at the given* snapshot in time; if the snapshot is no longer available,
+     * an error will be returned to the caller.
+     * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + */ + public Builder clearAtExactSnapshot() { + if (atExactSnapshotBuilder_ == null) { + if (requirementCase_ == 3) { + requirementCase_ = 0; + requirement_ = null; + onChanged(); + } + } else { + if (requirementCase_ == 3) { + requirementCase_ = 0; + requirement_ = null; + } + atExactSnapshotBuilder_.clear(); + } + return this; + } + /** + *
+     * at_exact_snapshot indicates that all data used in the API call must be
+     * *at the given* snapshot in time; if the snapshot is no longer available,
+     * an error will be returned to the caller.
+     * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + */ + public com.authzed.api.v1.ZedToken.Builder getAtExactSnapshotBuilder() { + return getAtExactSnapshotFieldBuilder().getBuilder(); + } + /** + *
+     * at_exact_snapshot indicates that all data used in the API call must be
+     * *at the given* snapshot in time; if the snapshot is no longer available,
+     * an error will be returned to the caller.
+     * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getAtExactSnapshotOrBuilder() { + if ((requirementCase_ == 3) && (atExactSnapshotBuilder_ != null)) { + return atExactSnapshotBuilder_.getMessageOrBuilder(); + } else { + if (requirementCase_ == 3) { + return (com.authzed.api.v1.ZedToken) requirement_; + } + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + } + /** + *
+     * at_exact_snapshot indicates that all data used in the API call must be
+     * *at the given* snapshot in time; if the snapshot is no longer available,
+     * an error will be returned to the caller.
+     * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getAtExactSnapshotFieldBuilder() { + if (atExactSnapshotBuilder_ == null) { + if (!(requirementCase_ == 3)) { + requirement_ = com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + atExactSnapshotBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + (com.authzed.api.v1.ZedToken) requirement_, + getParentForChildren(), + isClean()); + requirement_ = null; + } + requirementCase_ = 3; + onChanged(); + return atExactSnapshotBuilder_; + } + + /** + *
+     * fully_consistent indicates that all data used in the API call *must* be
+     * at the most recent snapshot found.
+     * NOTE: using this method can be *quite slow*, so unless there is a need to
+     * do so, it is recommended to use `at_least_as_fresh` with a stored
+     * ZedToken.
+     * 
+ * + * bool fully_consistent = 4 [json_name = "fullyConsistent", (.validate.rules) = { ... } + * @return Whether the fullyConsistent field is set. + */ + public boolean hasFullyConsistent() { + return requirementCase_ == 4; + } + /** + *
+     * fully_consistent indicates that all data used in the API call *must* be
+     * at the most recent snapshot found.
+     * NOTE: using this method can be *quite slow*, so unless there is a need to
+     * do so, it is recommended to use `at_least_as_fresh` with a stored
+     * ZedToken.
+     * 
+ * + * bool fully_consistent = 4 [json_name = "fullyConsistent", (.validate.rules) = { ... } + * @return The fullyConsistent. + */ + public boolean getFullyConsistent() { + if (requirementCase_ == 4) { + return (java.lang.Boolean) requirement_; + } + return false; + } + /** + *
+     * fully_consistent indicates that all data used in the API call *must* be
+     * at the most recent snapshot found.
+     * NOTE: using this method can be *quite slow*, so unless there is a need to
+     * do so, it is recommended to use `at_least_as_fresh` with a stored
+     * ZedToken.
+     * 
+ * + * bool fully_consistent = 4 [json_name = "fullyConsistent", (.validate.rules) = { ... } + * @param value The fullyConsistent to set. + * @return This builder for chaining. + */ + public Builder setFullyConsistent(boolean value) { + + requirementCase_ = 4; + requirement_ = value; + onChanged(); + return this; + } + /** + *
+     * fully_consistent indicates that all data used in the API call *must* be
+     * at the most recent snapshot found.
+     * NOTE: using this method can be *quite slow*, so unless there is a need to
+     * do so, it is recommended to use `at_least_as_fresh` with a stored
+     * ZedToken.
+     * 
+ * + * bool fully_consistent = 4 [json_name = "fullyConsistent", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearFullyConsistent() { + if (requirementCase_ == 4) { + requirementCase_ = 0; + requirement_ = null; + 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.Consistency) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.Consistency) + private static final com.authzed.api.v1.Consistency DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.Consistency(); + } + + public static com.authzed.api.v1.Consistency getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Consistency 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.Consistency getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ConsistencyOrBuilder.java b/generated/com/authzed/api/v1/ConsistencyOrBuilder.java new file mode 100644 index 00000000..c832328b --- /dev/null +++ b/generated/com/authzed/api/v1/ConsistencyOrBuilder.java @@ -0,0 +1,125 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface ConsistencyOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.Consistency) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * minimize_latency indicates that the latency for the call should be
+   * minimized by having the system select the fastest snapshot available.
+   * 
+ * + * bool minimize_latency = 1 [json_name = "minimizeLatency", (.validate.rules) = { ... } + * @return Whether the minimizeLatency field is set. + */ + boolean hasMinimizeLatency(); + /** + *
+   * minimize_latency indicates that the latency for the call should be
+   * minimized by having the system select the fastest snapshot available.
+   * 
+ * + * bool minimize_latency = 1 [json_name = "minimizeLatency", (.validate.rules) = { ... } + * @return The minimizeLatency. + */ + boolean getMinimizeLatency(); + + /** + *
+   * at_least_as_fresh indicates that all data used in the API call must be
+   * *at least as fresh* as that found in the ZedToken; more recent data might
+   * be used if available or faster.
+   * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + * @return Whether the atLeastAsFresh field is set. + */ + boolean hasAtLeastAsFresh(); + /** + *
+   * at_least_as_fresh indicates that all data used in the API call must be
+   * *at least as fresh* as that found in the ZedToken; more recent data might
+   * be used if available or faster.
+   * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + * @return The atLeastAsFresh. + */ + com.authzed.api.v1.ZedToken getAtLeastAsFresh(); + /** + *
+   * at_least_as_fresh indicates that all data used in the API call must be
+   * *at least as fresh* as that found in the ZedToken; more recent data might
+   * be used if available or faster.
+   * 
+ * + * .authzed.api.v1.ZedToken at_least_as_fresh = 2 [json_name = "atLeastAsFresh"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getAtLeastAsFreshOrBuilder(); + + /** + *
+   * at_exact_snapshot indicates that all data used in the API call must be
+   * *at the given* snapshot in time; if the snapshot is no longer available,
+   * an error will be returned to the caller.
+   * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + * @return Whether the atExactSnapshot field is set. + */ + boolean hasAtExactSnapshot(); + /** + *
+   * at_exact_snapshot indicates that all data used in the API call must be
+   * *at the given* snapshot in time; if the snapshot is no longer available,
+   * an error will be returned to the caller.
+   * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + * @return The atExactSnapshot. + */ + com.authzed.api.v1.ZedToken getAtExactSnapshot(); + /** + *
+   * at_exact_snapshot indicates that all data used in the API call must be
+   * *at the given* snapshot in time; if the snapshot is no longer available,
+   * an error will be returned to the caller.
+   * 
+ * + * .authzed.api.v1.ZedToken at_exact_snapshot = 3 [json_name = "atExactSnapshot"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getAtExactSnapshotOrBuilder(); + + /** + *
+   * fully_consistent indicates that all data used in the API call *must* be
+   * at the most recent snapshot found.
+   * NOTE: using this method can be *quite slow*, so unless there is a need to
+   * do so, it is recommended to use `at_least_as_fresh` with a stored
+   * ZedToken.
+   * 
+ * + * bool fully_consistent = 4 [json_name = "fullyConsistent", (.validate.rules) = { ... } + * @return Whether the fullyConsistent field is set. + */ + boolean hasFullyConsistent(); + /** + *
+   * fully_consistent indicates that all data used in the API call *must* be
+   * at the most recent snapshot found.
+   * NOTE: using this method can be *quite slow*, so unless there is a need to
+   * do so, it is recommended to use `at_least_as_fresh` with a stored
+   * ZedToken.
+   * 
+ * + * bool fully_consistent = 4 [json_name = "fullyConsistent", (.validate.rules) = { ... } + * @return The fullyConsistent. + */ + boolean getFullyConsistent(); + + public com.authzed.api.v1.Consistency.RequirementCase getRequirementCase(); +} diff --git a/generated/com/authzed/api/v1/ContextualizedCaveat.java b/generated/com/authzed/api/v1/ContextualizedCaveat.java new file mode 100644 index 00000000..a4669890 --- /dev/null +++ b/generated/com/authzed/api/v1/ContextualizedCaveat.java @@ -0,0 +1,813 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * 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 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.ContextualizedCaveat.class, com.authzed.api.v1.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 [json_name = "caveatName", (.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 [json_name = "caveatName", (.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 [json_name = "context", (.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 [json_name = "context", (.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 [json_name = "context", (.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.ContextualizedCaveat)) { + return super.equals(obj); + } + com.authzed.api.v1.ContextualizedCaveat other = (com.authzed.api.v1.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.ContextualizedCaveat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.ContextualizedCaveat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.ContextualizedCaveat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.ContextualizedCaveat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.ContextualizedCaveat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.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.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.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.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.ContextualizedCaveat.class, com.authzed.api.v1.ContextualizedCaveat.Builder.class); + } + + // Construct using com.authzed.api.v1.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.ContextualizedCaveat getDefaultInstanceForType() { + return com.authzed.api.v1.ContextualizedCaveat.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ContextualizedCaveat build() { + com.authzed.api.v1.ContextualizedCaveat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ContextualizedCaveat buildPartial() { + com.authzed.api.v1.ContextualizedCaveat result = new com.authzed.api.v1.ContextualizedCaveat(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.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.ContextualizedCaveat) { + return mergeFrom((com.authzed.api.v1.ContextualizedCaveat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ContextualizedCaveat other) { + if (other == com.authzed.api.v1.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 [json_name = "caveatName", (.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 [json_name = "caveatName", (.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 [json_name = "caveatName", (.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 [json_name = "caveatName", (.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 [json_name = "caveatName", (.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 [json_name = "context", (.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 [json_name = "context", (.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 [json_name = "context", (.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 [json_name = "context", (.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 [json_name = "context", (.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 [json_name = "context", (.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 [json_name = "context", (.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 [json_name = "context", (.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 [json_name = "context", (.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.ContextualizedCaveat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ContextualizedCaveat(); + } + + public static com.authzed.api.v1.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.ContextualizedCaveat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ContextualizedCaveatOrBuilder.java b/generated/com/authzed/api/v1/ContextualizedCaveatOrBuilder.java new file mode 100644 index 00000000..71d0cf9f --- /dev/null +++ b/generated/com/authzed/api/v1/ContextualizedCaveatOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +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 [json_name = "caveatName", (.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 [json_name = "caveatName", (.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 [json_name = "context", (.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 [json_name = "context", (.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 [json_name = "context", (.validate.rules) = { ... } + */ + com.google.protobuf.StructOrBuilder getContextOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/Core.java b/generated/com/authzed/api/v1/Core.java new file mode 100644 index 00000000..17fa4a1d --- /dev/null +++ b/generated/com/authzed/api/v1/Core.java @@ -0,0 +1,221 @@ +// 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); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_Relationship_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_Relationship_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ContextualizedCaveat_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ContextualizedCaveat_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_SubjectReference_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_SubjectReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ObjectReference_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ObjectReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ZedToken_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ZedToken_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_Cursor_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_Cursor_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_RelationshipUpdate_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_RelationshipUpdate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_PermissionRelationshipTree_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_PermissionRelationshipTree_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_AlgebraicSubjectSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_AlgebraicSubjectSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_DirectSubjectSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_DirectSubjectSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_PartialCaveatInfo_descriptor; + 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\"\271\002\n\014Relationship\022E\n\010r" + + "esource\030\001 \001(\0132\037.authzed.api.v1.ObjectRef" + + "erenceB\010\372B\005\212\001\002\020\001R\010resource\022C\n\010relation\030\002" + + " \001(\tB\'\372B$r\"(@2\036^[a-z][a-z0-9_]{1,62}[a-z" + + "0-9]$R\010relation\022D\n\007subject\030\003 \001(\0132 .authz" + + "ed.api.v1.SubjectReferenceB\010\372B\005\212\001\002\020\001R\007su" + + "bject\022W\n\017optional_caveat\030\004 \001(\0132$.authzed" + + ".api.v1.ContextualizedCaveatB\010\372B\005\212\001\002\020\000R\016" + + "optionalCaveat\"\246\001\n\024ContextualizedCaveat\022" + + "Q\n\013caveat_name\030\001 \001(\tB0\372B-r+(\200\0012&^([a-zA-" + + "Z0-9_][a-zA-Z0-9/_|-]{0,127})$R\ncaveatNa" + + "me\022;\n\007context\030\002 \001(\0132\027.google.protobuf.St" + + "ructB\010\372B\005\212\001\002\020\000R\007context\"\256\001\n\020SubjectRefer" + + "ence\022A\n\006object\030\001 \001(\0132\037.authzed.api.v1.Ob" + + "jectReferenceB\010\372B\005\212\001\002\020\001R\006object\022W\n\021optio" + + "nal_relation\030\002 \001(\tB*\372B\'r%(@2!^([a-z][a-z" + + "0-9_]{1,62}[a-z0-9])?$R\020optionalRelation" + + "\"\304\001\n\017ObjectReference\022i\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]$R\nobj" + + "ectType\022F\n\tobject_id\030\002 \001(\tB)\372B&r$(\200\0102\037^(" + + "([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$R\010objectId\"" + + ")\n\010ZedToken\022\035\n\005token\030\001 \001(\tB\007\372B\004r\002 \001R\005tok" + + "en\"+\n\006Cursor\022!\n\005token\030\001 \001(\tB\013\372B\010r\006 \001(\200\240\006" + + "R\005token\"\241\002\n\022RelationshipUpdate\022V\n\toperat" + + "ion\030\001 \001(\0162,.authzed.api.v1.RelationshipU" + + "pdate.OperationB\n\372B\007\202\001\004\020\001 \000R\toperation\022J" + + "\n\014relationship\030\002 \001(\0132\034.authzed.api.v1.Re" + + "lationshipB\010\372B\005\212\001\002\020\001R\014relationship\"g\n\tOp" + + "eration\022\031\n\025OPERATION_UNSPECIFIED\020\000\022\024\n\020OP" + + "ERATION_CREATE\020\001\022\023\n\017OPERATION_TOUCH\020\002\022\024\n" + + "\020OPERATION_DELETE\020\003\"\250\002\n\032PermissionRelati" + + "onshipTree\022I\n\014intermediate\030\001 \001(\0132#.authz" + + "ed.api.v1.AlgebraicSubjectSetH\000R\014interme" + + "diate\0226\n\004leaf\030\002 \001(\0132 .authzed.api.v1.Dir" + + "ectSubjectSetH\000R\004leaf\022H\n\017expanded_object" + + "\030\003 \001(\0132\037.authzed.api.v1.ObjectReferenceR" + + "\016expandedObject\022+\n\021expanded_relation\030\004 \001" + + "(\tR\020expandedRelationB\020\n\ttree_type\022\003\370B\001\"\267" + + "\002\n\023AlgebraicSubjectSet\022W\n\toperation\030\001 \001(" + + "\0162-.authzed.api.v1.AlgebraicSubjectSet.O" + + "perationB\n\372B\007\202\001\004\020\001 \000R\toperation\022U\n\010child" + + "ren\030\002 \003(\0132*.authzed.api.v1.PermissionRel" + + "ationshipTreeB\r\372B\n\222\001\007\"\005\212\001\002\020\001R\010children\"p" + + "\n\tOperation\022\031\n\025OPERATION_UNSPECIFIED\020\000\022\023" + + "\n\017OPERATION_UNION\020\001\022\032\n\026OPERATION_INTERSE" + + "CTION\020\002\022\027\n\023OPERATION_EXCLUSION\020\003\"P\n\020Dire" + + "ctSubjectSet\022<\n\010subjects\030\001 \003(\0132 .authzed" + + ".api.v1.SubjectReferenceR\010subjects\"W\n\021Pa" + + "rtialCaveatInfo\022B\n\030missing_required_cont" + + "ext\030\001 \003(\tB\010\372B\005\222\001\002\010\001R\026missingRequiredCont" + + "extBJ\n\022com.authzed.api.v1P\001Z2github.com/" + + "authzed/authzed-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_Cursor_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_authzed_api_v1_Cursor_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_Cursor_descriptor, + new java.lang.String[] { "Token", }); + internal_static_authzed_api_v1_RelationshipUpdate_descriptor = + getDescriptor().getMessageTypes().get(6); + 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(7); + 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(8); + 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(9); + 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(10); + 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) +} diff --git a/generated/com/authzed/api/v1/Cursor.java b/generated/com/authzed/api/v1/Cursor.java new file mode 100644 index 00000000..7b984495 --- /dev/null +++ b/generated/com/authzed/api/v1/Cursor.java @@ -0,0 +1,554 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * Cursor is used to provide resumption of listing between calls to APIs
+ * such as LookupResources.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.Cursor} + */ +public final class Cursor extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.Cursor) + CursorOrBuilder { +private static final long serialVersionUID = 0L; + // Use Cursor.newBuilder() to construct. + private Cursor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Cursor() { + token_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Cursor(); + } + + @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_Cursor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.Core.internal_static_authzed_api_v1_Cursor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.Cursor.class, com.authzed.api.v1.Cursor.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + * string token = 1 [json_name = "token", (.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 [json_name = "token", (.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.Cursor)) { + return super.equals(obj); + } + com.authzed.api.v1.Cursor other = (com.authzed.api.v1.Cursor) 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.Cursor parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.Cursor 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.Cursor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.Cursor 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.Cursor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.Cursor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.Cursor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.Cursor 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.Cursor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.Cursor 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.Cursor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.Cursor 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.Cursor 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; + } + /** + *
+   * Cursor is used to provide resumption of listing between calls to APIs
+   * such as LookupResources.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.Cursor} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.Cursor) + com.authzed.api.v1.CursorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.Core.internal_static_authzed_api_v1_Cursor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.Core.internal_static_authzed_api_v1_Cursor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.Cursor.class, com.authzed.api.v1.Cursor.Builder.class); + } + + // Construct using com.authzed.api.v1.Cursor.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_Cursor_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.Cursor getDefaultInstanceForType() { + return com.authzed.api.v1.Cursor.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.Cursor build() { + com.authzed.api.v1.Cursor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.Cursor buildPartial() { + com.authzed.api.v1.Cursor result = new com.authzed.api.v1.Cursor(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.Cursor 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.Cursor) { + return mergeFrom((com.authzed.api.v1.Cursor)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.Cursor other) { + if (other == com.authzed.api.v1.Cursor.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 [json_name = "token", (.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 [json_name = "token", (.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 [json_name = "token", (.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 [json_name = "token", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string token = 1 [json_name = "token", (.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.Cursor) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.Cursor) + private static final com.authzed.api.v1.Cursor DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.Cursor(); + } + + public static com.authzed.api.v1.Cursor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Cursor 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.Cursor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/CursorOrBuilder.java b/generated/com/authzed/api/v1/CursorOrBuilder.java new file mode 100644 index 00000000..47419635 --- /dev/null +++ b/generated/com/authzed/api/v1/CursorOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +public interface CursorOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.Cursor) + com.google.protobuf.MessageOrBuilder { + + /** + * string token = 1 [json_name = "token", (.validate.rules) = { ... } + * @return The token. + */ + java.lang.String getToken(); + /** + * string token = 1 [json_name = "token", (.validate.rules) = { ... } + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); +} diff --git a/generated/com/authzed/api/v1/Debug.java b/generated/com/authzed/api/v1/Debug.java new file mode 100644 index 00000000..65ec2b75 --- /dev/null +++ b/generated/com/authzed/api/v1/Debug.java @@ -0,0 +1,137 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/debug.proto + +package com.authzed.api.v1; + +public final class Debug { + private Debug() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_DebugInformation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_DebugInformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_CheckDebugTrace_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_CheckDebugTrace_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_CheckDebugTrace_SubProblems_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_CheckDebugTrace_SubProblems_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_CaveatEvalInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_CaveatEvalInfo_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\032authzed/api/v1/debug.proto\022\016authzed.ap" + + "i.v1\032\031authzed/api/v1/core.proto\032\027validat" + + "e/validate.proto\032\034google/protobuf/struct" + + ".proto\032\036google/protobuf/duration.proto\"j" + + "\n\020DebugInformation\0225\n\005check\030\001 \001(\0132\037.auth" + + "zed.api.v1.CheckDebugTraceR\005check\022\037\n\013sch" + + "ema_used\030\002 \001(\tR\nschemaUsed\"\363\007\n\017CheckDebu" + + "gTrace\022E\n\010resource\030\001 \001(\0132\037.authzed.api.v" + + "1.ObjectReferenceB\010\372B\005\212\001\002\020\001R\010resource\022\036\n" + + "\npermission\030\002 \001(\tR\npermission\022c\n\017permiss" + + "ion_type\030\003 \001(\0162..authzed.api.v1.CheckDeb" + + "ugTrace.PermissionTypeB\n\372B\007\202\001\004\020\001 \000R\016perm" + + "issionType\022D\n\007subject\030\004 \001(\0132 .authzed.ap" + + "i.v1.SubjectReferenceB\010\372B\005\212\001\002\020\001R\007subject" + + "\022R\n\006result\030\005 \001(\0162..authzed.api.v1.CheckD" + + "ebugTrace.PermissionshipB\n\372B\007\202\001\004\020\001 \000R\006re" + + "sult\022T\n\026caveat_evaluation_info\030\010 \001(\0132\036.a" + + "uthzed.api.v1.CaveatEvalInfoR\024caveatEval" + + "uationInfo\0225\n\010duration\030\t \001(\0132\031.google.pr" + + "otobuf.DurationR\010duration\022,\n\021was_cached_" + + "result\030\006 \001(\010H\000R\017wasCachedResult\022P\n\014sub_p" + + "roblems\030\007 \001(\0132+.authzed.api.v1.CheckDebu" + + "gTrace.SubProblemsH\000R\013subProblems\032F\n\013Sub" + + "Problems\0227\n\006traces\030\001 \003(\0132\037.authzed.api.v" + + "1.CheckDebugTraceR\006traces\"o\n\016PermissionT" + + "ype\022\037\n\033PERMISSION_TYPE_UNSPECIFIED\020\000\022\034\n\030" + + "PERMISSION_TYPE_RELATION\020\001\022\036\n\032PERMISSION" + + "_TYPE_PERMISSION\020\002\"\240\001\n\016Permissionship\022\036\n" + + "\032PERMISSIONSHIP_UNSPECIFIED\020\000\022 \n\034PERMISS" + + "IONSHIP_NO_PERMISSION\020\001\022!\n\035PERMISSIONSHI" + + "P_HAS_PERMISSION\020\002\022)\n%PERMISSIONSHIP_CON" + + "DITIONAL_PERMISSION\020\003B\021\n\nresolution\022\003\370B\001" + + "\"\224\003\n\016CaveatEvalInfo\022\036\n\nexpression\030\001 \001(\tR" + + "\nexpression\022=\n\006result\030\002 \001(\0162%.authzed.ap" + + "i.v1.CaveatEvalInfo.ResultR\006result\0221\n\007co" + + "ntext\030\003 \001(\0132\027.google.protobuf.StructR\007co" + + "ntext\022Q\n\023partial_caveat_info\030\004 \001(\0132!.aut" + + "hzed.api.v1.PartialCaveatInfoR\021partialCa" + + "veatInfo\022\037\n\013caveat_name\030\005 \001(\tR\ncaveatNam" + + "e\"|\n\006Result\022\026\n\022RESULT_UNSPECIFIED\020\000\022\026\n\022R" + + "ESULT_UNEVALUATED\020\001\022\020\n\014RESULT_FALSE\020\002\022\017\n" + + "\013RESULT_TRUE\020\003\022\037\n\033RESULT_MISSING_SOME_CO" + + "NTEXT\020\004BJ\n\022com.authzed.api.v1P\001Z2github." + + "com/authzed/authzed-go/proto/authzed/api" + + "/v1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.authzed.api.v1.Core.getDescriptor(), + io.envoyproxy.pgv.validate.Validate.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + }); + internal_static_authzed_api_v1_DebugInformation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_v1_DebugInformation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_DebugInformation_descriptor, + new java.lang.String[] { "Check", "SchemaUsed", }); + internal_static_authzed_api_v1_CheckDebugTrace_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_v1_CheckDebugTrace_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_CheckDebugTrace_descriptor, + new java.lang.String[] { "Resource", "Permission", "PermissionType", "Subject", "Result", "CaveatEvaluationInfo", "Duration", "WasCachedResult", "SubProblems", "Resolution", }); + internal_static_authzed_api_v1_CheckDebugTrace_SubProblems_descriptor = + internal_static_authzed_api_v1_CheckDebugTrace_descriptor.getNestedTypes().get(0); + internal_static_authzed_api_v1_CheckDebugTrace_SubProblems_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_CheckDebugTrace_SubProblems_descriptor, + new java.lang.String[] { "Traces", }); + internal_static_authzed_api_v1_CaveatEvalInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authzed_api_v1_CaveatEvalInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_CaveatEvalInfo_descriptor, + new java.lang.String[] { "Expression", "Result", "Context", "PartialCaveatInfo", "CaveatName", }); + 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.authzed.api.v1.Core.getDescriptor(); + io.envoyproxy.pgv.validate.Validate.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/v1/DebugInformation.java b/generated/com/authzed/api/v1/DebugInformation.java new file mode 100644 index 00000000..6b14fa37 --- /dev/null +++ b/generated/com/authzed/api/v1/DebugInformation.java @@ -0,0 +1,815 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/debug.proto + +package com.authzed.api.v1; + +/** + *
+ * DebugInformation defines debug information returned by an API call in a footer when
+ * requested with a specific debugging header.
+ * The specific debug information returned will depend on the type of the API call made.
+ * See the github.com/authzed/authzed-go project for the specific header and footer names.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.DebugInformation} + */ +public final class DebugInformation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.DebugInformation) + DebugInformationOrBuilder { +private static final long serialVersionUID = 0L; + // Use DebugInformation.newBuilder() to construct. + private DebugInformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DebugInformation() { + schemaUsed_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DebugInformation(); + } + + @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.Debug.internal_static_authzed_api_v1_DebugInformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_DebugInformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.DebugInformation.class, com.authzed.api.v1.DebugInformation.Builder.class); + } + + public static final int CHECK_FIELD_NUMBER = 1; + private com.authzed.api.v1.CheckDebugTrace check_; + /** + *
+   * check holds debug information about a check request.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + * @return Whether the check field is set. + */ + @java.lang.Override + public boolean hasCheck() { + return check_ != null; + } + /** + *
+   * check holds debug information about a check request.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + * @return The check. + */ + @java.lang.Override + public com.authzed.api.v1.CheckDebugTrace getCheck() { + return check_ == null ? com.authzed.api.v1.CheckDebugTrace.getDefaultInstance() : check_; + } + /** + *
+   * check holds debug information about a check request.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + */ + @java.lang.Override + public com.authzed.api.v1.CheckDebugTraceOrBuilder getCheckOrBuilder() { + return check_ == null ? com.authzed.api.v1.CheckDebugTrace.getDefaultInstance() : check_; + } + + public static final int SCHEMA_USED_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object schemaUsed_ = ""; + /** + *
+   * schema_used holds the schema used for the request.
+   * 
+ * + * string schema_used = 2 [json_name = "schemaUsed"]; + * @return The schemaUsed. + */ + @java.lang.Override + public java.lang.String getSchemaUsed() { + java.lang.Object ref = schemaUsed_; + 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(); + schemaUsed_ = s; + return s; + } + } + /** + *
+   * schema_used holds the schema used for the request.
+   * 
+ * + * string schema_used = 2 [json_name = "schemaUsed"]; + * @return The bytes for schemaUsed. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemaUsedBytes() { + java.lang.Object ref = schemaUsed_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaUsed_ = 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 (check_ != null) { + output.writeMessage(1, getCheck()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaUsed_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schemaUsed_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (check_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCheck()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaUsed_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schemaUsed_); + } + 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.DebugInformation)) { + return super.equals(obj); + } + com.authzed.api.v1.DebugInformation other = (com.authzed.api.v1.DebugInformation) obj; + + if (hasCheck() != other.hasCheck()) return false; + if (hasCheck()) { + if (!getCheck() + .equals(other.getCheck())) return false; + } + if (!getSchemaUsed() + .equals(other.getSchemaUsed())) 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 (hasCheck()) { + hash = (37 * hash) + CHECK_FIELD_NUMBER; + hash = (53 * hash) + getCheck().hashCode(); + } + hash = (37 * hash) + SCHEMA_USED_FIELD_NUMBER; + hash = (53 * hash) + getSchemaUsed().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.DebugInformation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.DebugInformation 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.DebugInformation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.DebugInformation 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.DebugInformation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.DebugInformation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.DebugInformation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.DebugInformation 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.DebugInformation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.DebugInformation 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.DebugInformation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.DebugInformation 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.DebugInformation 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; + } + /** + *
+   * DebugInformation defines debug information returned by an API call in a footer when
+   * requested with a specific debugging header.
+   * The specific debug information returned will depend on the type of the API call made.
+   * See the github.com/authzed/authzed-go project for the specific header and footer names.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.DebugInformation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.DebugInformation) + com.authzed.api.v1.DebugInformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_DebugInformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_DebugInformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.DebugInformation.class, com.authzed.api.v1.DebugInformation.Builder.class); + } + + // Construct using com.authzed.api.v1.DebugInformation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + check_ = null; + if (checkBuilder_ != null) { + checkBuilder_.dispose(); + checkBuilder_ = null; + } + schemaUsed_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.Debug.internal_static_authzed_api_v1_DebugInformation_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.DebugInformation getDefaultInstanceForType() { + return com.authzed.api.v1.DebugInformation.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.DebugInformation build() { + com.authzed.api.v1.DebugInformation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.DebugInformation buildPartial() { + com.authzed.api.v1.DebugInformation result = new com.authzed.api.v1.DebugInformation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.DebugInformation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.check_ = checkBuilder_ == null + ? check_ + : checkBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.schemaUsed_ = schemaUsed_; + } + } + + @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.DebugInformation) { + return mergeFrom((com.authzed.api.v1.DebugInformation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.DebugInformation other) { + if (other == com.authzed.api.v1.DebugInformation.getDefaultInstance()) return this; + if (other.hasCheck()) { + mergeCheck(other.getCheck()); + } + if (!other.getSchemaUsed().isEmpty()) { + schemaUsed_ = other.schemaUsed_; + 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( + getCheckFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + schemaUsed_ = 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.CheckDebugTrace check_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckDebugTrace, com.authzed.api.v1.CheckDebugTrace.Builder, com.authzed.api.v1.CheckDebugTraceOrBuilder> checkBuilder_; + /** + *
+     * check holds debug information about a check request.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + * @return Whether the check field is set. + */ + public boolean hasCheck() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * check holds debug information about a check request.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + * @return The check. + */ + public com.authzed.api.v1.CheckDebugTrace getCheck() { + if (checkBuilder_ == null) { + return check_ == null ? com.authzed.api.v1.CheckDebugTrace.getDefaultInstance() : check_; + } else { + return checkBuilder_.getMessage(); + } + } + /** + *
+     * check holds debug information about a check request.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + */ + public Builder setCheck(com.authzed.api.v1.CheckDebugTrace value) { + if (checkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + check_ = value; + } else { + checkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * check holds debug information about a check request.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + */ + public Builder setCheck( + com.authzed.api.v1.CheckDebugTrace.Builder builderForValue) { + if (checkBuilder_ == null) { + check_ = builderForValue.build(); + } else { + checkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * check holds debug information about a check request.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + */ + public Builder mergeCheck(com.authzed.api.v1.CheckDebugTrace value) { + if (checkBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + check_ != null && + check_ != com.authzed.api.v1.CheckDebugTrace.getDefaultInstance()) { + getCheckBuilder().mergeFrom(value); + } else { + check_ = value; + } + } else { + checkBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * check holds debug information about a check request.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + */ + public Builder clearCheck() { + bitField0_ = (bitField0_ & ~0x00000001); + check_ = null; + if (checkBuilder_ != null) { + checkBuilder_.dispose(); + checkBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * check holds debug information about a check request.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + */ + public com.authzed.api.v1.CheckDebugTrace.Builder getCheckBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCheckFieldBuilder().getBuilder(); + } + /** + *
+     * check holds debug information about a check request.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + */ + public com.authzed.api.v1.CheckDebugTraceOrBuilder getCheckOrBuilder() { + if (checkBuilder_ != null) { + return checkBuilder_.getMessageOrBuilder(); + } else { + return check_ == null ? + com.authzed.api.v1.CheckDebugTrace.getDefaultInstance() : check_; + } + } + /** + *
+     * check holds debug information about a check request.
+     * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckDebugTrace, com.authzed.api.v1.CheckDebugTrace.Builder, com.authzed.api.v1.CheckDebugTraceOrBuilder> + getCheckFieldBuilder() { + if (checkBuilder_ == null) { + checkBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.CheckDebugTrace, com.authzed.api.v1.CheckDebugTrace.Builder, com.authzed.api.v1.CheckDebugTraceOrBuilder>( + getCheck(), + getParentForChildren(), + isClean()); + check_ = null; + } + return checkBuilder_; + } + + private java.lang.Object schemaUsed_ = ""; + /** + *
+     * schema_used holds the schema used for the request.
+     * 
+ * + * string schema_used = 2 [json_name = "schemaUsed"]; + * @return The schemaUsed. + */ + public java.lang.String getSchemaUsed() { + java.lang.Object ref = schemaUsed_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaUsed_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * schema_used holds the schema used for the request.
+     * 
+ * + * string schema_used = 2 [json_name = "schemaUsed"]; + * @return The bytes for schemaUsed. + */ + public com.google.protobuf.ByteString + getSchemaUsedBytes() { + java.lang.Object ref = schemaUsed_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaUsed_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * schema_used holds the schema used for the request.
+     * 
+ * + * string schema_used = 2 [json_name = "schemaUsed"]; + * @param value The schemaUsed to set. + * @return This builder for chaining. + */ + public Builder setSchemaUsed( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schemaUsed_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * schema_used holds the schema used for the request.
+     * 
+ * + * string schema_used = 2 [json_name = "schemaUsed"]; + * @return This builder for chaining. + */ + public Builder clearSchemaUsed() { + schemaUsed_ = getDefaultInstance().getSchemaUsed(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * schema_used holds the schema used for the request.
+     * 
+ * + * string schema_used = 2 [json_name = "schemaUsed"]; + * @param value The bytes for schemaUsed to set. + * @return This builder for chaining. + */ + public Builder setSchemaUsedBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schemaUsed_ = 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.DebugInformation) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.DebugInformation) + private static final com.authzed.api.v1.DebugInformation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.DebugInformation(); + } + + public static com.authzed.api.v1.DebugInformation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DebugInformation 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.DebugInformation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/DebugInformationOrBuilder.java b/generated/com/authzed/api/v1/DebugInformationOrBuilder.java new file mode 100644 index 00000000..26c1a557 --- /dev/null +++ b/generated/com/authzed/api/v1/DebugInformationOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/debug.proto + +package com.authzed.api.v1; + +public interface DebugInformationOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.DebugInformation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * check holds debug information about a check request.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + * @return Whether the check field is set. + */ + boolean hasCheck(); + /** + *
+   * check holds debug information about a check request.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + * @return The check. + */ + com.authzed.api.v1.CheckDebugTrace getCheck(); + /** + *
+   * check holds debug information about a check request.
+   * 
+ * + * .authzed.api.v1.CheckDebugTrace check = 1 [json_name = "check"]; + */ + com.authzed.api.v1.CheckDebugTraceOrBuilder getCheckOrBuilder(); + + /** + *
+   * schema_used holds the schema used for the request.
+   * 
+ * + * string schema_used = 2 [json_name = "schemaUsed"]; + * @return The schemaUsed. + */ + java.lang.String getSchemaUsed(); + /** + *
+   * schema_used holds the schema used for the request.
+   * 
+ * + * string schema_used = 2 [json_name = "schemaUsed"]; + * @return The bytes for schemaUsed. + */ + com.google.protobuf.ByteString + getSchemaUsedBytes(); +} diff --git a/generated/com/authzed/api/v1/DeleteRelationshipsRequest.java b/generated/com/authzed/api/v1/DeleteRelationshipsRequest.java new file mode 100644 index 00000000..0dd8e09b --- /dev/null +++ b/generated/com/authzed/api/v1/DeleteRelationshipsRequest.java @@ -0,0 +1,1236 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * DeleteRelationshipsRequest specifies which Relationships should be deleted,
+ * requesting the delete of *ALL* relationships that match the specified
+ * filters. If the optional_preconditions parameter is included, all of the
+ * specified preconditions must also be satisfied before the delete will be
+ * executed.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.DeleteRelationshipsRequest} + */ +public final class DeleteRelationshipsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.DeleteRelationshipsRequest) + DeleteRelationshipsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteRelationshipsRequest.newBuilder() to construct. + private DeleteRelationshipsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteRelationshipsRequest() { + optionalPreconditions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteRelationshipsRequest(); + } + + @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.PermissionService.internal_static_authzed_api_v1_DeleteRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_DeleteRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.DeleteRelationshipsRequest.class, com.authzed.api.v1.DeleteRelationshipsRequest.Builder.class); + } + + public static final int RELATIONSHIP_FILTER_FIELD_NUMBER = 1; + private com.authzed.api.v1.RelationshipFilter relationshipFilter_; + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return Whether the relationshipFilter field is set. + */ + @java.lang.Override + public boolean hasRelationshipFilter() { + return relationshipFilter_ != null; + } + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return The relationshipFilter. + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilter getRelationshipFilter() { + return relationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilterOrBuilder getRelationshipFilterOrBuilder() { + return relationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } + + public static final int OPTIONAL_PRECONDITIONS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List optionalPreconditions_; + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List getOptionalPreconditionsList() { + return optionalPreconditions_; + } + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List + getOptionalPreconditionsOrBuilderList() { + return optionalPreconditions_; + } + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + @java.lang.Override + public int getOptionalPreconditionsCount() { + return optionalPreconditions_.size(); + } + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.Precondition getOptionalPreconditions(int index) { + return optionalPreconditions_.get(index); + } + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.PreconditionOrBuilder getOptionalPreconditionsOrBuilder( + int index) { + return optionalPreconditions_.get(index); + } + + public static final int OPTIONAL_LIMIT_FIELD_NUMBER = 3; + private int optionalLimit_ = 0; + /** + *
+   * optional_limit, if non-zero, specifies the limit on the number of relationships to be deleted.
+   * If there are more matching relationships found to be deleted than the limit specified here,
+   * the deletion call will fail with an error to prevent partial deletion. If partial deletion
+   * is needed, specify below that partial deletion is allowed. Partial deletions can be used
+   * in a loop to delete large amounts of relationships in a *non-transactional* manner.
+   * 
+ * + * uint32 optional_limit = 3 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + @java.lang.Override + public int getOptionalLimit() { + return optionalLimit_; + } + + public static final int OPTIONAL_ALLOW_PARTIAL_DELETIONS_FIELD_NUMBER = 4; + private boolean optionalAllowPartialDeletions_ = false; + /** + *
+   * optional_allow_partial_deletions, if true and a limit is specified, will delete matching found
+   * relationships up to the count specified in optional_limit, and no more.
+   * 
+ * + * bool optional_allow_partial_deletions = 4 [json_name = "optionalAllowPartialDeletions"]; + * @return The optionalAllowPartialDeletions. + */ + @java.lang.Override + public boolean getOptionalAllowPartialDeletions() { + return optionalAllowPartialDeletions_; + } + + 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 (relationshipFilter_ != null) { + output.writeMessage(1, getRelationshipFilter()); + } + for (int i = 0; i < optionalPreconditions_.size(); i++) { + output.writeMessage(2, optionalPreconditions_.get(i)); + } + if (optionalLimit_ != 0) { + output.writeUInt32(3, optionalLimit_); + } + if (optionalAllowPartialDeletions_ != false) { + output.writeBool(4, optionalAllowPartialDeletions_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (relationshipFilter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRelationshipFilter()); + } + for (int i = 0; i < optionalPreconditions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, optionalPreconditions_.get(i)); + } + if (optionalLimit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, optionalLimit_); + } + if (optionalAllowPartialDeletions_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, optionalAllowPartialDeletions_); + } + 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.DeleteRelationshipsRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.DeleteRelationshipsRequest other = (com.authzed.api.v1.DeleteRelationshipsRequest) obj; + + if (hasRelationshipFilter() != other.hasRelationshipFilter()) return false; + if (hasRelationshipFilter()) { + if (!getRelationshipFilter() + .equals(other.getRelationshipFilter())) return false; + } + if (!getOptionalPreconditionsList() + .equals(other.getOptionalPreconditionsList())) return false; + if (getOptionalLimit() + != other.getOptionalLimit()) return false; + if (getOptionalAllowPartialDeletions() + != other.getOptionalAllowPartialDeletions()) 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 (hasRelationshipFilter()) { + hash = (37 * hash) + RELATIONSHIP_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipFilter().hashCode(); + } + if (getOptionalPreconditionsCount() > 0) { + hash = (37 * hash) + OPTIONAL_PRECONDITIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionalPreconditionsList().hashCode(); + } + hash = (37 * hash) + OPTIONAL_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getOptionalLimit(); + hash = (37 * hash) + OPTIONAL_ALLOW_PARTIAL_DELETIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOptionalAllowPartialDeletions()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.DeleteRelationshipsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.DeleteRelationshipsRequest 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.DeleteRelationshipsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.DeleteRelationshipsRequest 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.DeleteRelationshipsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.DeleteRelationshipsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.DeleteRelationshipsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.DeleteRelationshipsRequest 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.DeleteRelationshipsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.DeleteRelationshipsRequest 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.DeleteRelationshipsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.DeleteRelationshipsRequest 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.DeleteRelationshipsRequest 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; + } + /** + *
+   * DeleteRelationshipsRequest specifies which Relationships should be deleted,
+   * requesting the delete of *ALL* relationships that match the specified
+   * filters. If the optional_preconditions parameter is included, all of the
+   * specified preconditions must also be satisfied before the delete will be
+   * executed.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.DeleteRelationshipsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.DeleteRelationshipsRequest) + com.authzed.api.v1.DeleteRelationshipsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_DeleteRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_DeleteRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.DeleteRelationshipsRequest.class, com.authzed.api.v1.DeleteRelationshipsRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.DeleteRelationshipsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relationshipFilter_ = null; + if (relationshipFilterBuilder_ != null) { + relationshipFilterBuilder_.dispose(); + relationshipFilterBuilder_ = null; + } + if (optionalPreconditionsBuilder_ == null) { + optionalPreconditions_ = java.util.Collections.emptyList(); + } else { + optionalPreconditions_ = null; + optionalPreconditionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + optionalLimit_ = 0; + optionalAllowPartialDeletions_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_DeleteRelationshipsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.DeleteRelationshipsRequest getDefaultInstanceForType() { + return com.authzed.api.v1.DeleteRelationshipsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.DeleteRelationshipsRequest build() { + com.authzed.api.v1.DeleteRelationshipsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.DeleteRelationshipsRequest buildPartial() { + com.authzed.api.v1.DeleteRelationshipsRequest result = new com.authzed.api.v1.DeleteRelationshipsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.DeleteRelationshipsRequest result) { + if (optionalPreconditionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + optionalPreconditions_ = java.util.Collections.unmodifiableList(optionalPreconditions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.optionalPreconditions_ = optionalPreconditions_; + } else { + result.optionalPreconditions_ = optionalPreconditionsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.DeleteRelationshipsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relationshipFilter_ = relationshipFilterBuilder_ == null + ? relationshipFilter_ + : relationshipFilterBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.optionalLimit_ = optionalLimit_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.optionalAllowPartialDeletions_ = optionalAllowPartialDeletions_; + } + } + + @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.DeleteRelationshipsRequest) { + return mergeFrom((com.authzed.api.v1.DeleteRelationshipsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.DeleteRelationshipsRequest other) { + if (other == com.authzed.api.v1.DeleteRelationshipsRequest.getDefaultInstance()) return this; + if (other.hasRelationshipFilter()) { + mergeRelationshipFilter(other.getRelationshipFilter()); + } + if (optionalPreconditionsBuilder_ == null) { + if (!other.optionalPreconditions_.isEmpty()) { + if (optionalPreconditions_.isEmpty()) { + optionalPreconditions_ = other.optionalPreconditions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.addAll(other.optionalPreconditions_); + } + onChanged(); + } + } else { + if (!other.optionalPreconditions_.isEmpty()) { + if (optionalPreconditionsBuilder_.isEmpty()) { + optionalPreconditionsBuilder_.dispose(); + optionalPreconditionsBuilder_ = null; + optionalPreconditions_ = other.optionalPreconditions_; + bitField0_ = (bitField0_ & ~0x00000002); + optionalPreconditionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOptionalPreconditionsFieldBuilder() : null; + } else { + optionalPreconditionsBuilder_.addAllMessages(other.optionalPreconditions_); + } + } + } + if (other.getOptionalLimit() != 0) { + setOptionalLimit(other.getOptionalLimit()); + } + if (other.getOptionalAllowPartialDeletions() != false) { + setOptionalAllowPartialDeletions(other.getOptionalAllowPartialDeletions()); + } + 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( + getRelationshipFilterFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.authzed.api.v1.Precondition m = + input.readMessage( + com.authzed.api.v1.Precondition.parser(), + extensionRegistry); + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.add(m); + } else { + optionalPreconditionsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: { + optionalLimit_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + optionalAllowPartialDeletions_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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.RelationshipFilter relationshipFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> relationshipFilterBuilder_; + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return Whether the relationshipFilter field is set. + */ + public boolean hasRelationshipFilter() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return The relationshipFilter. + */ + public com.authzed.api.v1.RelationshipFilter getRelationshipFilter() { + if (relationshipFilterBuilder_ == null) { + return relationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } else { + return relationshipFilterBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder setRelationshipFilter(com.authzed.api.v1.RelationshipFilter value) { + if (relationshipFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relationshipFilter_ = value; + } else { + relationshipFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder setRelationshipFilter( + com.authzed.api.v1.RelationshipFilter.Builder builderForValue) { + if (relationshipFilterBuilder_ == null) { + relationshipFilter_ = builderForValue.build(); + } else { + relationshipFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder mergeRelationshipFilter(com.authzed.api.v1.RelationshipFilter value) { + if (relationshipFilterBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + relationshipFilter_ != null && + relationshipFilter_ != com.authzed.api.v1.RelationshipFilter.getDefaultInstance()) { + getRelationshipFilterBuilder().mergeFrom(value); + } else { + relationshipFilter_ = value; + } + } else { + relationshipFilterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder clearRelationshipFilter() { + bitField0_ = (bitField0_ & ~0x00000001); + relationshipFilter_ = null; + if (relationshipFilterBuilder_ != null) { + relationshipFilterBuilder_.dispose(); + relationshipFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipFilter.Builder getRelationshipFilterBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRelationshipFilterFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipFilterOrBuilder getRelationshipFilterOrBuilder() { + if (relationshipFilterBuilder_ != null) { + return relationshipFilterBuilder_.getMessageOrBuilder(); + } else { + return relationshipFilter_ == null ? + com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } + } + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> + getRelationshipFilterFieldBuilder() { + if (relationshipFilterBuilder_ == null) { + relationshipFilterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder>( + getRelationshipFilter(), + getParentForChildren(), + isClean()); + relationshipFilter_ = null; + } + return relationshipFilterBuilder_; + } + + private java.util.List optionalPreconditions_ = + java.util.Collections.emptyList(); + private void ensureOptionalPreconditionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + optionalPreconditions_ = new java.util.ArrayList(optionalPreconditions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Precondition, com.authzed.api.v1.Precondition.Builder, com.authzed.api.v1.PreconditionOrBuilder> optionalPreconditionsBuilder_; + + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public java.util.List getOptionalPreconditionsList() { + if (optionalPreconditionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(optionalPreconditions_); + } else { + return optionalPreconditionsBuilder_.getMessageList(); + } + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public int getOptionalPreconditionsCount() { + if (optionalPreconditionsBuilder_ == null) { + return optionalPreconditions_.size(); + } else { + return optionalPreconditionsBuilder_.getCount(); + } + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Precondition getOptionalPreconditions(int index) { + if (optionalPreconditionsBuilder_ == null) { + return optionalPreconditions_.get(index); + } else { + return optionalPreconditionsBuilder_.getMessage(index); + } + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder setOptionalPreconditions( + int index, com.authzed.api.v1.Precondition value) { + if (optionalPreconditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.set(index, value); + onChanged(); + } else { + optionalPreconditionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder setOptionalPreconditions( + int index, com.authzed.api.v1.Precondition.Builder builderForValue) { + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.set(index, builderForValue.build()); + onChanged(); + } else { + optionalPreconditionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder addOptionalPreconditions(com.authzed.api.v1.Precondition value) { + if (optionalPreconditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.add(value); + onChanged(); + } else { + optionalPreconditionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder addOptionalPreconditions( + int index, com.authzed.api.v1.Precondition value) { + if (optionalPreconditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.add(index, value); + onChanged(); + } else { + optionalPreconditionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder addOptionalPreconditions( + com.authzed.api.v1.Precondition.Builder builderForValue) { + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.add(builderForValue.build()); + onChanged(); + } else { + optionalPreconditionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder addOptionalPreconditions( + int index, com.authzed.api.v1.Precondition.Builder builderForValue) { + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.add(index, builderForValue.build()); + onChanged(); + } else { + optionalPreconditionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder addAllOptionalPreconditions( + java.lang.Iterable values) { + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, optionalPreconditions_); + onChanged(); + } else { + optionalPreconditionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder clearOptionalPreconditions() { + if (optionalPreconditionsBuilder_ == null) { + optionalPreconditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + optionalPreconditionsBuilder_.clear(); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder removeOptionalPreconditions(int index) { + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.remove(index); + onChanged(); + } else { + optionalPreconditionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Precondition.Builder getOptionalPreconditionsBuilder( + int index) { + return getOptionalPreconditionsFieldBuilder().getBuilder(index); + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PreconditionOrBuilder getOptionalPreconditionsOrBuilder( + int index) { + if (optionalPreconditionsBuilder_ == null) { + return optionalPreconditions_.get(index); } else { + return optionalPreconditionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public java.util.List + getOptionalPreconditionsOrBuilderList() { + if (optionalPreconditionsBuilder_ != null) { + return optionalPreconditionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(optionalPreconditions_); + } + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Precondition.Builder addOptionalPreconditionsBuilder() { + return getOptionalPreconditionsFieldBuilder().addBuilder( + com.authzed.api.v1.Precondition.getDefaultInstance()); + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Precondition.Builder addOptionalPreconditionsBuilder( + int index) { + return getOptionalPreconditionsFieldBuilder().addBuilder( + index, com.authzed.api.v1.Precondition.getDefaultInstance()); + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public java.util.List + getOptionalPreconditionsBuilderList() { + return getOptionalPreconditionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Precondition, com.authzed.api.v1.Precondition.Builder, com.authzed.api.v1.PreconditionOrBuilder> + getOptionalPreconditionsFieldBuilder() { + if (optionalPreconditionsBuilder_ == null) { + optionalPreconditionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Precondition, com.authzed.api.v1.Precondition.Builder, com.authzed.api.v1.PreconditionOrBuilder>( + optionalPreconditions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + optionalPreconditions_ = null; + } + return optionalPreconditionsBuilder_; + } + + private int optionalLimit_ ; + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of relationships to be deleted.
+     * If there are more matching relationships found to be deleted than the limit specified here,
+     * the deletion call will fail with an error to prevent partial deletion. If partial deletion
+     * is needed, specify below that partial deletion is allowed. Partial deletions can be used
+     * in a loop to delete large amounts of relationships in a *non-transactional* manner.
+     * 
+ * + * uint32 optional_limit = 3 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + @java.lang.Override + public int getOptionalLimit() { + return optionalLimit_; + } + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of relationships to be deleted.
+     * If there are more matching relationships found to be deleted than the limit specified here,
+     * the deletion call will fail with an error to prevent partial deletion. If partial deletion
+     * is needed, specify below that partial deletion is allowed. Partial deletions can be used
+     * in a loop to delete large amounts of relationships in a *non-transactional* manner.
+     * 
+ * + * uint32 optional_limit = 3 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @param value The optionalLimit to set. + * @return This builder for chaining. + */ + public Builder setOptionalLimit(int value) { + + optionalLimit_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of relationships to be deleted.
+     * If there are more matching relationships found to be deleted than the limit specified here,
+     * the deletion call will fail with an error to prevent partial deletion. If partial deletion
+     * is needed, specify below that partial deletion is allowed. Partial deletions can be used
+     * in a loop to delete large amounts of relationships in a *non-transactional* manner.
+     * 
+ * + * uint32 optional_limit = 3 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalLimit() { + bitField0_ = (bitField0_ & ~0x00000004); + optionalLimit_ = 0; + onChanged(); + return this; + } + + private boolean optionalAllowPartialDeletions_ ; + /** + *
+     * optional_allow_partial_deletions, if true and a limit is specified, will delete matching found
+     * relationships up to the count specified in optional_limit, and no more.
+     * 
+ * + * bool optional_allow_partial_deletions = 4 [json_name = "optionalAllowPartialDeletions"]; + * @return The optionalAllowPartialDeletions. + */ + @java.lang.Override + public boolean getOptionalAllowPartialDeletions() { + return optionalAllowPartialDeletions_; + } + /** + *
+     * optional_allow_partial_deletions, if true and a limit is specified, will delete matching found
+     * relationships up to the count specified in optional_limit, and no more.
+     * 
+ * + * bool optional_allow_partial_deletions = 4 [json_name = "optionalAllowPartialDeletions"]; + * @param value The optionalAllowPartialDeletions to set. + * @return This builder for chaining. + */ + public Builder setOptionalAllowPartialDeletions(boolean value) { + + optionalAllowPartialDeletions_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * optional_allow_partial_deletions, if true and a limit is specified, will delete matching found
+     * relationships up to the count specified in optional_limit, and no more.
+     * 
+ * + * bool optional_allow_partial_deletions = 4 [json_name = "optionalAllowPartialDeletions"]; + * @return This builder for chaining. + */ + public Builder clearOptionalAllowPartialDeletions() { + bitField0_ = (bitField0_ & ~0x00000008); + optionalAllowPartialDeletions_ = false; + 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.DeleteRelationshipsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.DeleteRelationshipsRequest) + private static final com.authzed.api.v1.DeleteRelationshipsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.DeleteRelationshipsRequest(); + } + + public static com.authzed.api.v1.DeleteRelationshipsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteRelationshipsRequest 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.DeleteRelationshipsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/DeleteRelationshipsRequestOrBuilder.java b/generated/com/authzed/api/v1/DeleteRelationshipsRequestOrBuilder.java new file mode 100644 index 00000000..72734cea --- /dev/null +++ b/generated/com/authzed/api/v1/DeleteRelationshipsRequestOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface DeleteRelationshipsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.DeleteRelationshipsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return Whether the relationshipFilter field is set. + */ + boolean hasRelationshipFilter(); + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return The relationshipFilter. + */ + com.authzed.api.v1.RelationshipFilter getRelationshipFilter(); + /** + * .authzed.api.v1.RelationshipFilter relationship_filter = 1 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + com.authzed.api.v1.RelationshipFilterOrBuilder getRelationshipFilterOrBuilder(); + + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + java.util.List + getOptionalPreconditionsList(); + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + com.authzed.api.v1.Precondition getOptionalPreconditions(int index); + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + int getOptionalPreconditionsCount(); + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + java.util.List + getOptionalPreconditionsOrBuilderList(); + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + com.authzed.api.v1.PreconditionOrBuilder getOptionalPreconditionsOrBuilder( + int index); + + /** + *
+   * optional_limit, if non-zero, specifies the limit on the number of relationships to be deleted.
+   * If there are more matching relationships found to be deleted than the limit specified here,
+   * the deletion call will fail with an error to prevent partial deletion. If partial deletion
+   * is needed, specify below that partial deletion is allowed. Partial deletions can be used
+   * in a loop to delete large amounts of relationships in a *non-transactional* manner.
+   * 
+ * + * uint32 optional_limit = 3 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + int getOptionalLimit(); + + /** + *
+   * optional_allow_partial_deletions, if true and a limit is specified, will delete matching found
+   * relationships up to the count specified in optional_limit, and no more.
+   * 
+ * + * bool optional_allow_partial_deletions = 4 [json_name = "optionalAllowPartialDeletions"]; + * @return The optionalAllowPartialDeletions. + */ + boolean getOptionalAllowPartialDeletions(); +} diff --git a/generated/com/authzed/api/v1/DeleteRelationshipsResponse.java b/generated/com/authzed/api/v1/DeleteRelationshipsResponse.java new file mode 100644 index 00000000..cbe8a378 --- /dev/null +++ b/generated/com/authzed/api/v1/DeleteRelationshipsResponse.java @@ -0,0 +1,900 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.DeleteRelationshipsResponse} + */ +public final class DeleteRelationshipsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.DeleteRelationshipsResponse) + DeleteRelationshipsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteRelationshipsResponse.newBuilder() to construct. + private DeleteRelationshipsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteRelationshipsResponse() { + deletionProgress_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteRelationshipsResponse(); + } + + @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.PermissionService.internal_static_authzed_api_v1_DeleteRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_DeleteRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.DeleteRelationshipsResponse.class, com.authzed.api.v1.DeleteRelationshipsResponse.Builder.class); + } + + /** + * Protobuf enum {@code authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress} + */ + public enum DeletionProgress + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DELETION_PROGRESS_UNSPECIFIED = 0; + */ + DELETION_PROGRESS_UNSPECIFIED(0), + /** + *
+     * DELETION_PROGRESS_COMPLETE indicates that all remaining relationships matching the filter
+     * were deleted. Will be returned even if no relationships were deleted.
+     * 
+ * + * DELETION_PROGRESS_COMPLETE = 1; + */ + DELETION_PROGRESS_COMPLETE(1), + /** + *
+     * DELETION_PROGRESS_PARTIAL indicates that a subset of the relationships matching the filter
+     * were deleted. Only returned if optional_allow_partial_deletions was true, an optional_limit was
+     * specified, and there existed more relationships matching the filter than optional_limit would allow.
+     * Once all remaining relationships have been deleted, DELETION_PROGRESS_COMPLETE will be returned.
+     * 
+ * + * DELETION_PROGRESS_PARTIAL = 2; + */ + DELETION_PROGRESS_PARTIAL(2), + UNRECOGNIZED(-1), + ; + + /** + * DELETION_PROGRESS_UNSPECIFIED = 0; + */ + public static final int DELETION_PROGRESS_UNSPECIFIED_VALUE = 0; + /** + *
+     * DELETION_PROGRESS_COMPLETE indicates that all remaining relationships matching the filter
+     * were deleted. Will be returned even if no relationships were deleted.
+     * 
+ * + * DELETION_PROGRESS_COMPLETE = 1; + */ + public static final int DELETION_PROGRESS_COMPLETE_VALUE = 1; + /** + *
+     * DELETION_PROGRESS_PARTIAL indicates that a subset of the relationships matching the filter
+     * were deleted. Only returned if optional_allow_partial_deletions was true, an optional_limit was
+     * specified, and there existed more relationships matching the filter than optional_limit would allow.
+     * Once all remaining relationships have been deleted, DELETION_PROGRESS_COMPLETE will be returned.
+     * 
+ * + * DELETION_PROGRESS_PARTIAL = 2; + */ + public static final int DELETION_PROGRESS_PARTIAL_VALUE = 2; + + + 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 DeletionProgress 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 DeletionProgress forNumber(int value) { + switch (value) { + case 0: return DELETION_PROGRESS_UNSPECIFIED; + case 1: return DELETION_PROGRESS_COMPLETE; + case 2: return DELETION_PROGRESS_PARTIAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DeletionProgress> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DeletionProgress findValueByNumber(int number) { + return DeletionProgress.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.DeleteRelationshipsResponse.getDescriptor().getEnumTypes().get(0); + } + + private static final DeletionProgress[] VALUES = values(); + + public static DeletionProgress 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 DeletionProgress(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress) + } + + public static final int DELETED_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken deletedAt_; + /** + *
+   * deleted_at is the revision at which the relationships were deleted.
+   * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + * @return Whether the deletedAt field is set. + */ + @java.lang.Override + public boolean hasDeletedAt() { + return deletedAt_ != null; + } + /** + *
+   * deleted_at is the revision at which the relationships were deleted.
+   * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + * @return The deletedAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getDeletedAt() { + return deletedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : deletedAt_; + } + /** + *
+   * deleted_at is the revision at which the relationships were deleted.
+   * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getDeletedAtOrBuilder() { + return deletedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : deletedAt_; + } + + public static final int DELETION_PROGRESS_FIELD_NUMBER = 2; + private int deletionProgress_ = 0; + /** + *
+   * deletion_progress is an enumeration of the possible outcomes that occurred when attempting to delete the specified relationships.
+   * 
+ * + * .authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress deletion_progress = 2 [json_name = "deletionProgress"]; + * @return The enum numeric value on the wire for deletionProgress. + */ + @java.lang.Override public int getDeletionProgressValue() { + return deletionProgress_; + } + /** + *
+   * deletion_progress is an enumeration of the possible outcomes that occurred when attempting to delete the specified relationships.
+   * 
+ * + * .authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress deletion_progress = 2 [json_name = "deletionProgress"]; + * @return The deletionProgress. + */ + @java.lang.Override public com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress getDeletionProgress() { + com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress result = com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress.forNumber(deletionProgress_); + return result == null ? com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress.UNRECOGNIZED : result; + } + + 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 (deletedAt_ != null) { + output.writeMessage(1, getDeletedAt()); + } + if (deletionProgress_ != com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress.DELETION_PROGRESS_UNSPECIFIED.getNumber()) { + output.writeEnum(2, deletionProgress_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (deletedAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDeletedAt()); + } + if (deletionProgress_ != com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress.DELETION_PROGRESS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, deletionProgress_); + } + 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.DeleteRelationshipsResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.DeleteRelationshipsResponse other = (com.authzed.api.v1.DeleteRelationshipsResponse) obj; + + if (hasDeletedAt() != other.hasDeletedAt()) return false; + if (hasDeletedAt()) { + if (!getDeletedAt() + .equals(other.getDeletedAt())) return false; + } + if (deletionProgress_ != other.deletionProgress_) 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 (hasDeletedAt()) { + hash = (37 * hash) + DELETED_AT_FIELD_NUMBER; + hash = (53 * hash) + getDeletedAt().hashCode(); + } + hash = (37 * hash) + DELETION_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + deletionProgress_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.DeleteRelationshipsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.DeleteRelationshipsResponse 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.DeleteRelationshipsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.DeleteRelationshipsResponse 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.DeleteRelationshipsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.DeleteRelationshipsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.DeleteRelationshipsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.DeleteRelationshipsResponse 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.DeleteRelationshipsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.DeleteRelationshipsResponse 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.DeleteRelationshipsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.DeleteRelationshipsResponse 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.DeleteRelationshipsResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.DeleteRelationshipsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.DeleteRelationshipsResponse) + com.authzed.api.v1.DeleteRelationshipsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_DeleteRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_DeleteRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.DeleteRelationshipsResponse.class, com.authzed.api.v1.DeleteRelationshipsResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.DeleteRelationshipsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + deletedAt_ = null; + if (deletedAtBuilder_ != null) { + deletedAtBuilder_.dispose(); + deletedAtBuilder_ = null; + } + deletionProgress_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_DeleteRelationshipsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.DeleteRelationshipsResponse getDefaultInstanceForType() { + return com.authzed.api.v1.DeleteRelationshipsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.DeleteRelationshipsResponse build() { + com.authzed.api.v1.DeleteRelationshipsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.DeleteRelationshipsResponse buildPartial() { + com.authzed.api.v1.DeleteRelationshipsResponse result = new com.authzed.api.v1.DeleteRelationshipsResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.DeleteRelationshipsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.deletedAt_ = deletedAtBuilder_ == null + ? deletedAt_ + : deletedAtBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deletionProgress_ = deletionProgress_; + } + } + + @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.DeleteRelationshipsResponse) { + return mergeFrom((com.authzed.api.v1.DeleteRelationshipsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.DeleteRelationshipsResponse other) { + if (other == com.authzed.api.v1.DeleteRelationshipsResponse.getDefaultInstance()) return this; + if (other.hasDeletedAt()) { + mergeDeletedAt(other.getDeletedAt()); + } + if (other.deletionProgress_ != 0) { + setDeletionProgressValue(other.getDeletionProgressValue()); + } + 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( + getDeletedAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + deletionProgress_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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.ZedToken deletedAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> deletedAtBuilder_; + /** + *
+     * deleted_at is the revision at which the relationships were deleted.
+     * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + * @return Whether the deletedAt field is set. + */ + public boolean hasDeletedAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * deleted_at is the revision at which the relationships were deleted.
+     * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + * @return The deletedAt. + */ + public com.authzed.api.v1.ZedToken getDeletedAt() { + if (deletedAtBuilder_ == null) { + return deletedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : deletedAt_; + } else { + return deletedAtBuilder_.getMessage(); + } + } + /** + *
+     * deleted_at is the revision at which the relationships were deleted.
+     * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + */ + public Builder setDeletedAt(com.authzed.api.v1.ZedToken value) { + if (deletedAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deletedAt_ = value; + } else { + deletedAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * deleted_at is the revision at which the relationships were deleted.
+     * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + */ + public Builder setDeletedAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (deletedAtBuilder_ == null) { + deletedAt_ = builderForValue.build(); + } else { + deletedAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * deleted_at is the revision at which the relationships were deleted.
+     * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + */ + public Builder mergeDeletedAt(com.authzed.api.v1.ZedToken value) { + if (deletedAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + deletedAt_ != null && + deletedAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getDeletedAtBuilder().mergeFrom(value); + } else { + deletedAt_ = value; + } + } else { + deletedAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * deleted_at is the revision at which the relationships were deleted.
+     * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + */ + public Builder clearDeletedAt() { + bitField0_ = (bitField0_ & ~0x00000001); + deletedAt_ = null; + if (deletedAtBuilder_ != null) { + deletedAtBuilder_.dispose(); + deletedAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * deleted_at is the revision at which the relationships were deleted.
+     * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getDeletedAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDeletedAtFieldBuilder().getBuilder(); + } + /** + *
+     * deleted_at is the revision at which the relationships were deleted.
+     * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getDeletedAtOrBuilder() { + if (deletedAtBuilder_ != null) { + return deletedAtBuilder_.getMessageOrBuilder(); + } else { + return deletedAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : deletedAt_; + } + } + /** + *
+     * deleted_at is the revision at which the relationships were deleted.
+     * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getDeletedAtFieldBuilder() { + if (deletedAtBuilder_ == null) { + deletedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getDeletedAt(), + getParentForChildren(), + isClean()); + deletedAt_ = null; + } + return deletedAtBuilder_; + } + + private int deletionProgress_ = 0; + /** + *
+     * deletion_progress is an enumeration of the possible outcomes that occurred when attempting to delete the specified relationships.
+     * 
+ * + * .authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress deletion_progress = 2 [json_name = "deletionProgress"]; + * @return The enum numeric value on the wire for deletionProgress. + */ + @java.lang.Override public int getDeletionProgressValue() { + return deletionProgress_; + } + /** + *
+     * deletion_progress is an enumeration of the possible outcomes that occurred when attempting to delete the specified relationships.
+     * 
+ * + * .authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress deletion_progress = 2 [json_name = "deletionProgress"]; + * @param value The enum numeric value on the wire for deletionProgress to set. + * @return This builder for chaining. + */ + public Builder setDeletionProgressValue(int value) { + deletionProgress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * deletion_progress is an enumeration of the possible outcomes that occurred when attempting to delete the specified relationships.
+     * 
+ * + * .authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress deletion_progress = 2 [json_name = "deletionProgress"]; + * @return The deletionProgress. + */ + @java.lang.Override + public com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress getDeletionProgress() { + com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress result = com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress.forNumber(deletionProgress_); + return result == null ? com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress.UNRECOGNIZED : result; + } + /** + *
+     * deletion_progress is an enumeration of the possible outcomes that occurred when attempting to delete the specified relationships.
+     * 
+ * + * .authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress deletion_progress = 2 [json_name = "deletionProgress"]; + * @param value The deletionProgress to set. + * @return This builder for chaining. + */ + public Builder setDeletionProgress(com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + deletionProgress_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * deletion_progress is an enumeration of the possible outcomes that occurred when attempting to delete the specified relationships.
+     * 
+ * + * .authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress deletion_progress = 2 [json_name = "deletionProgress"]; + * @return This builder for chaining. + */ + public Builder clearDeletionProgress() { + bitField0_ = (bitField0_ & ~0x00000002); + deletionProgress_ = 0; + 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.DeleteRelationshipsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.DeleteRelationshipsResponse) + private static final com.authzed.api.v1.DeleteRelationshipsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.DeleteRelationshipsResponse(); + } + + public static com.authzed.api.v1.DeleteRelationshipsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteRelationshipsResponse 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.DeleteRelationshipsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/DeleteRelationshipsResponseOrBuilder.java b/generated/com/authzed/api/v1/DeleteRelationshipsResponseOrBuilder.java new file mode 100644 index 00000000..cb191953 --- /dev/null +++ b/generated/com/authzed/api/v1/DeleteRelationshipsResponseOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface DeleteRelationshipsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.DeleteRelationshipsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * deleted_at is the revision at which the relationships were deleted.
+   * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + * @return Whether the deletedAt field is set. + */ + boolean hasDeletedAt(); + /** + *
+   * deleted_at is the revision at which the relationships were deleted.
+   * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + * @return The deletedAt. + */ + com.authzed.api.v1.ZedToken getDeletedAt(); + /** + *
+   * deleted_at is the revision at which the relationships were deleted.
+   * 
+ * + * .authzed.api.v1.ZedToken deleted_at = 1 [json_name = "deletedAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getDeletedAtOrBuilder(); + + /** + *
+   * deletion_progress is an enumeration of the possible outcomes that occurred when attempting to delete the specified relationships.
+   * 
+ * + * .authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress deletion_progress = 2 [json_name = "deletionProgress"]; + * @return The enum numeric value on the wire for deletionProgress. + */ + int getDeletionProgressValue(); + /** + *
+   * deletion_progress is an enumeration of the possible outcomes that occurred when attempting to delete the specified relationships.
+   * 
+ * + * .authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress deletion_progress = 2 [json_name = "deletionProgress"]; + * @return The deletionProgress. + */ + com.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress getDeletionProgress(); +} diff --git a/generated/com/authzed/api/v1/DirectSubjectSet.java b/generated/com/authzed/api/v1/DirectSubjectSet.java new file mode 100644 index 00000000..afc4dbfe --- /dev/null +++ b/generated/com/authzed/api/v1/DirectSubjectSet.java @@ -0,0 +1,770 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * DirectSubjectSet is a subject set which is simply a collection of subjects.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.DirectSubjectSet} + */ +public 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.DirectSubjectSet.class, com.authzed.api.v1.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 [json_name = "subjects"]; + */ + @java.lang.Override + public java.util.List getSubjectsList() { + return subjects_; + } + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + @java.lang.Override + public java.util.List + getSubjectsOrBuilderList() { + return subjects_; + } + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + @java.lang.Override + public int getSubjectsCount() { + return subjects_.size(); + } + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReference getSubjects(int index) { + return subjects_.get(index); + } + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + @java.lang.Override + public com.authzed.api.v1.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.DirectSubjectSet)) { + return super.equals(obj); + } + com.authzed.api.v1.DirectSubjectSet other = (com.authzed.api.v1.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.DirectSubjectSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.DirectSubjectSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.DirectSubjectSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.DirectSubjectSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.DirectSubjectSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.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.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.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.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.DirectSubjectSet.class, com.authzed.api.v1.DirectSubjectSet.Builder.class); + } + + // Construct using com.authzed.api.v1.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.DirectSubjectSet getDefaultInstanceForType() { + return com.authzed.api.v1.DirectSubjectSet.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.DirectSubjectSet build() { + com.authzed.api.v1.DirectSubjectSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.DirectSubjectSet buildPartial() { + com.authzed.api.v1.DirectSubjectSet result = new com.authzed.api.v1.DirectSubjectSet(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.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.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.DirectSubjectSet) { + return mergeFrom((com.authzed.api.v1.DirectSubjectSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.DirectSubjectSet other) { + if (other == com.authzed.api.v1.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.SubjectReference m = + input.readMessage( + com.authzed.api.v1.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.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> subjectsBuilder_; + + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + 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 [json_name = "subjects"]; + */ + public int getSubjectsCount() { + if (subjectsBuilder_ == null) { + return subjects_.size(); + } else { + return subjectsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + public com.authzed.api.v1.SubjectReference getSubjects(int index) { + if (subjectsBuilder_ == null) { + return subjects_.get(index); + } else { + return subjectsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + public Builder setSubjects( + int index, com.authzed.api.v1.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 [json_name = "subjects"]; + */ + public Builder setSubjects( + int index, com.authzed.api.v1.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 [json_name = "subjects"]; + */ + public Builder addSubjects(com.authzed.api.v1.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 [json_name = "subjects"]; + */ + public Builder addSubjects( + int index, com.authzed.api.v1.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 [json_name = "subjects"]; + */ + public Builder addSubjects( + com.authzed.api.v1.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 [json_name = "subjects"]; + */ + public Builder addSubjects( + int index, com.authzed.api.v1.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 [json_name = "subjects"]; + */ + 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 [json_name = "subjects"]; + */ + 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 [json_name = "subjects"]; + */ + 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 [json_name = "subjects"]; + */ + public com.authzed.api.v1.SubjectReference.Builder getSubjectsBuilder( + int index) { + return getSubjectsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectsOrBuilder( + int index) { + if (subjectsBuilder_ == null) { + return subjects_.get(index); } else { + return subjectsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + 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 [json_name = "subjects"]; + */ + public com.authzed.api.v1.SubjectReference.Builder addSubjectsBuilder() { + return getSubjectsFieldBuilder().addBuilder( + com.authzed.api.v1.SubjectReference.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + public com.authzed.api.v1.SubjectReference.Builder addSubjectsBuilder( + int index) { + return getSubjectsFieldBuilder().addBuilder( + index, com.authzed.api.v1.SubjectReference.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + public java.util.List + getSubjectsBuilderList() { + return getSubjectsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> + getSubjectsFieldBuilder() { + if (subjectsBuilder_ == null) { + subjectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.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.DirectSubjectSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.DirectSubjectSet(); + } + + public static com.authzed.api.v1.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.DirectSubjectSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/DirectSubjectSetOrBuilder.java b/generated/com/authzed/api/v1/DirectSubjectSetOrBuilder.java new file mode 100644 index 00000000..ce7aa1ee --- /dev/null +++ b/generated/com/authzed/api/v1/DirectSubjectSetOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +public interface DirectSubjectSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.DirectSubjectSet) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + java.util.List + getSubjectsList(); + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + com.authzed.api.v1.SubjectReference getSubjects(int index); + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + int getSubjectsCount(); + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + java.util.List + getSubjectsOrBuilderList(); + /** + * repeated .authzed.api.v1.SubjectReference subjects = 1 [json_name = "subjects"]; + */ + com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectsOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/ErrorReason.java b/generated/com/authzed/api/v1/ErrorReason.java new file mode 100644 index 00000000..f2e09125 --- /dev/null +++ b/generated/com/authzed/api/v1/ErrorReason.java @@ -0,0 +1,1089 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/error_reason.proto + +package com.authzed.api.v1; + +/** + *
+ * Defines the supported values for `google.rpc.ErrorInfo.reason` for the
+ * `authzed.com` error domain.
+ * 
+ * + * Protobuf enum {@code authzed.api.v1.ErrorReason} + */ +public enum ErrorReason + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Do not use this default value.
+   * 
+ * + * ERROR_REASON_UNSPECIFIED = 0; + */ + ERROR_REASON_UNSPECIFIED(0), + /** + *
+   * The request gave a schema that could not be parsed.
+   * Example of an ErrorInfo:
+   *     { 
+   *       "reason": "ERROR_REASON_SCHEMA_PARSE_ERROR",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "start_line_number": "1",
+   *         "start_column_position": "19",
+   *         "end_line_number": "1",
+   *         "end_column_position": "19",
+   *         "source_code": "somedefinition",
+   *       }
+   *     }
+   * The line numbers and column positions are 0-indexed and may not be present.
+   * 
+ * + * ERROR_REASON_SCHEMA_PARSE_ERROR = 1; + */ + ERROR_REASON_SCHEMA_PARSE_ERROR(1), + /** + *
+   * The request contains a schema with a type error.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_SCHEMA_TYPE_ERROR",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         ... additional keys based on the kind of type error ...
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_SCHEMA_TYPE_ERROR = 2; + */ + ERROR_REASON_SCHEMA_TYPE_ERROR(2), + /** + *
+   * The request referenced an unknown object definition in the schema.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_UNKNOWN_DEFINITION",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition"
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_UNKNOWN_DEFINITION = 3; + */ + ERROR_REASON_UNKNOWN_DEFINITION(3), + /** + *
+   * The request referenced an unknown relation or permission under a definition in the schema.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         "relation_or_permission_name": "somepermission"
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION = 4; + */ + ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION(4), + /** + *
+   * The WriteRelationships request contained more updates than the maximum configured.
+   * Example of an ErrorInfo:
+   *     { "reason": "ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "update_count": "525",
+   *         "maximum_updates_allowed": "500",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST = 5; + */ + ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST(5), + /** + *
+   * The request contained more preconditions than the maximum configured.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "precondition_count": "525",
+   *         "maximum_preconditions_allowed": "500",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST = 6; + */ + ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST(6), + /** + *
+   * The request contained a precondition that failed.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "precondition_resource_type": "document",
+   *         ... other fields for the filter ...
+   *         "precondition_operation": "MUST_EXIST",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE = 7; + */ + ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE(7), + /** + *
+   * A write or delete request was made to an instance that is deployed in read-only mode.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_SERVICE_READ_ONLY",
+   *       "domain": "authzed.com"
+   *     }
+   * 
+ * + * ERROR_REASON_SERVICE_READ_ONLY = 8; + */ + ERROR_REASON_SERVICE_READ_ONLY(8), + /** + *
+   * The request referenced an unknown caveat in the schema.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_UNKNOWN_CAVEAT",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "caveat_name": "somecaveat"
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_UNKNOWN_CAVEAT = 9; + */ + ERROR_REASON_UNKNOWN_CAVEAT(9), + /** + *
+   * The request tries to use a subject type that was not valid for a relation.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_INVALID_SUBJECT_TYPE",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         "relation_name": "somerelation",
+   *         "subject_type": "user:*"
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_INVALID_SUBJECT_TYPE = 10; + */ + ERROR_REASON_INVALID_SUBJECT_TYPE(10), + /** + *
+   * The request tries to specify a caveat parameter value with the wrong type.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         "relation_name": "somerelation",
+   *         "caveat_name": "somecaveat",
+   *         "parameter_name": "someparameter",
+   *         "expected_type": "int",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR = 11; + */ + ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR(11), + /** + *
+   * The request tries to perform two or more updates on the same relationship in the same WriteRelationships call.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         "relationship": "somerelationship",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP = 12; + */ + ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP(12), + /** + *
+   * The request tries to write a relationship on a permission instead of a relation.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_CANNOT_UPDATE_PERMISSION",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         "permission_name": "somerelation",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_CANNOT_UPDATE_PERMISSION = 13; + */ + ERROR_REASON_CANNOT_UPDATE_PERMISSION(13), + /** + *
+   * The request failed to evaluate a caveat expression due to an error.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_CAVEAT_EVALUATION_ERROR",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "caveat_name": "somecaveat",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_CAVEAT_EVALUATION_ERROR = 14; + */ + ERROR_REASON_CAVEAT_EVALUATION_ERROR(14), + /** + *
+   * The request failed because the provided cursor was invalid in some way.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_INVALID_CURSOR",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *          ... additional keys based on the kind of cursor error ...
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_INVALID_CURSOR = 15; + */ + ERROR_REASON_INVALID_CURSOR(15), + /** + *
+   * The request failed because there are too many matching relationships to be
+   * deleted within a single transactional deletion call. To avoid, set
+   * `optional_allow_partial_deletions` to true on the DeleteRelationships call.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *          ... fields for the filter ...
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE = 16; + */ + ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE(16), + /** + *
+   * The request failed because the client attempted to write a relationship
+   * with a context that exceeded the configured server limit.
+   * Example of an ErrorInfo:
+   *     {
+   *       "reason": "ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "relationship":     "relationship_exceeding_the_limit",
+   *         "max_allowed_size": "server_max_allowed_context_size",
+   *         "context_size":     "actual_relationship_context_size" ,
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE = 17; + */ + ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE(17), + /** + *
+   * The request failed because a relationship marked to be CREATEd
+   * was already present within the datastore.
+   * Example of an ErrorInfo:
+   *     {
+   *       "reason": "ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "relationship":          "relationship_that_already_existed",
+   *         "resource_type":         "resource type",
+   *         "resource_object_id":    "resource object id",
+   *         ... additional decomposed relationship fields ...
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP = 18; + */ + ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP(18), + /** + *
+   * The request failed because it caused the maximum depth allowed to be
+   * exceeded. This typically indicates that there is a circular data traversal
+   * somewhere in the schema, but can also be raised if the data traversal is simply
+   * too deep.
+   * Example of an ErrorInfo:
+   *     {
+   *       "reason": "ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "maximum_depth_allowed": "50",
+   *         ... additional fields based on request type ...
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED = 19; + */ + ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED(19), + /** + *
+   * The request failed due to a serialization error in the backend database.
+   * This typically indicates that various in flight transactions conflicted with each other
+   * and the database had to abort one or more of them. SpiceDB will retry a few times before returning
+   * the error to the client.
+   * Example of an ErrorInfo:
+   *     {
+   *       "reason": "ERROR_REASON_SERIALIZATION_FAILURE",
+   *       "domain": "authzed.com",
+   *       "metadata": {}
+   *     }
+   * 
+ * + * ERROR_REASON_SERIALIZATION_FAILURE = 20; + */ + ERROR_REASON_SERIALIZATION_FAILURE(20), + /** + *
+   * The request contained more check items than the maximum configured.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "check_count": "525",
+   *         "maximum_checks_allowed": "500",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST = 21; + */ + ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST(21), + /** + *
+   * The request's specified limit is too large.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "limit_provided": "525",
+   *         "maximum_limit_allowed": "500",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT = 22; + */ + ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT(22), + /** + *
+   * The request failed because the provided filter was invalid in some way.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_INVALID_FILTER",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "filter": "...",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_INVALID_FILTER = 23; + */ + ERROR_REASON_INVALID_FILTER(23), + /** + *
+   * The request failed because too many concurrent updates were attempted
+   * against the in-memory datastore.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES",
+   *       "domain": "authzed.com",
+   *       "metadata": {}
+   *     }
+   * 
+ * + * ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES = 24; + */ + ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES(24), + /** + *
+   * The request failed because the precondition specified is empty.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_EMPTY_PRECONDITION",
+   *       "domain": "authzed.com",
+   *       "metadata": {}
+   *     }
+   * 
+ * + * ERROR_REASON_EMPTY_PRECONDITION = 25; + */ + ERROR_REASON_EMPTY_PRECONDITION(25), + /** + *
+   * The request failed because the counter was already registered.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_COUNTER_ALREADY_REGISTERED",
+   *       "domain": "authzed.com",
+   *       "metadata": { "counter_name": "name" }
+   *     }
+   * 
+ * + * ERROR_REASON_COUNTER_ALREADY_REGISTERED = 26; + */ + ERROR_REASON_COUNTER_ALREADY_REGISTERED(26), + /** + *
+   * The request failed because the counter was not registered.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_COUNTER_NOT_REGISTERED",
+   *       "domain": "authzed.com",
+   *       "metadata": { "counter_name": "name"  }
+   *     }
+   * 
+ * + * ERROR_REASON_COUNTER_NOT_REGISTERED = 27; + */ + ERROR_REASON_COUNTER_NOT_REGISTERED(27), + /** + *
+   * The request failed because a wildcard was not allowed. For CheckPermission,
+   * this means that the subject or resource ID was a wildcard. For LookupResources,
+   * this means that the subject ID was a wildcard.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_WILDCARD_NOT_ALLOWED",
+   *       "domain": "authzed.com",
+   *       "metadata": { "disallowed_field": "subject_id" }
+   *     }
+   * 
+ * + * ERROR_REASON_WILDCARD_NOT_ALLOWED = 28; + */ + ERROR_REASON_WILDCARD_NOT_ALLOWED(28), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Do not use this default value.
+   * 
+ * + * ERROR_REASON_UNSPECIFIED = 0; + */ + public static final int ERROR_REASON_UNSPECIFIED_VALUE = 0; + /** + *
+   * The request gave a schema that could not be parsed.
+   * Example of an ErrorInfo:
+   *     { 
+   *       "reason": "ERROR_REASON_SCHEMA_PARSE_ERROR",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "start_line_number": "1",
+   *         "start_column_position": "19",
+   *         "end_line_number": "1",
+   *         "end_column_position": "19",
+   *         "source_code": "somedefinition",
+   *       }
+   *     }
+   * The line numbers and column positions are 0-indexed and may not be present.
+   * 
+ * + * ERROR_REASON_SCHEMA_PARSE_ERROR = 1; + */ + public static final int ERROR_REASON_SCHEMA_PARSE_ERROR_VALUE = 1; + /** + *
+   * The request contains a schema with a type error.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_SCHEMA_TYPE_ERROR",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         ... additional keys based on the kind of type error ...
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_SCHEMA_TYPE_ERROR = 2; + */ + public static final int ERROR_REASON_SCHEMA_TYPE_ERROR_VALUE = 2; + /** + *
+   * The request referenced an unknown object definition in the schema.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_UNKNOWN_DEFINITION",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition"
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_UNKNOWN_DEFINITION = 3; + */ + public static final int ERROR_REASON_UNKNOWN_DEFINITION_VALUE = 3; + /** + *
+   * The request referenced an unknown relation or permission under a definition in the schema.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         "relation_or_permission_name": "somepermission"
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION = 4; + */ + public static final int ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION_VALUE = 4; + /** + *
+   * The WriteRelationships request contained more updates than the maximum configured.
+   * Example of an ErrorInfo:
+   *     { "reason": "ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "update_count": "525",
+   *         "maximum_updates_allowed": "500",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST = 5; + */ + public static final int ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST_VALUE = 5; + /** + *
+   * The request contained more preconditions than the maximum configured.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "precondition_count": "525",
+   *         "maximum_preconditions_allowed": "500",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST = 6; + */ + public static final int ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST_VALUE = 6; + /** + *
+   * The request contained a precondition that failed.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "precondition_resource_type": "document",
+   *         ... other fields for the filter ...
+   *         "precondition_operation": "MUST_EXIST",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE = 7; + */ + public static final int ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE_VALUE = 7; + /** + *
+   * A write or delete request was made to an instance that is deployed in read-only mode.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_SERVICE_READ_ONLY",
+   *       "domain": "authzed.com"
+   *     }
+   * 
+ * + * ERROR_REASON_SERVICE_READ_ONLY = 8; + */ + public static final int ERROR_REASON_SERVICE_READ_ONLY_VALUE = 8; + /** + *
+   * The request referenced an unknown caveat in the schema.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_UNKNOWN_CAVEAT",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "caveat_name": "somecaveat"
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_UNKNOWN_CAVEAT = 9; + */ + public static final int ERROR_REASON_UNKNOWN_CAVEAT_VALUE = 9; + /** + *
+   * The request tries to use a subject type that was not valid for a relation.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_INVALID_SUBJECT_TYPE",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         "relation_name": "somerelation",
+   *         "subject_type": "user:*"
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_INVALID_SUBJECT_TYPE = 10; + */ + public static final int ERROR_REASON_INVALID_SUBJECT_TYPE_VALUE = 10; + /** + *
+   * The request tries to specify a caveat parameter value with the wrong type.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         "relation_name": "somerelation",
+   *         "caveat_name": "somecaveat",
+   *         "parameter_name": "someparameter",
+   *         "expected_type": "int",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR = 11; + */ + public static final int ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR_VALUE = 11; + /** + *
+   * The request tries to perform two or more updates on the same relationship in the same WriteRelationships call.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         "relationship": "somerelationship",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP = 12; + */ + public static final int ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP_VALUE = 12; + /** + *
+   * The request tries to write a relationship on a permission instead of a relation.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_CANNOT_UPDATE_PERMISSION",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "definition_name": "somedefinition",
+   *         "permission_name": "somerelation",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_CANNOT_UPDATE_PERMISSION = 13; + */ + public static final int ERROR_REASON_CANNOT_UPDATE_PERMISSION_VALUE = 13; + /** + *
+   * The request failed to evaluate a caveat expression due to an error.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_CAVEAT_EVALUATION_ERROR",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "caveat_name": "somecaveat",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_CAVEAT_EVALUATION_ERROR = 14; + */ + public static final int ERROR_REASON_CAVEAT_EVALUATION_ERROR_VALUE = 14; + /** + *
+   * The request failed because the provided cursor was invalid in some way.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_INVALID_CURSOR",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *          ... additional keys based on the kind of cursor error ...
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_INVALID_CURSOR = 15; + */ + public static final int ERROR_REASON_INVALID_CURSOR_VALUE = 15; + /** + *
+   * The request failed because there are too many matching relationships to be
+   * deleted within a single transactional deletion call. To avoid, set
+   * `optional_allow_partial_deletions` to true on the DeleteRelationships call.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *          ... fields for the filter ...
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE = 16; + */ + public static final int ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE_VALUE = 16; + /** + *
+   * The request failed because the client attempted to write a relationship
+   * with a context that exceeded the configured server limit.
+   * Example of an ErrorInfo:
+   *     {
+   *       "reason": "ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "relationship":     "relationship_exceeding_the_limit",
+   *         "max_allowed_size": "server_max_allowed_context_size",
+   *         "context_size":     "actual_relationship_context_size" ,
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE = 17; + */ + public static final int ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE_VALUE = 17; + /** + *
+   * The request failed because a relationship marked to be CREATEd
+   * was already present within the datastore.
+   * Example of an ErrorInfo:
+   *     {
+   *       "reason": "ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "relationship":          "relationship_that_already_existed",
+   *         "resource_type":         "resource type",
+   *         "resource_object_id":    "resource object id",
+   *         ... additional decomposed relationship fields ...
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP = 18; + */ + public static final int ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP_VALUE = 18; + /** + *
+   * The request failed because it caused the maximum depth allowed to be
+   * exceeded. This typically indicates that there is a circular data traversal
+   * somewhere in the schema, but can also be raised if the data traversal is simply
+   * too deep.
+   * Example of an ErrorInfo:
+   *     {
+   *       "reason": "ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "maximum_depth_allowed": "50",
+   *         ... additional fields based on request type ...
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED = 19; + */ + public static final int ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED_VALUE = 19; + /** + *
+   * The request failed due to a serialization error in the backend database.
+   * This typically indicates that various in flight transactions conflicted with each other
+   * and the database had to abort one or more of them. SpiceDB will retry a few times before returning
+   * the error to the client.
+   * Example of an ErrorInfo:
+   *     {
+   *       "reason": "ERROR_REASON_SERIALIZATION_FAILURE",
+   *       "domain": "authzed.com",
+   *       "metadata": {}
+   *     }
+   * 
+ * + * ERROR_REASON_SERIALIZATION_FAILURE = 20; + */ + public static final int ERROR_REASON_SERIALIZATION_FAILURE_VALUE = 20; + /** + *
+   * The request contained more check items than the maximum configured.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "check_count": "525",
+   *         "maximum_checks_allowed": "500",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST = 21; + */ + public static final int ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST_VALUE = 21; + /** + *
+   * The request's specified limit is too large.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "limit_provided": "525",
+   *         "maximum_limit_allowed": "500",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT = 22; + */ + public static final int ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT_VALUE = 22; + /** + *
+   * The request failed because the provided filter was invalid in some way.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_INVALID_FILTER",
+   *       "domain": "authzed.com",
+   *       "metadata": {
+   *         "filter": "...",
+   *       }
+   *     }
+   * 
+ * + * ERROR_REASON_INVALID_FILTER = 23; + */ + public static final int ERROR_REASON_INVALID_FILTER_VALUE = 23; + /** + *
+   * The request failed because too many concurrent updates were attempted
+   * against the in-memory datastore.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES",
+   *       "domain": "authzed.com",
+   *       "metadata": {}
+   *     }
+   * 
+ * + * ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES = 24; + */ + public static final int ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES_VALUE = 24; + /** + *
+   * The request failed because the precondition specified is empty.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_EMPTY_PRECONDITION",
+   *       "domain": "authzed.com",
+   *       "metadata": {}
+   *     }
+   * 
+ * + * ERROR_REASON_EMPTY_PRECONDITION = 25; + */ + public static final int ERROR_REASON_EMPTY_PRECONDITION_VALUE = 25; + /** + *
+   * The request failed because the counter was already registered.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_COUNTER_ALREADY_REGISTERED",
+   *       "domain": "authzed.com",
+   *       "metadata": { "counter_name": "name" }
+   *     }
+   * 
+ * + * ERROR_REASON_COUNTER_ALREADY_REGISTERED = 26; + */ + public static final int ERROR_REASON_COUNTER_ALREADY_REGISTERED_VALUE = 26; + /** + *
+   * The request failed because the counter was not registered.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_COUNTER_NOT_REGISTERED",
+   *       "domain": "authzed.com",
+   *       "metadata": { "counter_name": "name"  }
+   *     }
+   * 
+ * + * ERROR_REASON_COUNTER_NOT_REGISTERED = 27; + */ + public static final int ERROR_REASON_COUNTER_NOT_REGISTERED_VALUE = 27; + /** + *
+   * The request failed because a wildcard was not allowed. For CheckPermission,
+   * this means that the subject or resource ID was a wildcard. For LookupResources,
+   * this means that the subject ID was a wildcard.
+   * Example of an ErrorInfo:
+   *     {  
+   *       "reason": "ERROR_REASON_WILDCARD_NOT_ALLOWED",
+   *       "domain": "authzed.com",
+   *       "metadata": { "disallowed_field": "subject_id" }
+   *     }
+   * 
+ * + * ERROR_REASON_WILDCARD_NOT_ALLOWED = 28; + */ + public static final int ERROR_REASON_WILDCARD_NOT_ALLOWED_VALUE = 28; + + + 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 ErrorReason 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 ErrorReason forNumber(int value) { + switch (value) { + case 0: return ERROR_REASON_UNSPECIFIED; + case 1: return ERROR_REASON_SCHEMA_PARSE_ERROR; + case 2: return ERROR_REASON_SCHEMA_TYPE_ERROR; + case 3: return ERROR_REASON_UNKNOWN_DEFINITION; + case 4: return ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION; + case 5: return ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST; + case 6: return ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST; + case 7: return ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE; + case 8: return ERROR_REASON_SERVICE_READ_ONLY; + case 9: return ERROR_REASON_UNKNOWN_CAVEAT; + case 10: return ERROR_REASON_INVALID_SUBJECT_TYPE; + case 11: return ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR; + case 12: return ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP; + case 13: return ERROR_REASON_CANNOT_UPDATE_PERMISSION; + case 14: return ERROR_REASON_CAVEAT_EVALUATION_ERROR; + case 15: return ERROR_REASON_INVALID_CURSOR; + case 16: return ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE; + case 17: return ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE; + case 18: return ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP; + case 19: return ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED; + case 20: return ERROR_REASON_SERIALIZATION_FAILURE; + case 21: return ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST; + case 22: return ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT; + case 23: return ERROR_REASON_INVALID_FILTER; + case 24: return ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES; + case 25: return ERROR_REASON_EMPTY_PRECONDITION; + case 26: return ERROR_REASON_COUNTER_ALREADY_REGISTERED; + case 27: return ERROR_REASON_COUNTER_NOT_REGISTERED; + case 28: return ERROR_REASON_WILDCARD_NOT_ALLOWED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ErrorReason> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ErrorReason findValueByNumber(int number) { + return ErrorReason.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.ErrorReasonOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final ErrorReason[] VALUES = values(); + + public static ErrorReason 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 ErrorReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v1.ErrorReason) +} + diff --git a/generated/com/authzed/api/v1/ErrorReasonOuterClass.java b/generated/com/authzed/api/v1/ErrorReasonOuterClass.java new file mode 100644 index 00000000..02d1a8e7 --- /dev/null +++ b/generated/com/authzed/api/v1/ErrorReasonOuterClass.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/error_reason.proto + +package com.authzed.api.v1; + +public final class ErrorReasonOuterClass { + private ErrorReasonOuterClass() {} + 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 static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!authzed/api/v1/error_reason.proto\022\016aut" + + "hzed.api.v1*\361\t\n\013ErrorReason\022\034\n\030ERROR_REA" + + "SON_UNSPECIFIED\020\000\022#\n\037ERROR_REASON_SCHEMA" + + "_PARSE_ERROR\020\001\022\"\n\036ERROR_REASON_SCHEMA_TY" + + "PE_ERROR\020\002\022#\n\037ERROR_REASON_UNKNOWN_DEFIN" + + "ITION\020\003\022/\n+ERROR_REASON_UNKNOWN_RELATION" + + "_OR_PERMISSION\020\004\022,\n(ERROR_REASON_TOO_MAN" + + "Y_UPDATES_IN_REQUEST\020\005\0222\n.ERROR_REASON_T" + + "OO_MANY_PRECONDITIONS_IN_REQUEST\020\006\0225\n1ER" + + "ROR_REASON_WRITE_OR_DELETE_PRECONDITION_" + + "FAILURE\020\007\022\"\n\036ERROR_REASON_SERVICE_READ_O" + + "NLY\020\010\022\037\n\033ERROR_REASON_UNKNOWN_CAVEAT\020\t\022%" + + "\n!ERROR_REASON_INVALID_SUBJECT_TYPE\020\n\022,\n" + + "(ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERRO" + + "R\020\013\022-\n)ERROR_REASON_UPDATES_ON_SAME_RELA" + + "TIONSHIP\020\014\022)\n%ERROR_REASON_CANNOT_UPDATE" + + "_PERMISSION\020\r\022(\n$ERROR_REASON_CAVEAT_EVA" + + "LUATION_ERROR\020\016\022\037\n\033ERROR_REASON_INVALID_" + + "CURSOR\020\017\022@\n + * ExpCaveat is the representation of a caveat in the schema. + * + * + * Protobuf type {@code authzed.api.v1.ExpCaveat} + */ +public final class ExpCaveat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpCaveat) + ExpCaveatOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpCaveat.newBuilder() to construct. + private ExpCaveat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpCaveat() { + name_ = ""; + comment_ = ""; + parameters_ = java.util.Collections.emptyList(); + expression_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpCaveat(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpCaveat.class, com.authzed.api.v1.ExpCaveat.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMENT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object comment_ = ""; + /** + *
+   * comment is a human-readable comments on the caveat. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + @java.lang.Override + public java.lang.String getComment() { + java.lang.Object ref = comment_; + 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(); + comment_ = s; + return s; + } + } + /** + *
+   * comment is a human-readable comments on the caveat. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List parameters_; + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + @java.lang.Override + public java.util.List getParametersList() { + return parameters_; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + @java.lang.Override + public java.util.List + getParametersOrBuilderList() { + return parameters_; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + @java.lang.Override + public int getParametersCount() { + return parameters_.size(); + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameter getParameters(int index) { + return parameters_.get(index); + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterOrBuilder getParametersOrBuilder( + int index) { + return parameters_.get(index); + } + + public static final int EXPRESSION_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object expression_ = ""; + /** + * string expression = 4 [json_name = "expression"]; + * @return The expression. + */ + @java.lang.Override + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + 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(); + expression_ = s; + return s; + } + } + /** + * string expression = 4 [json_name = "expression"]; + * @return The bytes for expression. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expression_ = 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comment_); + } + for (int i = 0; i < parameters_.size(); i++) { + output.writeMessage(3, parameters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, expression_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comment_); + } + for (int i = 0; i < parameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, parameters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expression_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, expression_); + } + 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.ExpCaveat)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpCaveat other = (com.authzed.api.v1.ExpCaveat) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getComment() + .equals(other.getComment())) return false; + if (!getParametersList() + .equals(other.getParametersList())) return false; + if (!getExpression() + .equals(other.getExpression())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + COMMENT_FIELD_NUMBER; + hash = (53 * hash) + getComment().hashCode(); + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + hash = (37 * hash) + EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getExpression().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpCaveat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpCaveat 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.ExpCaveat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpCaveat 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.ExpCaveat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpCaveat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpCaveat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpCaveat 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.ExpCaveat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpCaveat 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.ExpCaveat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpCaveat 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.ExpCaveat 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; + } + /** + *
+   * ExpCaveat is the representation of a caveat in the schema.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ExpCaveat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpCaveat) + com.authzed.api.v1.ExpCaveatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpCaveat.class, com.authzed.api.v1.ExpCaveat.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpCaveat.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + comment_ = ""; + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + } else { + parameters_ = null; + parametersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + expression_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveat_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpCaveat getDefaultInstanceForType() { + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpCaveat build() { + com.authzed.api.v1.ExpCaveat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpCaveat buildPartial() { + com.authzed.api.v1.ExpCaveat result = new com.authzed.api.v1.ExpCaveat(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.ExpCaveat result) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.ExpCaveat result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.comment_ = comment_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.expression_ = expression_; + } + } + + @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.ExpCaveat) { + return mergeFrom((com.authzed.api.v1.ExpCaveat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpCaveat other) { + if (other == com.authzed.api.v1.ExpCaveat.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getComment().isEmpty()) { + comment_ = other.comment_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (parametersBuilder_ == null) { + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + } else { + if (!other.parameters_.isEmpty()) { + if (parametersBuilder_.isEmpty()) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000004); + parametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getParametersFieldBuilder() : null; + } else { + parametersBuilder_.addAllMessages(other.parameters_); + } + } + } + if (!other.getExpression().isEmpty()) { + expression_ = other.expression_; + bitField0_ |= 0x00000008; + 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: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + comment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.authzed.api.v1.ExpCaveatParameter m = + input.readMessage( + com.authzed.api.v1.ExpCaveatParameter.parser(), + extensionRegistry); + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(m); + } else { + parametersBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + expression_ = 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 bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object comment_ = ""; + /** + *
+     * comment is a human-readable comments on the caveat. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + public java.lang.String getComment() { + java.lang.Object ref = comment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * comment is a human-readable comments on the caveat. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + public com.google.protobuf.ByteString + getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * comment is a human-readable comments on the caveat. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @param value The comment to set. + * @return This builder for chaining. + */ + public Builder setComment( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + comment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * comment is a human-readable comments on the caveat. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return This builder for chaining. + */ + public Builder clearComment() { + comment_ = getDefaultInstance().getComment(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * comment is a human-readable comments on the caveat. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @param value The bytes for comment to set. + * @return This builder for chaining. + */ + public Builder setCommentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + comment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List parameters_ = + java.util.Collections.emptyList(); + private void ensureParametersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + parameters_ = new java.util.ArrayList(parameters_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder> parametersBuilder_; + + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public java.util.List getParametersList() { + if (parametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameters_); + } else { + return parametersBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public int getParametersCount() { + if (parametersBuilder_ == null) { + return parameters_.size(); + } else { + return parametersBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public com.authzed.api.v1.ExpCaveatParameter getParameters(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public Builder setParameters( + int index, com.authzed.api.v1.ExpCaveatParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + onChanged(); + } else { + parametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public Builder setParameters( + int index, com.authzed.api.v1.ExpCaveatParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.set(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public Builder addParameters(com.authzed.api.v1.ExpCaveatParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + onChanged(); + } else { + parametersBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public Builder addParameters( + int index, com.authzed.api.v1.ExpCaveatParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(index, value); + onChanged(); + } else { + parametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public Builder addParameters( + com.authzed.api.v1.ExpCaveatParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public Builder addParameters( + int index, com.authzed.api.v1.ExpCaveatParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public Builder addAllParameters( + java.lang.Iterable values) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, parameters_); + onChanged(); + } else { + parametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + parametersBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public Builder removeParameters(int index) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.remove(index); + onChanged(); + } else { + parametersBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public com.authzed.api.v1.ExpCaveatParameter.Builder getParametersBuilder( + int index) { + return getParametersFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public com.authzed.api.v1.ExpCaveatParameterOrBuilder getParametersOrBuilder( + int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); } else { + return parametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public java.util.List + getParametersOrBuilderList() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameters_); + } + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public com.authzed.api.v1.ExpCaveatParameter.Builder addParametersBuilder() { + return getParametersFieldBuilder().addBuilder( + com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public com.authzed.api.v1.ExpCaveatParameter.Builder addParametersBuilder( + int index) { + return getParametersFieldBuilder().addBuilder( + index, com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + public java.util.List + getParametersBuilderList() { + return getParametersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder>( + parameters_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + private java.lang.Object expression_ = ""; + /** + * string expression = 4 [json_name = "expression"]; + * @return The expression. + */ + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expression_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string expression = 4 [json_name = "expression"]; + * @return The bytes for expression. + */ + public com.google.protobuf.ByteString + getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string expression = 4 [json_name = "expression"]; + * @param value The expression to set. + * @return This builder for chaining. + */ + public Builder setExpression( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + expression_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string expression = 4 [json_name = "expression"]; + * @return This builder for chaining. + */ + public Builder clearExpression() { + expression_ = getDefaultInstance().getExpression(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string expression = 4 [json_name = "expression"]; + * @param value The bytes for expression to set. + * @return This builder for chaining. + */ + public Builder setExpressionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + expression_ = 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.ExpCaveat) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpCaveat) + private static final com.authzed.api.v1.ExpCaveat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpCaveat(); + } + + public static com.authzed.api.v1.ExpCaveat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpCaveat 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.ExpCaveat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpCaveatOrBuilder.java b/generated/com/authzed/api/v1/ExpCaveatOrBuilder.java new file mode 100644 index 00000000..55e87162 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpCaveatOrBuilder.java @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpCaveatOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpCaveat) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * comment is a human-readable comments on the caveat. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + java.lang.String getComment(); + /** + *
+   * comment is a human-readable comments on the caveat. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + com.google.protobuf.ByteString + getCommentBytes(); + + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + java.util.List + getParametersList(); + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + com.authzed.api.v1.ExpCaveatParameter getParameters(int index); + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + int getParametersCount(); + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + java.util.List + getParametersOrBuilderList(); + /** + * repeated .authzed.api.v1.ExpCaveatParameter parameters = 3 [json_name = "parameters"]; + */ + com.authzed.api.v1.ExpCaveatParameterOrBuilder getParametersOrBuilder( + int index); + + /** + * string expression = 4 [json_name = "expression"]; + * @return The expression. + */ + java.lang.String getExpression(); + /** + * string expression = 4 [json_name = "expression"]; + * @return The bytes for expression. + */ + com.google.protobuf.ByteString + getExpressionBytes(); +} diff --git a/generated/com/authzed/api/v1/ExpCaveatParameter.java b/generated/com/authzed/api/v1/ExpCaveatParameter.java new file mode 100644 index 00000000..2d10e86d --- /dev/null +++ b/generated/com/authzed/api/v1/ExpCaveatParameter.java @@ -0,0 +1,859 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ExpCaveatParameter is the representation of a parameter in a caveat.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ExpCaveatParameter} + */ +public final class ExpCaveatParameter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpCaveatParameter) + ExpCaveatParameterOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpCaveatParameter.newBuilder() to construct. + private ExpCaveatParameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpCaveatParameter() { + name_ = ""; + type_ = ""; + parentCaveatName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpCaveatParameter(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveatParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveatParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpCaveatParameter.class, com.authzed.api.v1.ExpCaveatParameter.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * type is the type of the parameter. Will be a string representing the
+   * type, e.g. `int` or `list<string>`
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + /** + *
+   * type is the type of the parameter. Will be a string representing the
+   * type, e.g. `int` or `list<string>`
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_CAVEAT_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object parentCaveatName_ = ""; + /** + * string parent_caveat_name = 3 [json_name = "parentCaveatName"]; + * @return The parentCaveatName. + */ + @java.lang.Override + public java.lang.String getParentCaveatName() { + java.lang.Object ref = parentCaveatName_; + 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(); + parentCaveatName_ = s; + return s; + } + } + /** + * string parent_caveat_name = 3 [json_name = "parentCaveatName"]; + * @return The bytes for parentCaveatName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentCaveatNameBytes() { + java.lang.Object ref = parentCaveatName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentCaveatName_ = 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentCaveatName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parentCaveatName_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentCaveatName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parentCaveatName_); + } + 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.ExpCaveatParameter)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpCaveatParameter other = (com.authzed.api.v1.ExpCaveatParameter) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getType() + .equals(other.getType())) return false; + if (!getParentCaveatName() + .equals(other.getParentCaveatName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + PARENT_CAVEAT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getParentCaveatName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpCaveatParameter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpCaveatParameter 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.ExpCaveatParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpCaveatParameter 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.ExpCaveatParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpCaveatParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpCaveatParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpCaveatParameter 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.ExpCaveatParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpCaveatParameter 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.ExpCaveatParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpCaveatParameter 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.ExpCaveatParameter 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; + } + /** + *
+   * ExpCaveatParameter is the representation of a parameter in a caveat.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ExpCaveatParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpCaveatParameter) + com.authzed.api.v1.ExpCaveatParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveatParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveatParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpCaveatParameter.class, com.authzed.api.v1.ExpCaveatParameter.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpCaveatParameter.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = ""; + parentCaveatName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveatParameter_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameter getDefaultInstanceForType() { + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameter build() { + com.authzed.api.v1.ExpCaveatParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameter buildPartial() { + com.authzed.api.v1.ExpCaveatParameter result = new com.authzed.api.v1.ExpCaveatParameter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExpCaveatParameter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.parentCaveatName_ = parentCaveatName_; + } + } + + @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.ExpCaveatParameter) { + return mergeFrom((com.authzed.api.v1.ExpCaveatParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpCaveatParameter other) { + if (other == com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getParentCaveatName().isEmpty()) { + parentCaveatName_ = other.parentCaveatName_; + bitField0_ |= 0x00000004; + 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: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + parentCaveatName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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 name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + *
+     * type is the type of the parameter. Will be a string representing the
+     * type, e.g. `int` or `list<string>`
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * type is the type of the parameter. Will be a string representing the
+     * type, e.g. `int` or `list<string>`
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * type is the type of the parameter. Will be a string representing the
+     * type, e.g. `int` or `list<string>`
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * type is the type of the parameter. Will be a string representing the
+     * type, e.g. `int` or `list<string>`
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * type is the type of the parameter. Will be a string representing the
+     * type, e.g. `int` or `list<string>`
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object parentCaveatName_ = ""; + /** + * string parent_caveat_name = 3 [json_name = "parentCaveatName"]; + * @return The parentCaveatName. + */ + public java.lang.String getParentCaveatName() { + java.lang.Object ref = parentCaveatName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentCaveatName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string parent_caveat_name = 3 [json_name = "parentCaveatName"]; + * @return The bytes for parentCaveatName. + */ + public com.google.protobuf.ByteString + getParentCaveatNameBytes() { + java.lang.Object ref = parentCaveatName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentCaveatName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string parent_caveat_name = 3 [json_name = "parentCaveatName"]; + * @param value The parentCaveatName to set. + * @return This builder for chaining. + */ + public Builder setParentCaveatName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parentCaveatName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string parent_caveat_name = 3 [json_name = "parentCaveatName"]; + * @return This builder for chaining. + */ + public Builder clearParentCaveatName() { + parentCaveatName_ = getDefaultInstance().getParentCaveatName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string parent_caveat_name = 3 [json_name = "parentCaveatName"]; + * @param value The bytes for parentCaveatName to set. + * @return This builder for chaining. + */ + public Builder setParentCaveatNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parentCaveatName_ = value; + bitField0_ |= 0x00000004; + 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.ExpCaveatParameter) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpCaveatParameter) + private static final com.authzed.api.v1.ExpCaveatParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpCaveatParameter(); + } + + public static com.authzed.api.v1.ExpCaveatParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpCaveatParameter 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.ExpCaveatParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpCaveatParameterOrBuilder.java b/generated/com/authzed/api/v1/ExpCaveatParameterOrBuilder.java new file mode 100644 index 00000000..d99613ab --- /dev/null +++ b/generated/com/authzed/api/v1/ExpCaveatParameterOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpCaveatParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpCaveatParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * type is the type of the parameter. Will be a string representing the
+   * type, e.g. `int` or `list<string>`
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * type is the type of the parameter. Will be a string representing the
+   * type, e.g. `int` or `list<string>`
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * string parent_caveat_name = 3 [json_name = "parentCaveatName"]; + * @return The parentCaveatName. + */ + java.lang.String getParentCaveatName(); + /** + * string parent_caveat_name = 3 [json_name = "parentCaveatName"]; + * @return The bytes for parentCaveatName. + */ + com.google.protobuf.ByteString + getParentCaveatNameBytes(); +} diff --git a/generated/com/authzed/api/v1/ExpCaveatParameterTypeChange.java b/generated/com/authzed/api/v1/ExpCaveatParameterTypeChange.java new file mode 100644 index 00000000..202b9eac --- /dev/null +++ b/generated/com/authzed/api/v1/ExpCaveatParameterTypeChange.java @@ -0,0 +1,725 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExpCaveatParameterTypeChange} + */ +public final class ExpCaveatParameterTypeChange extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpCaveatParameterTypeChange) + ExpCaveatParameterTypeChangeOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpCaveatParameterTypeChange.newBuilder() to construct. + private ExpCaveatParameterTypeChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpCaveatParameterTypeChange() { + previousType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpCaveatParameterTypeChange(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveatParameterTypeChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveatParameterTypeChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpCaveatParameterTypeChange.class, com.authzed.api.v1.ExpCaveatParameterTypeChange.Builder.class); + } + + public static final int PARAMETER_FIELD_NUMBER = 1; + private com.authzed.api.v1.ExpCaveatParameter parameter_; + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + * @return Whether the parameter field is set. + */ + @java.lang.Override + public boolean hasParameter() { + return parameter_ != null; + } + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + * @return The parameter. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameter getParameter() { + return parameter_ == null ? com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance() : parameter_; + } + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterOrBuilder getParameterOrBuilder() { + return parameter_ == null ? com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance() : parameter_; + } + + public static final int PREVIOUS_TYPE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object previousType_ = ""; + /** + * string previous_type = 2 [json_name = "previousType"]; + * @return The previousType. + */ + @java.lang.Override + public java.lang.String getPreviousType() { + java.lang.Object ref = previousType_; + 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(); + previousType_ = s; + return s; + } + } + /** + * string previous_type = 2 [json_name = "previousType"]; + * @return The bytes for previousType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPreviousTypeBytes() { + java.lang.Object ref = previousType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + previousType_ = 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 (parameter_ != null) { + output.writeMessage(1, getParameter()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(previousType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, previousType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (parameter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getParameter()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(previousType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, previousType_); + } + 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.ExpCaveatParameterTypeChange)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpCaveatParameterTypeChange other = (com.authzed.api.v1.ExpCaveatParameterTypeChange) obj; + + if (hasParameter() != other.hasParameter()) return false; + if (hasParameter()) { + if (!getParameter() + .equals(other.getParameter())) return false; + } + if (!getPreviousType() + .equals(other.getPreviousType())) 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 (hasParameter()) { + hash = (37 * hash) + PARAMETER_FIELD_NUMBER; + hash = (53 * hash) + getParameter().hashCode(); + } + hash = (37 * hash) + PREVIOUS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPreviousType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpCaveatParameterTypeChange parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpCaveatParameterTypeChange 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.ExpCaveatParameterTypeChange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpCaveatParameterTypeChange 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.ExpCaveatParameterTypeChange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpCaveatParameterTypeChange parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpCaveatParameterTypeChange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpCaveatParameterTypeChange 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.ExpCaveatParameterTypeChange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpCaveatParameterTypeChange 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.ExpCaveatParameterTypeChange parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpCaveatParameterTypeChange 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.ExpCaveatParameterTypeChange 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExpCaveatParameterTypeChange} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpCaveatParameterTypeChange) + com.authzed.api.v1.ExpCaveatParameterTypeChangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveatParameterTypeChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveatParameterTypeChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpCaveatParameterTypeChange.class, com.authzed.api.v1.ExpCaveatParameterTypeChange.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpCaveatParameterTypeChange.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parameter_ = null; + if (parameterBuilder_ != null) { + parameterBuilder_.dispose(); + parameterBuilder_ = null; + } + previousType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpCaveatParameterTypeChange_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterTypeChange getDefaultInstanceForType() { + return com.authzed.api.v1.ExpCaveatParameterTypeChange.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterTypeChange build() { + com.authzed.api.v1.ExpCaveatParameterTypeChange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterTypeChange buildPartial() { + com.authzed.api.v1.ExpCaveatParameterTypeChange result = new com.authzed.api.v1.ExpCaveatParameterTypeChange(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExpCaveatParameterTypeChange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parameter_ = parameterBuilder_ == null + ? parameter_ + : parameterBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.previousType_ = previousType_; + } + } + + @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.ExpCaveatParameterTypeChange) { + return mergeFrom((com.authzed.api.v1.ExpCaveatParameterTypeChange)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpCaveatParameterTypeChange other) { + if (other == com.authzed.api.v1.ExpCaveatParameterTypeChange.getDefaultInstance()) return this; + if (other.hasParameter()) { + mergeParameter(other.getParameter()); + } + if (!other.getPreviousType().isEmpty()) { + previousType_ = other.previousType_; + 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( + getParameterFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + previousType_ = 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.ExpCaveatParameter parameter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder> parameterBuilder_; + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + * @return Whether the parameter field is set. + */ + public boolean hasParameter() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + * @return The parameter. + */ + public com.authzed.api.v1.ExpCaveatParameter getParameter() { + if (parameterBuilder_ == null) { + return parameter_ == null ? com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance() : parameter_; + } else { + return parameterBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + */ + public Builder setParameter(com.authzed.api.v1.ExpCaveatParameter value) { + if (parameterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameter_ = value; + } else { + parameterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + */ + public Builder setParameter( + com.authzed.api.v1.ExpCaveatParameter.Builder builderForValue) { + if (parameterBuilder_ == null) { + parameter_ = builderForValue.build(); + } else { + parameterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + */ + public Builder mergeParameter(com.authzed.api.v1.ExpCaveatParameter value) { + if (parameterBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + parameter_ != null && + parameter_ != com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance()) { + getParameterBuilder().mergeFrom(value); + } else { + parameter_ = value; + } + } else { + parameterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + */ + public Builder clearParameter() { + bitField0_ = (bitField0_ & ~0x00000001); + parameter_ = null; + if (parameterBuilder_ != null) { + parameterBuilder_.dispose(); + parameterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + */ + public com.authzed.api.v1.ExpCaveatParameter.Builder getParameterBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getParameterFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + */ + public com.authzed.api.v1.ExpCaveatParameterOrBuilder getParameterOrBuilder() { + if (parameterBuilder_ != null) { + return parameterBuilder_.getMessageOrBuilder(); + } else { + return parameter_ == null ? + com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance() : parameter_; + } + } + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder> + getParameterFieldBuilder() { + if (parameterBuilder_ == null) { + parameterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder>( + getParameter(), + getParentForChildren(), + isClean()); + parameter_ = null; + } + return parameterBuilder_; + } + + private java.lang.Object previousType_ = ""; + /** + * string previous_type = 2 [json_name = "previousType"]; + * @return The previousType. + */ + public java.lang.String getPreviousType() { + java.lang.Object ref = previousType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + previousType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string previous_type = 2 [json_name = "previousType"]; + * @return The bytes for previousType. + */ + public com.google.protobuf.ByteString + getPreviousTypeBytes() { + java.lang.Object ref = previousType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + previousType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string previous_type = 2 [json_name = "previousType"]; + * @param value The previousType to set. + * @return This builder for chaining. + */ + public Builder setPreviousType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + previousType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string previous_type = 2 [json_name = "previousType"]; + * @return This builder for chaining. + */ + public Builder clearPreviousType() { + previousType_ = getDefaultInstance().getPreviousType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string previous_type = 2 [json_name = "previousType"]; + * @param value The bytes for previousType to set. + * @return This builder for chaining. + */ + public Builder setPreviousTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + previousType_ = 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.ExpCaveatParameterTypeChange) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpCaveatParameterTypeChange) + private static final com.authzed.api.v1.ExpCaveatParameterTypeChange DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpCaveatParameterTypeChange(); + } + + public static com.authzed.api.v1.ExpCaveatParameterTypeChange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpCaveatParameterTypeChange 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.ExpCaveatParameterTypeChange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpCaveatParameterTypeChangeOrBuilder.java b/generated/com/authzed/api/v1/ExpCaveatParameterTypeChangeOrBuilder.java new file mode 100644 index 00000000..6684d3e1 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpCaveatParameterTypeChangeOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpCaveatParameterTypeChangeOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpCaveatParameterTypeChange) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + * @return Whether the parameter field is set. + */ + boolean hasParameter(); + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + * @return The parameter. + */ + com.authzed.api.v1.ExpCaveatParameter getParameter(); + /** + * .authzed.api.v1.ExpCaveatParameter parameter = 1 [json_name = "parameter"]; + */ + com.authzed.api.v1.ExpCaveatParameterOrBuilder getParameterOrBuilder(); + + /** + * string previous_type = 2 [json_name = "previousType"]; + * @return The previousType. + */ + java.lang.String getPreviousType(); + /** + * string previous_type = 2 [json_name = "previousType"]; + * @return The bytes for previousType. + */ + com.google.protobuf.ByteString + getPreviousTypeBytes(); +} diff --git a/generated/com/authzed/api/v1/ExpDefinition.java b/generated/com/authzed/api/v1/ExpDefinition.java new file mode 100644 index 00000000..f1b235dd --- /dev/null +++ b/generated/com/authzed/api/v1/ExpDefinition.java @@ -0,0 +1,1427 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ExpDefinition is the representation of a definition in the schema.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ExpDefinition} + */ +public final class ExpDefinition extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpDefinition) + ExpDefinitionOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpDefinition.newBuilder() to construct. + private ExpDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpDefinition() { + name_ = ""; + comment_ = ""; + relations_ = java.util.Collections.emptyList(); + permissions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpDefinition(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpDefinition.class, com.authzed.api.v1.ExpDefinition.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMENT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object comment_ = ""; + /** + *
+   * comment is a human-readable comments on the definition. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + @java.lang.Override + public java.lang.String getComment() { + java.lang.Object ref = comment_; + 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(); + comment_ = s; + return s; + } + } + /** + *
+   * comment is a human-readable comments on the definition. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATIONS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List relations_; + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + @java.lang.Override + public java.util.List getRelationsList() { + return relations_; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + @java.lang.Override + public java.util.List + getRelationsOrBuilderList() { + return relations_; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + @java.lang.Override + public int getRelationsCount() { + return relations_.size(); + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelation getRelations(int index) { + return relations_.get(index); + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationOrBuilder getRelationsOrBuilder( + int index) { + return relations_.get(index); + } + + public static final int PERMISSIONS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List permissions_; + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + @java.lang.Override + public java.util.List getPermissionsList() { + return permissions_; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + @java.lang.Override + public java.util.List + getPermissionsOrBuilderList() { + return permissions_; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + @java.lang.Override + public int getPermissionsCount() { + return permissions_.size(); + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermission getPermissions(int index) { + return permissions_.get(index); + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermissionOrBuilder getPermissionsOrBuilder( + int index) { + return permissions_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comment_); + } + for (int i = 0; i < relations_.size(); i++) { + output.writeMessage(3, relations_.get(i)); + } + for (int i = 0; i < permissions_.size(); i++) { + output.writeMessage(4, permissions_.get(i)); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comment_); + } + for (int i = 0; i < relations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, relations_.get(i)); + } + for (int i = 0; i < permissions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, permissions_.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.ExpDefinition)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpDefinition other = (com.authzed.api.v1.ExpDefinition) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getComment() + .equals(other.getComment())) return false; + if (!getRelationsList() + .equals(other.getRelationsList())) return false; + if (!getPermissionsList() + .equals(other.getPermissionsList())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + COMMENT_FIELD_NUMBER; + hash = (53 * hash) + getComment().hashCode(); + if (getRelationsCount() > 0) { + hash = (37 * hash) + RELATIONS_FIELD_NUMBER; + hash = (53 * hash) + getRelationsList().hashCode(); + } + if (getPermissionsCount() > 0) { + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpDefinition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpDefinition 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.ExpDefinition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpDefinition 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.ExpDefinition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpDefinition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpDefinition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpDefinition 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.ExpDefinition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpDefinition 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.ExpDefinition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpDefinition 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.ExpDefinition 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; + } + /** + *
+   * ExpDefinition is the representation of a definition in the schema.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ExpDefinition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpDefinition) + com.authzed.api.v1.ExpDefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpDefinition.class, com.authzed.api.v1.ExpDefinition.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpDefinition.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + comment_ = ""; + if (relationsBuilder_ == null) { + relations_ = java.util.Collections.emptyList(); + } else { + relations_ = null; + relationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (permissionsBuilder_ == null) { + permissions_ = java.util.Collections.emptyList(); + } else { + permissions_ = null; + permissionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpDefinition_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpDefinition getDefaultInstanceForType() { + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpDefinition build() { + com.authzed.api.v1.ExpDefinition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpDefinition buildPartial() { + com.authzed.api.v1.ExpDefinition result = new com.authzed.api.v1.ExpDefinition(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.ExpDefinition result) { + if (relationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + relations_ = java.util.Collections.unmodifiableList(relations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.relations_ = relations_; + } else { + result.relations_ = relationsBuilder_.build(); + } + if (permissionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + permissions_ = java.util.Collections.unmodifiableList(permissions_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.permissions_ = permissions_; + } else { + result.permissions_ = permissionsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.ExpDefinition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.comment_ = comment_; + } + } + + @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.ExpDefinition) { + return mergeFrom((com.authzed.api.v1.ExpDefinition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpDefinition other) { + if (other == com.authzed.api.v1.ExpDefinition.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getComment().isEmpty()) { + comment_ = other.comment_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (relationsBuilder_ == null) { + if (!other.relations_.isEmpty()) { + if (relations_.isEmpty()) { + relations_ = other.relations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRelationsIsMutable(); + relations_.addAll(other.relations_); + } + onChanged(); + } + } else { + if (!other.relations_.isEmpty()) { + if (relationsBuilder_.isEmpty()) { + relationsBuilder_.dispose(); + relationsBuilder_ = null; + relations_ = other.relations_; + bitField0_ = (bitField0_ & ~0x00000004); + relationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelationsFieldBuilder() : null; + } else { + relationsBuilder_.addAllMessages(other.relations_); + } + } + } + if (permissionsBuilder_ == null) { + if (!other.permissions_.isEmpty()) { + if (permissions_.isEmpty()) { + permissions_ = other.permissions_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePermissionsIsMutable(); + permissions_.addAll(other.permissions_); + } + onChanged(); + } + } else { + if (!other.permissions_.isEmpty()) { + if (permissionsBuilder_.isEmpty()) { + permissionsBuilder_.dispose(); + permissionsBuilder_ = null; + permissions_ = other.permissions_; + bitField0_ = (bitField0_ & ~0x00000008); + permissionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPermissionsFieldBuilder() : null; + } else { + permissionsBuilder_.addAllMessages(other.permissions_); + } + } + } + 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: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + comment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.authzed.api.v1.ExpRelation m = + input.readMessage( + com.authzed.api.v1.ExpRelation.parser(), + extensionRegistry); + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + relations_.add(m); + } else { + relationsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + com.authzed.api.v1.ExpPermission m = + input.readMessage( + com.authzed.api.v1.ExpPermission.parser(), + extensionRegistry); + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.add(m); + } else { + permissionsBuilder_.addMessage(m); + } + 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 java.lang.Object name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object comment_ = ""; + /** + *
+     * comment is a human-readable comments on the definition. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + public java.lang.String getComment() { + java.lang.Object ref = comment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * comment is a human-readable comments on the definition. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + public com.google.protobuf.ByteString + getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * comment is a human-readable comments on the definition. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @param value The comment to set. + * @return This builder for chaining. + */ + public Builder setComment( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + comment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * comment is a human-readable comments on the definition. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return This builder for chaining. + */ + public Builder clearComment() { + comment_ = getDefaultInstance().getComment(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * comment is a human-readable comments on the definition. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @param value The bytes for comment to set. + * @return This builder for chaining. + */ + public Builder setCommentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + comment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List relations_ = + java.util.Collections.emptyList(); + private void ensureRelationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + relations_ = new java.util.ArrayList(relations_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder> relationsBuilder_; + + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public java.util.List getRelationsList() { + if (relationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(relations_); + } else { + return relationsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public int getRelationsCount() { + if (relationsBuilder_ == null) { + return relations_.size(); + } else { + return relationsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public com.authzed.api.v1.ExpRelation getRelations(int index) { + if (relationsBuilder_ == null) { + return relations_.get(index); + } else { + return relationsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public Builder setRelations( + int index, com.authzed.api.v1.ExpRelation value) { + if (relationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationsIsMutable(); + relations_.set(index, value); + onChanged(); + } else { + relationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public Builder setRelations( + int index, com.authzed.api.v1.ExpRelation.Builder builderForValue) { + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + relations_.set(index, builderForValue.build()); + onChanged(); + } else { + relationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public Builder addRelations(com.authzed.api.v1.ExpRelation value) { + if (relationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationsIsMutable(); + relations_.add(value); + onChanged(); + } else { + relationsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public Builder addRelations( + int index, com.authzed.api.v1.ExpRelation value) { + if (relationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationsIsMutable(); + relations_.add(index, value); + onChanged(); + } else { + relationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public Builder addRelations( + com.authzed.api.v1.ExpRelation.Builder builderForValue) { + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + relations_.add(builderForValue.build()); + onChanged(); + } else { + relationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public Builder addRelations( + int index, com.authzed.api.v1.ExpRelation.Builder builderForValue) { + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + relations_.add(index, builderForValue.build()); + onChanged(); + } else { + relationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public Builder addAllRelations( + java.lang.Iterable values) { + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relations_); + onChanged(); + } else { + relationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public Builder clearRelations() { + if (relationsBuilder_ == null) { + relations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + relationsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public Builder removeRelations(int index) { + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + relations_.remove(index); + onChanged(); + } else { + relationsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public com.authzed.api.v1.ExpRelation.Builder getRelationsBuilder( + int index) { + return getRelationsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public com.authzed.api.v1.ExpRelationOrBuilder getRelationsOrBuilder( + int index) { + if (relationsBuilder_ == null) { + return relations_.get(index); } else { + return relationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public java.util.List + getRelationsOrBuilderList() { + if (relationsBuilder_ != null) { + return relationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relations_); + } + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public com.authzed.api.v1.ExpRelation.Builder addRelationsBuilder() { + return getRelationsFieldBuilder().addBuilder( + com.authzed.api.v1.ExpRelation.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public com.authzed.api.v1.ExpRelation.Builder addRelationsBuilder( + int index) { + return getRelationsFieldBuilder().addBuilder( + index, com.authzed.api.v1.ExpRelation.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + public java.util.List + getRelationsBuilderList() { + return getRelationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder> + getRelationsFieldBuilder() { + if (relationsBuilder_ == null) { + relationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder>( + relations_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + relations_ = null; + } + return relationsBuilder_; + } + + private java.util.List permissions_ = + java.util.Collections.emptyList(); + private void ensurePermissionsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + permissions_ = new java.util.ArrayList(permissions_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder> permissionsBuilder_; + + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public java.util.List getPermissionsList() { + if (permissionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(permissions_); + } else { + return permissionsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public int getPermissionsCount() { + if (permissionsBuilder_ == null) { + return permissions_.size(); + } else { + return permissionsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public com.authzed.api.v1.ExpPermission getPermissions(int index) { + if (permissionsBuilder_ == null) { + return permissions_.get(index); + } else { + return permissionsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public Builder setPermissions( + int index, com.authzed.api.v1.ExpPermission value) { + if (permissionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.set(index, value); + onChanged(); + } else { + permissionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public Builder setPermissions( + int index, com.authzed.api.v1.ExpPermission.Builder builderForValue) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.set(index, builderForValue.build()); + onChanged(); + } else { + permissionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public Builder addPermissions(com.authzed.api.v1.ExpPermission value) { + if (permissionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(value); + onChanged(); + } else { + permissionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public Builder addPermissions( + int index, com.authzed.api.v1.ExpPermission value) { + if (permissionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(index, value); + onChanged(); + } else { + permissionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public Builder addPermissions( + com.authzed.api.v1.ExpPermission.Builder builderForValue) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.add(builderForValue.build()); + onChanged(); + } else { + permissionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public Builder addPermissions( + int index, com.authzed.api.v1.ExpPermission.Builder builderForValue) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.add(index, builderForValue.build()); + onChanged(); + } else { + permissionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public Builder addAllPermissions( + java.lang.Iterable values) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, permissions_); + onChanged(); + } else { + permissionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public Builder clearPermissions() { + if (permissionsBuilder_ == null) { + permissions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + permissionsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public Builder removePermissions(int index) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.remove(index); + onChanged(); + } else { + permissionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public com.authzed.api.v1.ExpPermission.Builder getPermissionsBuilder( + int index) { + return getPermissionsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public com.authzed.api.v1.ExpPermissionOrBuilder getPermissionsOrBuilder( + int index) { + if (permissionsBuilder_ == null) { + return permissions_.get(index); } else { + return permissionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public java.util.List + getPermissionsOrBuilderList() { + if (permissionsBuilder_ != null) { + return permissionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(permissions_); + } + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public com.authzed.api.v1.ExpPermission.Builder addPermissionsBuilder() { + return getPermissionsFieldBuilder().addBuilder( + com.authzed.api.v1.ExpPermission.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public com.authzed.api.v1.ExpPermission.Builder addPermissionsBuilder( + int index) { + return getPermissionsFieldBuilder().addBuilder( + index, com.authzed.api.v1.ExpPermission.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + public java.util.List + getPermissionsBuilderList() { + return getPermissionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder> + getPermissionsFieldBuilder() { + if (permissionsBuilder_ == null) { + permissionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder>( + permissions_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + permissions_ = null; + } + return permissionsBuilder_; + } + @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.ExpDefinition) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpDefinition) + private static final com.authzed.api.v1.ExpDefinition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpDefinition(); + } + + public static com.authzed.api.v1.ExpDefinition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpDefinition 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.ExpDefinition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpDefinitionOrBuilder.java b/generated/com/authzed/api/v1/ExpDefinitionOrBuilder.java new file mode 100644 index 00000000..27325521 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpDefinitionOrBuilder.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpDefinitionOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpDefinition) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * comment is a human-readable comments on the definition. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + java.lang.String getComment(); + /** + *
+   * comment is a human-readable comments on the definition. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + com.google.protobuf.ByteString + getCommentBytes(); + + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + java.util.List + getRelationsList(); + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + com.authzed.api.v1.ExpRelation getRelations(int index); + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + int getRelationsCount(); + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + java.util.List + getRelationsOrBuilderList(); + /** + * repeated .authzed.api.v1.ExpRelation relations = 3 [json_name = "relations"]; + */ + com.authzed.api.v1.ExpRelationOrBuilder getRelationsOrBuilder( + int index); + + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + java.util.List + getPermissionsList(); + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + com.authzed.api.v1.ExpPermission getPermissions(int index); + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + int getPermissionsCount(); + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + java.util.List + getPermissionsOrBuilderList(); + /** + * repeated .authzed.api.v1.ExpPermission permissions = 4 [json_name = "permissions"]; + */ + com.authzed.api.v1.ExpPermissionOrBuilder getPermissionsOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/ExpPermission.java b/generated/com/authzed/api/v1/ExpPermission.java new file mode 100644 index 00000000..f62bf4aa --- /dev/null +++ b/generated/com/authzed/api/v1/ExpPermission.java @@ -0,0 +1,859 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ExpPermission is the representation of a permission in the schema.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ExpPermission} + */ +public final class ExpPermission extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpPermission) + ExpPermissionOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpPermission.newBuilder() to construct. + private ExpPermission(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpPermission() { + name_ = ""; + comment_ = ""; + parentDefinitionName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpPermission(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpPermission_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpPermission_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpPermission.class, com.authzed.api.v1.ExpPermission.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMENT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object comment_ = ""; + /** + *
+   * comment is a human-readable comments on the permission. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + @java.lang.Override + public java.lang.String getComment() { + java.lang.Object ref = comment_; + 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(); + comment_ = s; + return s; + } + } + /** + *
+   * comment is a human-readable comments on the permission. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_DEFINITION_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object parentDefinitionName_ = ""; + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The parentDefinitionName. + */ + @java.lang.Override + public java.lang.String getParentDefinitionName() { + java.lang.Object ref = parentDefinitionName_; + 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(); + parentDefinitionName_ = s; + return s; + } + } + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The bytes for parentDefinitionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentDefinitionNameBytes() { + java.lang.Object ref = parentDefinitionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentDefinitionName_ = 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDefinitionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parentDefinitionName_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDefinitionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parentDefinitionName_); + } + 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.ExpPermission)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpPermission other = (com.authzed.api.v1.ExpPermission) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getComment() + .equals(other.getComment())) return false; + if (!getParentDefinitionName() + .equals(other.getParentDefinitionName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + COMMENT_FIELD_NUMBER; + hash = (53 * hash) + getComment().hashCode(); + hash = (37 * hash) + PARENT_DEFINITION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getParentDefinitionName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpPermission parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpPermission 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.ExpPermission parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpPermission 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.ExpPermission parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpPermission parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpPermission parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpPermission 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.ExpPermission parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpPermission 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.ExpPermission parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpPermission 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.ExpPermission 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; + } + /** + *
+   * ExpPermission is the representation of a permission in the schema.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ExpPermission} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpPermission) + com.authzed.api.v1.ExpPermissionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpPermission_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpPermission_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpPermission.class, com.authzed.api.v1.ExpPermission.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpPermission.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + comment_ = ""; + parentDefinitionName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpPermission_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpPermission getDefaultInstanceForType() { + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpPermission build() { + com.authzed.api.v1.ExpPermission result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpPermission buildPartial() { + com.authzed.api.v1.ExpPermission result = new com.authzed.api.v1.ExpPermission(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExpPermission result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.comment_ = comment_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.parentDefinitionName_ = parentDefinitionName_; + } + } + + @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.ExpPermission) { + return mergeFrom((com.authzed.api.v1.ExpPermission)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpPermission other) { + if (other == com.authzed.api.v1.ExpPermission.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getComment().isEmpty()) { + comment_ = other.comment_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getParentDefinitionName().isEmpty()) { + parentDefinitionName_ = other.parentDefinitionName_; + bitField0_ |= 0x00000004; + 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: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + comment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + parentDefinitionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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 name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object comment_ = ""; + /** + *
+     * comment is a human-readable comments on the permission. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + public java.lang.String getComment() { + java.lang.Object ref = comment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * comment is a human-readable comments on the permission. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + public com.google.protobuf.ByteString + getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * comment is a human-readable comments on the permission. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @param value The comment to set. + * @return This builder for chaining. + */ + public Builder setComment( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + comment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * comment is a human-readable comments on the permission. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return This builder for chaining. + */ + public Builder clearComment() { + comment_ = getDefaultInstance().getComment(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * comment is a human-readable comments on the permission. Will include
+     * delimiter characters.
+     * 
+ * + * string comment = 2 [json_name = "comment"]; + * @param value The bytes for comment to set. + * @return This builder for chaining. + */ + public Builder setCommentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + comment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object parentDefinitionName_ = ""; + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The parentDefinitionName. + */ + public java.lang.String getParentDefinitionName() { + java.lang.Object ref = parentDefinitionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentDefinitionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The bytes for parentDefinitionName. + */ + public com.google.protobuf.ByteString + getParentDefinitionNameBytes() { + java.lang.Object ref = parentDefinitionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentDefinitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @param value The parentDefinitionName to set. + * @return This builder for chaining. + */ + public Builder setParentDefinitionName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parentDefinitionName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return This builder for chaining. + */ + public Builder clearParentDefinitionName() { + parentDefinitionName_ = getDefaultInstance().getParentDefinitionName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @param value The bytes for parentDefinitionName to set. + * @return This builder for chaining. + */ + public Builder setParentDefinitionNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parentDefinitionName_ = value; + bitField0_ |= 0x00000004; + 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.ExpPermission) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpPermission) + private static final com.authzed.api.v1.ExpPermission DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpPermission(); + } + + public static com.authzed.api.v1.ExpPermission getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpPermission 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.ExpPermission getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpPermissionOrBuilder.java b/generated/com/authzed/api/v1/ExpPermissionOrBuilder.java new file mode 100644 index 00000000..44d87c90 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpPermissionOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpPermissionOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpPermission) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * comment is a human-readable comments on the permission. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + java.lang.String getComment(); + /** + *
+   * comment is a human-readable comments on the permission. Will include
+   * delimiter characters.
+   * 
+ * + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + com.google.protobuf.ByteString + getCommentBytes(); + + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The parentDefinitionName. + */ + java.lang.String getParentDefinitionName(); + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The bytes for parentDefinitionName. + */ + com.google.protobuf.ByteString + getParentDefinitionNameBytes(); +} diff --git a/generated/com/authzed/api/v1/ExpRelation.java b/generated/com/authzed/api/v1/ExpRelation.java new file mode 100644 index 00000000..fa0154d8 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpRelation.java @@ -0,0 +1,1178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ExpRelation is the representation of a relation in the schema.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ExpRelation} + */ +public final class ExpRelation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpRelation) + ExpRelationOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpRelation.newBuilder() to construct. + private ExpRelation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpRelation() { + name_ = ""; + comment_ = ""; + parentDefinitionName_ = ""; + subjectTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpRelation(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpRelation.class, com.authzed.api.v1.ExpRelation.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMENT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object comment_ = ""; + /** + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + @java.lang.Override + public java.lang.String getComment() { + java.lang.Object ref = comment_; + 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(); + comment_ = s; + return s; + } + } + /** + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_DEFINITION_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object parentDefinitionName_ = ""; + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The parentDefinitionName. + */ + @java.lang.Override + public java.lang.String getParentDefinitionName() { + java.lang.Object ref = parentDefinitionName_; + 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(); + parentDefinitionName_ = s; + return s; + } + } + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The bytes for parentDefinitionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentDefinitionNameBytes() { + java.lang.Object ref = parentDefinitionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentDefinitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_TYPES_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List subjectTypes_; + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + @java.lang.Override + public java.util.List getSubjectTypesList() { + return subjectTypes_; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + @java.lang.Override + public java.util.List + getSubjectTypesOrBuilderList() { + return subjectTypes_; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + @java.lang.Override + public int getSubjectTypesCount() { + return subjectTypes_.size(); + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpTypeReference getSubjectTypes(int index) { + return subjectTypes_.get(index); + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpTypeReferenceOrBuilder getSubjectTypesOrBuilder( + int index) { + return subjectTypes_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDefinitionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parentDefinitionName_); + } + for (int i = 0; i < subjectTypes_.size(); i++) { + output.writeMessage(4, subjectTypes_.get(i)); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDefinitionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parentDefinitionName_); + } + for (int i = 0; i < subjectTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, subjectTypes_.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.ExpRelation)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpRelation other = (com.authzed.api.v1.ExpRelation) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getComment() + .equals(other.getComment())) return false; + if (!getParentDefinitionName() + .equals(other.getParentDefinitionName())) return false; + if (!getSubjectTypesList() + .equals(other.getSubjectTypesList())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + COMMENT_FIELD_NUMBER; + hash = (53 * hash) + getComment().hashCode(); + hash = (37 * hash) + PARENT_DEFINITION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getParentDefinitionName().hashCode(); + if (getSubjectTypesCount() > 0) { + hash = (37 * hash) + SUBJECT_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getSubjectTypesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpRelation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpRelation 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.ExpRelation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpRelation 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.ExpRelation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpRelation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpRelation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpRelation 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.ExpRelation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpRelation 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.ExpRelation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpRelation 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.ExpRelation 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; + } + /** + *
+   * ExpRelation is the representation of a relation in the schema.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ExpRelation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpRelation) + com.authzed.api.v1.ExpRelationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpRelation.class, com.authzed.api.v1.ExpRelation.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpRelation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + comment_ = ""; + parentDefinitionName_ = ""; + if (subjectTypesBuilder_ == null) { + subjectTypes_ = java.util.Collections.emptyList(); + } else { + subjectTypes_ = null; + subjectTypesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelation_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpRelation getDefaultInstanceForType() { + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpRelation build() { + com.authzed.api.v1.ExpRelation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpRelation buildPartial() { + com.authzed.api.v1.ExpRelation result = new com.authzed.api.v1.ExpRelation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.ExpRelation result) { + if (subjectTypesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + subjectTypes_ = java.util.Collections.unmodifiableList(subjectTypes_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.subjectTypes_ = subjectTypes_; + } else { + result.subjectTypes_ = subjectTypesBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.ExpRelation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.comment_ = comment_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.parentDefinitionName_ = parentDefinitionName_; + } + } + + @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.ExpRelation) { + return mergeFrom((com.authzed.api.v1.ExpRelation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpRelation other) { + if (other == com.authzed.api.v1.ExpRelation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getComment().isEmpty()) { + comment_ = other.comment_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getParentDefinitionName().isEmpty()) { + parentDefinitionName_ = other.parentDefinitionName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (subjectTypesBuilder_ == null) { + if (!other.subjectTypes_.isEmpty()) { + if (subjectTypes_.isEmpty()) { + subjectTypes_ = other.subjectTypes_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSubjectTypesIsMutable(); + subjectTypes_.addAll(other.subjectTypes_); + } + onChanged(); + } + } else { + if (!other.subjectTypes_.isEmpty()) { + if (subjectTypesBuilder_.isEmpty()) { + subjectTypesBuilder_.dispose(); + subjectTypesBuilder_ = null; + subjectTypes_ = other.subjectTypes_; + bitField0_ = (bitField0_ & ~0x00000008); + subjectTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectTypesFieldBuilder() : null; + } else { + subjectTypesBuilder_.addAllMessages(other.subjectTypes_); + } + } + } + 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: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + comment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + parentDefinitionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.authzed.api.v1.ExpTypeReference m = + input.readMessage( + com.authzed.api.v1.ExpTypeReference.parser(), + extensionRegistry); + if (subjectTypesBuilder_ == null) { + ensureSubjectTypesIsMutable(); + subjectTypes_.add(m); + } else { + subjectTypesBuilder_.addMessage(m); + } + 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 java.lang.Object name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object comment_ = ""; + /** + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + public java.lang.String getComment() { + java.lang.Object ref = comment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + public com.google.protobuf.ByteString + getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string comment = 2 [json_name = "comment"]; + * @param value The comment to set. + * @return This builder for chaining. + */ + public Builder setComment( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + comment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string comment = 2 [json_name = "comment"]; + * @return This builder for chaining. + */ + public Builder clearComment() { + comment_ = getDefaultInstance().getComment(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string comment = 2 [json_name = "comment"]; + * @param value The bytes for comment to set. + * @return This builder for chaining. + */ + public Builder setCommentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + comment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object parentDefinitionName_ = ""; + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The parentDefinitionName. + */ + public java.lang.String getParentDefinitionName() { + java.lang.Object ref = parentDefinitionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentDefinitionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The bytes for parentDefinitionName. + */ + public com.google.protobuf.ByteString + getParentDefinitionNameBytes() { + java.lang.Object ref = parentDefinitionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentDefinitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @param value The parentDefinitionName to set. + * @return This builder for chaining. + */ + public Builder setParentDefinitionName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parentDefinitionName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return This builder for chaining. + */ + public Builder clearParentDefinitionName() { + parentDefinitionName_ = getDefaultInstance().getParentDefinitionName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @param value The bytes for parentDefinitionName to set. + * @return This builder for chaining. + */ + public Builder setParentDefinitionNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parentDefinitionName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List subjectTypes_ = + java.util.Collections.emptyList(); + private void ensureSubjectTypesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + subjectTypes_ = new java.util.ArrayList(subjectTypes_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpTypeReference, com.authzed.api.v1.ExpTypeReference.Builder, com.authzed.api.v1.ExpTypeReferenceOrBuilder> subjectTypesBuilder_; + + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public java.util.List getSubjectTypesList() { + if (subjectTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectTypes_); + } else { + return subjectTypesBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public int getSubjectTypesCount() { + if (subjectTypesBuilder_ == null) { + return subjectTypes_.size(); + } else { + return subjectTypesBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public com.authzed.api.v1.ExpTypeReference getSubjectTypes(int index) { + if (subjectTypesBuilder_ == null) { + return subjectTypes_.get(index); + } else { + return subjectTypesBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public Builder setSubjectTypes( + int index, com.authzed.api.v1.ExpTypeReference value) { + if (subjectTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectTypesIsMutable(); + subjectTypes_.set(index, value); + onChanged(); + } else { + subjectTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public Builder setSubjectTypes( + int index, com.authzed.api.v1.ExpTypeReference.Builder builderForValue) { + if (subjectTypesBuilder_ == null) { + ensureSubjectTypesIsMutable(); + subjectTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public Builder addSubjectTypes(com.authzed.api.v1.ExpTypeReference value) { + if (subjectTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectTypesIsMutable(); + subjectTypes_.add(value); + onChanged(); + } else { + subjectTypesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public Builder addSubjectTypes( + int index, com.authzed.api.v1.ExpTypeReference value) { + if (subjectTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectTypesIsMutable(); + subjectTypes_.add(index, value); + onChanged(); + } else { + subjectTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public Builder addSubjectTypes( + com.authzed.api.v1.ExpTypeReference.Builder builderForValue) { + if (subjectTypesBuilder_ == null) { + ensureSubjectTypesIsMutable(); + subjectTypes_.add(builderForValue.build()); + onChanged(); + } else { + subjectTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public Builder addSubjectTypes( + int index, com.authzed.api.v1.ExpTypeReference.Builder builderForValue) { + if (subjectTypesBuilder_ == null) { + ensureSubjectTypesIsMutable(); + subjectTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public Builder addAllSubjectTypes( + java.lang.Iterable values) { + if (subjectTypesBuilder_ == null) { + ensureSubjectTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectTypes_); + onChanged(); + } else { + subjectTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public Builder clearSubjectTypes() { + if (subjectTypesBuilder_ == null) { + subjectTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + subjectTypesBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public Builder removeSubjectTypes(int index) { + if (subjectTypesBuilder_ == null) { + ensureSubjectTypesIsMutable(); + subjectTypes_.remove(index); + onChanged(); + } else { + subjectTypesBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public com.authzed.api.v1.ExpTypeReference.Builder getSubjectTypesBuilder( + int index) { + return getSubjectTypesFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public com.authzed.api.v1.ExpTypeReferenceOrBuilder getSubjectTypesOrBuilder( + int index) { + if (subjectTypesBuilder_ == null) { + return subjectTypes_.get(index); } else { + return subjectTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public java.util.List + getSubjectTypesOrBuilderList() { + if (subjectTypesBuilder_ != null) { + return subjectTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectTypes_); + } + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public com.authzed.api.v1.ExpTypeReference.Builder addSubjectTypesBuilder() { + return getSubjectTypesFieldBuilder().addBuilder( + com.authzed.api.v1.ExpTypeReference.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public com.authzed.api.v1.ExpTypeReference.Builder addSubjectTypesBuilder( + int index) { + return getSubjectTypesFieldBuilder().addBuilder( + index, com.authzed.api.v1.ExpTypeReference.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + public java.util.List + getSubjectTypesBuilderList() { + return getSubjectTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpTypeReference, com.authzed.api.v1.ExpTypeReference.Builder, com.authzed.api.v1.ExpTypeReferenceOrBuilder> + getSubjectTypesFieldBuilder() { + if (subjectTypesBuilder_ == null) { + subjectTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpTypeReference, com.authzed.api.v1.ExpTypeReference.Builder, com.authzed.api.v1.ExpTypeReferenceOrBuilder>( + subjectTypes_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + subjectTypes_ = null; + } + return subjectTypesBuilder_; + } + @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.ExpRelation) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpRelation) + private static final com.authzed.api.v1.ExpRelation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpRelation(); + } + + public static com.authzed.api.v1.ExpRelation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpRelation 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.ExpRelation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpRelationOrBuilder.java b/generated/com/authzed/api/v1/ExpRelationOrBuilder.java new file mode 100644 index 00000000..671e8fee --- /dev/null +++ b/generated/com/authzed/api/v1/ExpRelationOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpRelationOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpRelation) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * string comment = 2 [json_name = "comment"]; + * @return The comment. + */ + java.lang.String getComment(); + /** + * string comment = 2 [json_name = "comment"]; + * @return The bytes for comment. + */ + com.google.protobuf.ByteString + getCommentBytes(); + + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The parentDefinitionName. + */ + java.lang.String getParentDefinitionName(); + /** + * string parent_definition_name = 3 [json_name = "parentDefinitionName"]; + * @return The bytes for parentDefinitionName. + */ + com.google.protobuf.ByteString + getParentDefinitionNameBytes(); + + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + java.util.List + getSubjectTypesList(); + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + com.authzed.api.v1.ExpTypeReference getSubjectTypes(int index); + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + int getSubjectTypesCount(); + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + java.util.List + getSubjectTypesOrBuilderList(); + /** + * repeated .authzed.api.v1.ExpTypeReference subject_types = 4 [json_name = "subjectTypes"]; + */ + com.authzed.api.v1.ExpTypeReferenceOrBuilder getSubjectTypesOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/ExpRelationReference.java b/generated/com/authzed/api/v1/ExpRelationReference.java new file mode 100644 index 00000000..f72c1ca8 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpRelationReference.java @@ -0,0 +1,755 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ExpRelationReference is a reference to a relation or permission in the schema.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ExpRelationReference} + */ +public final class ExpRelationReference extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpRelationReference) + ExpRelationReferenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpRelationReference.newBuilder() to construct. + private ExpRelationReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpRelationReference() { + definitionName_ = ""; + relationName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpRelationReference(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelationReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelationReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpRelationReference.class, com.authzed.api.v1.ExpRelationReference.Builder.class); + } + + public static final int DEFINITION_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object definitionName_ = ""; + /** + * string definition_name = 1 [json_name = "definitionName"]; + * @return The definitionName. + */ + @java.lang.Override + public java.lang.String getDefinitionName() { + java.lang.Object ref = definitionName_; + 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(); + definitionName_ = s; + return s; + } + } + /** + * string definition_name = 1 [json_name = "definitionName"]; + * @return The bytes for definitionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefinitionNameBytes() { + java.lang.Object ref = definitionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + definitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATION_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object relationName_ = ""; + /** + * string relation_name = 2 [json_name = "relationName"]; + * @return The relationName. + */ + @java.lang.Override + public java.lang.String getRelationName() { + java.lang.Object ref = relationName_; + 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(); + relationName_ = s; + return s; + } + } + /** + * string relation_name = 2 [json_name = "relationName"]; + * @return The bytes for relationName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRelationNameBytes() { + java.lang.Object ref = relationName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_PERMISSION_FIELD_NUMBER = 3; + private boolean isPermission_ = false; + /** + * bool is_permission = 3 [json_name = "isPermission"]; + * @return The isPermission. + */ + @java.lang.Override + public boolean getIsPermission() { + return isPermission_; + } + + 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(definitionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, definitionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, relationName_); + } + if (isPermission_ != false) { + output.writeBool(3, isPermission_); + } + 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(definitionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, definitionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, relationName_); + } + if (isPermission_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, isPermission_); + } + 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.ExpRelationReference)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpRelationReference other = (com.authzed.api.v1.ExpRelationReference) obj; + + if (!getDefinitionName() + .equals(other.getDefinitionName())) return false; + if (!getRelationName() + .equals(other.getRelationName())) return false; + if (getIsPermission() + != other.getIsPermission()) 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) + DEFINITION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDefinitionName().hashCode(); + hash = (37 * hash) + RELATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRelationName().hashCode(); + hash = (37 * hash) + IS_PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsPermission()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpRelationReference parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpRelationReference 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.ExpRelationReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpRelationReference 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.ExpRelationReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpRelationReference parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpRelationReference parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpRelationReference 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.ExpRelationReference parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpRelationReference 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.ExpRelationReference parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpRelationReference 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.ExpRelationReference 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; + } + /** + *
+   * ExpRelationReference is a reference to a relation or permission in the schema.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ExpRelationReference} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpRelationReference) + com.authzed.api.v1.ExpRelationReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelationReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelationReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpRelationReference.class, com.authzed.api.v1.ExpRelationReference.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpRelationReference.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + definitionName_ = ""; + relationName_ = ""; + isPermission_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelationReference_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpRelationReference getDefaultInstanceForType() { + return com.authzed.api.v1.ExpRelationReference.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpRelationReference build() { + com.authzed.api.v1.ExpRelationReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpRelationReference buildPartial() { + com.authzed.api.v1.ExpRelationReference result = new com.authzed.api.v1.ExpRelationReference(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExpRelationReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.definitionName_ = definitionName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relationName_ = relationName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.isPermission_ = isPermission_; + } + } + + @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.ExpRelationReference) { + return mergeFrom((com.authzed.api.v1.ExpRelationReference)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpRelationReference other) { + if (other == com.authzed.api.v1.ExpRelationReference.getDefaultInstance()) return this; + if (!other.getDefinitionName().isEmpty()) { + definitionName_ = other.definitionName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRelationName().isEmpty()) { + relationName_ = other.relationName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getIsPermission() != false) { + setIsPermission(other.getIsPermission()); + } + 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: { + definitionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + relationName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + isPermission_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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 definitionName_ = ""; + /** + * string definition_name = 1 [json_name = "definitionName"]; + * @return The definitionName. + */ + public java.lang.String getDefinitionName() { + java.lang.Object ref = definitionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + definitionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string definition_name = 1 [json_name = "definitionName"]; + * @return The bytes for definitionName. + */ + public com.google.protobuf.ByteString + getDefinitionNameBytes() { + java.lang.Object ref = definitionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + definitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string definition_name = 1 [json_name = "definitionName"]; + * @param value The definitionName to set. + * @return This builder for chaining. + */ + public Builder setDefinitionName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + definitionName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string definition_name = 1 [json_name = "definitionName"]; + * @return This builder for chaining. + */ + public Builder clearDefinitionName() { + definitionName_ = getDefaultInstance().getDefinitionName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string definition_name = 1 [json_name = "definitionName"]; + * @param value The bytes for definitionName to set. + * @return This builder for chaining. + */ + public Builder setDefinitionNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + definitionName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object relationName_ = ""; + /** + * string relation_name = 2 [json_name = "relationName"]; + * @return The relationName. + */ + public java.lang.String getRelationName() { + java.lang.Object ref = relationName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relationName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string relation_name = 2 [json_name = "relationName"]; + * @return The bytes for relationName. + */ + public com.google.protobuf.ByteString + getRelationNameBytes() { + java.lang.Object ref = relationName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string relation_name = 2 [json_name = "relationName"]; + * @param value The relationName to set. + * @return This builder for chaining. + */ + public Builder setRelationName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + relationName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string relation_name = 2 [json_name = "relationName"]; + * @return This builder for chaining. + */ + public Builder clearRelationName() { + relationName_ = getDefaultInstance().getRelationName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string relation_name = 2 [json_name = "relationName"]; + * @param value The bytes for relationName to set. + * @return This builder for chaining. + */ + public Builder setRelationNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + relationName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean isPermission_ ; + /** + * bool is_permission = 3 [json_name = "isPermission"]; + * @return The isPermission. + */ + @java.lang.Override + public boolean getIsPermission() { + return isPermission_; + } + /** + * bool is_permission = 3 [json_name = "isPermission"]; + * @param value The isPermission to set. + * @return This builder for chaining. + */ + public Builder setIsPermission(boolean value) { + + isPermission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool is_permission = 3 [json_name = "isPermission"]; + * @return This builder for chaining. + */ + public Builder clearIsPermission() { + bitField0_ = (bitField0_ & ~0x00000004); + isPermission_ = false; + 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.ExpRelationReference) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpRelationReference) + private static final com.authzed.api.v1.ExpRelationReference DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpRelationReference(); + } + + public static com.authzed.api.v1.ExpRelationReference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpRelationReference 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.ExpRelationReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpRelationReferenceOrBuilder.java b/generated/com/authzed/api/v1/ExpRelationReferenceOrBuilder.java new file mode 100644 index 00000000..a92070c0 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpRelationReferenceOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpRelationReferenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpRelationReference) + com.google.protobuf.MessageOrBuilder { + + /** + * string definition_name = 1 [json_name = "definitionName"]; + * @return The definitionName. + */ + java.lang.String getDefinitionName(); + /** + * string definition_name = 1 [json_name = "definitionName"]; + * @return The bytes for definitionName. + */ + com.google.protobuf.ByteString + getDefinitionNameBytes(); + + /** + * string relation_name = 2 [json_name = "relationName"]; + * @return The relationName. + */ + java.lang.String getRelationName(); + /** + * string relation_name = 2 [json_name = "relationName"]; + * @return The bytes for relationName. + */ + com.google.protobuf.ByteString + getRelationNameBytes(); + + /** + * bool is_permission = 3 [json_name = "isPermission"]; + * @return The isPermission. + */ + boolean getIsPermission(); +} diff --git a/generated/com/authzed/api/v1/ExpRelationSubjectTypeChange.java b/generated/com/authzed/api/v1/ExpRelationSubjectTypeChange.java new file mode 100644 index 00000000..02fd173b --- /dev/null +++ b/generated/com/authzed/api/v1/ExpRelationSubjectTypeChange.java @@ -0,0 +1,770 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExpRelationSubjectTypeChange} + */ +public final class ExpRelationSubjectTypeChange extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpRelationSubjectTypeChange) + ExpRelationSubjectTypeChangeOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpRelationSubjectTypeChange.newBuilder() to construct. + private ExpRelationSubjectTypeChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpRelationSubjectTypeChange() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpRelationSubjectTypeChange(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelationSubjectTypeChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelationSubjectTypeChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpRelationSubjectTypeChange.class, com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder.class); + } + + public static final int RELATION_FIELD_NUMBER = 1; + private com.authzed.api.v1.ExpRelation relation_; + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + * @return Whether the relation field is set. + */ + @java.lang.Override + public boolean hasRelation() { + return relation_ != null; + } + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + * @return The relation. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelation getRelation() { + return relation_ == null ? com.authzed.api.v1.ExpRelation.getDefaultInstance() : relation_; + } + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationOrBuilder getRelationOrBuilder() { + return relation_ == null ? com.authzed.api.v1.ExpRelation.getDefaultInstance() : relation_; + } + + public static final int CHANGED_SUBJECT_TYPE_FIELD_NUMBER = 2; + private com.authzed.api.v1.ExpTypeReference changedSubjectType_; + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + * @return Whether the changedSubjectType field is set. + */ + @java.lang.Override + public boolean hasChangedSubjectType() { + return changedSubjectType_ != null; + } + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + * @return The changedSubjectType. + */ + @java.lang.Override + public com.authzed.api.v1.ExpTypeReference getChangedSubjectType() { + return changedSubjectType_ == null ? com.authzed.api.v1.ExpTypeReference.getDefaultInstance() : changedSubjectType_; + } + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpTypeReferenceOrBuilder getChangedSubjectTypeOrBuilder() { + return changedSubjectType_ == null ? com.authzed.api.v1.ExpTypeReference.getDefaultInstance() : changedSubjectType_; + } + + 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 (relation_ != null) { + output.writeMessage(1, getRelation()); + } + if (changedSubjectType_ != null) { + output.writeMessage(2, getChangedSubjectType()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (relation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRelation()); + } + if (changedSubjectType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getChangedSubjectType()); + } + 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.ExpRelationSubjectTypeChange)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpRelationSubjectTypeChange other = (com.authzed.api.v1.ExpRelationSubjectTypeChange) obj; + + if (hasRelation() != other.hasRelation()) return false; + if (hasRelation()) { + if (!getRelation() + .equals(other.getRelation())) return false; + } + if (hasChangedSubjectType() != other.hasChangedSubjectType()) return false; + if (hasChangedSubjectType()) { + if (!getChangedSubjectType() + .equals(other.getChangedSubjectType())) 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 (hasRelation()) { + hash = (37 * hash) + RELATION_FIELD_NUMBER; + hash = (53 * hash) + getRelation().hashCode(); + } + if (hasChangedSubjectType()) { + hash = (37 * hash) + CHANGED_SUBJECT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getChangedSubjectType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpRelationSubjectTypeChange parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpRelationSubjectTypeChange 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.ExpRelationSubjectTypeChange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpRelationSubjectTypeChange 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.ExpRelationSubjectTypeChange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpRelationSubjectTypeChange parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpRelationSubjectTypeChange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpRelationSubjectTypeChange 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.ExpRelationSubjectTypeChange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpRelationSubjectTypeChange 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.ExpRelationSubjectTypeChange parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpRelationSubjectTypeChange 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.ExpRelationSubjectTypeChange 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExpRelationSubjectTypeChange} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpRelationSubjectTypeChange) + com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelationSubjectTypeChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelationSubjectTypeChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpRelationSubjectTypeChange.class, com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpRelationSubjectTypeChange.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relation_ = null; + if (relationBuilder_ != null) { + relationBuilder_.dispose(); + relationBuilder_ = null; + } + changedSubjectType_ = null; + if (changedSubjectTypeBuilder_ != null) { + changedSubjectTypeBuilder_.dispose(); + changedSubjectTypeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpRelationSubjectTypeChange_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChange getDefaultInstanceForType() { + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChange build() { + com.authzed.api.v1.ExpRelationSubjectTypeChange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChange buildPartial() { + com.authzed.api.v1.ExpRelationSubjectTypeChange result = new com.authzed.api.v1.ExpRelationSubjectTypeChange(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExpRelationSubjectTypeChange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relation_ = relationBuilder_ == null + ? relation_ + : relationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.changedSubjectType_ = changedSubjectTypeBuilder_ == null + ? changedSubjectType_ + : changedSubjectTypeBuilder_.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.ExpRelationSubjectTypeChange) { + return mergeFrom((com.authzed.api.v1.ExpRelationSubjectTypeChange)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpRelationSubjectTypeChange other) { + if (other == com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance()) return this; + if (other.hasRelation()) { + mergeRelation(other.getRelation()); + } + if (other.hasChangedSubjectType()) { + mergeChangedSubjectType(other.getChangedSubjectType()); + } + 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( + getRelationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getChangedSubjectTypeFieldBuilder().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 com.authzed.api.v1.ExpRelation relation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder> relationBuilder_; + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + * @return Whether the relation field is set. + */ + public boolean hasRelation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + * @return The relation. + */ + public com.authzed.api.v1.ExpRelation getRelation() { + if (relationBuilder_ == null) { + return relation_ == null ? com.authzed.api.v1.ExpRelation.getDefaultInstance() : relation_; + } else { + return relationBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + */ + public Builder setRelation(com.authzed.api.v1.ExpRelation value) { + if (relationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relation_ = value; + } else { + relationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + */ + public Builder setRelation( + com.authzed.api.v1.ExpRelation.Builder builderForValue) { + if (relationBuilder_ == null) { + relation_ = builderForValue.build(); + } else { + relationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + */ + public Builder mergeRelation(com.authzed.api.v1.ExpRelation value) { + if (relationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + relation_ != null && + relation_ != com.authzed.api.v1.ExpRelation.getDefaultInstance()) { + getRelationBuilder().mergeFrom(value); + } else { + relation_ = value; + } + } else { + relationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + */ + public Builder clearRelation() { + bitField0_ = (bitField0_ & ~0x00000001); + relation_ = null; + if (relationBuilder_ != null) { + relationBuilder_.dispose(); + relationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + */ + public com.authzed.api.v1.ExpRelation.Builder getRelationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRelationFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + */ + public com.authzed.api.v1.ExpRelationOrBuilder getRelationOrBuilder() { + if (relationBuilder_ != null) { + return relationBuilder_.getMessageOrBuilder(); + } else { + return relation_ == null ? + com.authzed.api.v1.ExpRelation.getDefaultInstance() : relation_; + } + } + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder> + getRelationFieldBuilder() { + if (relationBuilder_ == null) { + relationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder>( + getRelation(), + getParentForChildren(), + isClean()); + relation_ = null; + } + return relationBuilder_; + } + + private com.authzed.api.v1.ExpTypeReference changedSubjectType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpTypeReference, com.authzed.api.v1.ExpTypeReference.Builder, com.authzed.api.v1.ExpTypeReferenceOrBuilder> changedSubjectTypeBuilder_; + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + * @return Whether the changedSubjectType field is set. + */ + public boolean hasChangedSubjectType() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + * @return The changedSubjectType. + */ + public com.authzed.api.v1.ExpTypeReference getChangedSubjectType() { + if (changedSubjectTypeBuilder_ == null) { + return changedSubjectType_ == null ? com.authzed.api.v1.ExpTypeReference.getDefaultInstance() : changedSubjectType_; + } else { + return changedSubjectTypeBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + */ + public Builder setChangedSubjectType(com.authzed.api.v1.ExpTypeReference value) { + if (changedSubjectTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + changedSubjectType_ = value; + } else { + changedSubjectTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + */ + public Builder setChangedSubjectType( + com.authzed.api.v1.ExpTypeReference.Builder builderForValue) { + if (changedSubjectTypeBuilder_ == null) { + changedSubjectType_ = builderForValue.build(); + } else { + changedSubjectTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + */ + public Builder mergeChangedSubjectType(com.authzed.api.v1.ExpTypeReference value) { + if (changedSubjectTypeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + changedSubjectType_ != null && + changedSubjectType_ != com.authzed.api.v1.ExpTypeReference.getDefaultInstance()) { + getChangedSubjectTypeBuilder().mergeFrom(value); + } else { + changedSubjectType_ = value; + } + } else { + changedSubjectTypeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + */ + public Builder clearChangedSubjectType() { + bitField0_ = (bitField0_ & ~0x00000002); + changedSubjectType_ = null; + if (changedSubjectTypeBuilder_ != null) { + changedSubjectTypeBuilder_.dispose(); + changedSubjectTypeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + */ + public com.authzed.api.v1.ExpTypeReference.Builder getChangedSubjectTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getChangedSubjectTypeFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + */ + public com.authzed.api.v1.ExpTypeReferenceOrBuilder getChangedSubjectTypeOrBuilder() { + if (changedSubjectTypeBuilder_ != null) { + return changedSubjectTypeBuilder_.getMessageOrBuilder(); + } else { + return changedSubjectType_ == null ? + com.authzed.api.v1.ExpTypeReference.getDefaultInstance() : changedSubjectType_; + } + } + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpTypeReference, com.authzed.api.v1.ExpTypeReference.Builder, com.authzed.api.v1.ExpTypeReferenceOrBuilder> + getChangedSubjectTypeFieldBuilder() { + if (changedSubjectTypeBuilder_ == null) { + changedSubjectTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpTypeReference, com.authzed.api.v1.ExpTypeReference.Builder, com.authzed.api.v1.ExpTypeReferenceOrBuilder>( + getChangedSubjectType(), + getParentForChildren(), + isClean()); + changedSubjectType_ = null; + } + return changedSubjectTypeBuilder_; + } + @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.ExpRelationSubjectTypeChange) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpRelationSubjectTypeChange) + private static final com.authzed.api.v1.ExpRelationSubjectTypeChange DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpRelationSubjectTypeChange(); + } + + public static com.authzed.api.v1.ExpRelationSubjectTypeChange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpRelationSubjectTypeChange 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.ExpRelationSubjectTypeChange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpRelationSubjectTypeChangeOrBuilder.java b/generated/com/authzed/api/v1/ExpRelationSubjectTypeChangeOrBuilder.java new file mode 100644 index 00000000..840abeac --- /dev/null +++ b/generated/com/authzed/api/v1/ExpRelationSubjectTypeChangeOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpRelationSubjectTypeChangeOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpRelationSubjectTypeChange) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + * @return Whether the relation field is set. + */ + boolean hasRelation(); + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + * @return The relation. + */ + com.authzed.api.v1.ExpRelation getRelation(); + /** + * .authzed.api.v1.ExpRelation relation = 1 [json_name = "relation"]; + */ + com.authzed.api.v1.ExpRelationOrBuilder getRelationOrBuilder(); + + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + * @return Whether the changedSubjectType field is set. + */ + boolean hasChangedSubjectType(); + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + * @return The changedSubjectType. + */ + com.authzed.api.v1.ExpTypeReference getChangedSubjectType(); + /** + * .authzed.api.v1.ExpTypeReference changed_subject_type = 2 [json_name = "changedSubjectType"]; + */ + com.authzed.api.v1.ExpTypeReferenceOrBuilder getChangedSubjectTypeOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ExpSchemaDiff.java b/generated/com/authzed/api/v1/ExpSchemaDiff.java new file mode 100644 index 00000000..b18abd1e --- /dev/null +++ b/generated/com/authzed/api/v1/ExpSchemaDiff.java @@ -0,0 +1,4442 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ExpSchemaDiff is the representation of a diff between two schemas.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ExpSchemaDiff} + */ +public final class ExpSchemaDiff extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpSchemaDiff) + ExpSchemaDiffOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpSchemaDiff.newBuilder() to construct. + private ExpSchemaDiff(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpSchemaDiff() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpSchemaDiff(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpSchemaDiff_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpSchemaDiff_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpSchemaDiff.class, com.authzed.api.v1.ExpSchemaDiff.Builder.class); + } + + private int diffCase_ = 0; + private java.lang.Object diff_; + public enum DiffCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DEFINITION_ADDED(1), + DEFINITION_REMOVED(2), + DEFINITION_DOC_COMMENT_CHANGED(3), + RELATION_ADDED(4), + RELATION_REMOVED(5), + RELATION_DOC_COMMENT_CHANGED(6), + RELATION_SUBJECT_TYPE_ADDED(7), + RELATION_SUBJECT_TYPE_REMOVED(8), + PERMISSION_ADDED(9), + PERMISSION_REMOVED(10), + PERMISSION_DOC_COMMENT_CHANGED(11), + PERMISSION_EXPR_CHANGED(12), + CAVEAT_ADDED(13), + CAVEAT_REMOVED(14), + CAVEAT_DOC_COMMENT_CHANGED(15), + CAVEAT_EXPR_CHANGED(16), + CAVEAT_PARAMETER_ADDED(17), + CAVEAT_PARAMETER_REMOVED(18), + CAVEAT_PARAMETER_TYPE_CHANGED(19), + DIFF_NOT_SET(0); + private final int value; + private DiffCase(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 DiffCase valueOf(int value) { + return forNumber(value); + } + + public static DiffCase forNumber(int value) { + switch (value) { + case 1: return DEFINITION_ADDED; + case 2: return DEFINITION_REMOVED; + case 3: return DEFINITION_DOC_COMMENT_CHANGED; + case 4: return RELATION_ADDED; + case 5: return RELATION_REMOVED; + case 6: return RELATION_DOC_COMMENT_CHANGED; + case 7: return RELATION_SUBJECT_TYPE_ADDED; + case 8: return RELATION_SUBJECT_TYPE_REMOVED; + case 9: return PERMISSION_ADDED; + case 10: return PERMISSION_REMOVED; + case 11: return PERMISSION_DOC_COMMENT_CHANGED; + case 12: return PERMISSION_EXPR_CHANGED; + case 13: return CAVEAT_ADDED; + case 14: return CAVEAT_REMOVED; + case 15: return CAVEAT_DOC_COMMENT_CHANGED; + case 16: return CAVEAT_EXPR_CHANGED; + case 17: return CAVEAT_PARAMETER_ADDED; + case 18: return CAVEAT_PARAMETER_REMOVED; + case 19: return CAVEAT_PARAMETER_TYPE_CHANGED; + case 0: return DIFF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DiffCase + getDiffCase() { + return DiffCase.forNumber( + diffCase_); + } + + public static final int DEFINITION_ADDED_FIELD_NUMBER = 1; + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + * @return Whether the definitionAdded field is set. + */ + @java.lang.Override + public boolean hasDefinitionAdded() { + return diffCase_ == 1; + } + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + * @return The definitionAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinition getDefinitionAdded() { + if (diffCase_ == 1) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionAddedOrBuilder() { + if (diffCase_ == 1) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + + public static final int DEFINITION_REMOVED_FIELD_NUMBER = 2; + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + * @return Whether the definitionRemoved field is set. + */ + @java.lang.Override + public boolean hasDefinitionRemoved() { + return diffCase_ == 2; + } + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + * @return The definitionRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinition getDefinitionRemoved() { + if (diffCase_ == 2) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionRemovedOrBuilder() { + if (diffCase_ == 2) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + + public static final int DEFINITION_DOC_COMMENT_CHANGED_FIELD_NUMBER = 3; + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + * @return Whether the definitionDocCommentChanged field is set. + */ + @java.lang.Override + public boolean hasDefinitionDocCommentChanged() { + return diffCase_ == 3; + } + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + * @return The definitionDocCommentChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinition getDefinitionDocCommentChanged() { + if (diffCase_ == 3) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionDocCommentChangedOrBuilder() { + if (diffCase_ == 3) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + + public static final int RELATION_ADDED_FIELD_NUMBER = 4; + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + * @return Whether the relationAdded field is set. + */ + @java.lang.Override + public boolean hasRelationAdded() { + return diffCase_ == 4; + } + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + * @return The relationAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelation getRelationAdded() { + if (diffCase_ == 4) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationOrBuilder getRelationAddedOrBuilder() { + if (diffCase_ == 4) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + + public static final int RELATION_REMOVED_FIELD_NUMBER = 5; + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + * @return Whether the relationRemoved field is set. + */ + @java.lang.Override + public boolean hasRelationRemoved() { + return diffCase_ == 5; + } + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + * @return The relationRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelation getRelationRemoved() { + if (diffCase_ == 5) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationOrBuilder getRelationRemovedOrBuilder() { + if (diffCase_ == 5) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + + public static final int RELATION_DOC_COMMENT_CHANGED_FIELD_NUMBER = 6; + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + * @return Whether the relationDocCommentChanged field is set. + */ + @java.lang.Override + public boolean hasRelationDocCommentChanged() { + return diffCase_ == 6; + } + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + * @return The relationDocCommentChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelation getRelationDocCommentChanged() { + if (diffCase_ == 6) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationOrBuilder getRelationDocCommentChangedOrBuilder() { + if (diffCase_ == 6) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + + public static final int RELATION_SUBJECT_TYPE_ADDED_FIELD_NUMBER = 7; + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + * @return Whether the relationSubjectTypeAdded field is set. + */ + @java.lang.Override + public boolean hasRelationSubjectTypeAdded() { + return diffCase_ == 7; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + * @return The relationSubjectTypeAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChange getRelationSubjectTypeAdded() { + if (diffCase_ == 7) { + return (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_; + } + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder getRelationSubjectTypeAddedOrBuilder() { + if (diffCase_ == 7) { + return (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_; + } + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + + public static final int RELATION_SUBJECT_TYPE_REMOVED_FIELD_NUMBER = 8; + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + * @return Whether the relationSubjectTypeRemoved field is set. + */ + @java.lang.Override + public boolean hasRelationSubjectTypeRemoved() { + return diffCase_ == 8; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + * @return The relationSubjectTypeRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChange getRelationSubjectTypeRemoved() { + if (diffCase_ == 8) { + return (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_; + } + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder getRelationSubjectTypeRemovedOrBuilder() { + if (diffCase_ == 8) { + return (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_; + } + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + + public static final int PERMISSION_ADDED_FIELD_NUMBER = 9; + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + * @return Whether the permissionAdded field is set. + */ + @java.lang.Override + public boolean hasPermissionAdded() { + return diffCase_ == 9; + } + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + * @return The permissionAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermission getPermissionAdded() { + if (diffCase_ == 9) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermissionOrBuilder getPermissionAddedOrBuilder() { + if (diffCase_ == 9) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + + public static final int PERMISSION_REMOVED_FIELD_NUMBER = 10; + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + * @return Whether the permissionRemoved field is set. + */ + @java.lang.Override + public boolean hasPermissionRemoved() { + return diffCase_ == 10; + } + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + * @return The permissionRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermission getPermissionRemoved() { + if (diffCase_ == 10) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermissionOrBuilder getPermissionRemovedOrBuilder() { + if (diffCase_ == 10) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + + public static final int PERMISSION_DOC_COMMENT_CHANGED_FIELD_NUMBER = 11; + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + * @return Whether the permissionDocCommentChanged field is set. + */ + @java.lang.Override + public boolean hasPermissionDocCommentChanged() { + return diffCase_ == 11; + } + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + * @return The permissionDocCommentChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermission getPermissionDocCommentChanged() { + if (diffCase_ == 11) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermissionOrBuilder getPermissionDocCommentChangedOrBuilder() { + if (diffCase_ == 11) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + + public static final int PERMISSION_EXPR_CHANGED_FIELD_NUMBER = 12; + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + * @return Whether the permissionExprChanged field is set. + */ + @java.lang.Override + public boolean hasPermissionExprChanged() { + return diffCase_ == 12; + } + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + * @return The permissionExprChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermission getPermissionExprChanged() { + if (diffCase_ == 12) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermissionOrBuilder getPermissionExprChangedOrBuilder() { + if (diffCase_ == 12) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + + public static final int CAVEAT_ADDED_FIELD_NUMBER = 13; + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + * @return Whether the caveatAdded field is set. + */ + @java.lang.Override + public boolean hasCaveatAdded() { + return diffCase_ == 13; + } + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + * @return The caveatAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveat getCaveatAdded() { + if (diffCase_ == 13) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatOrBuilder getCaveatAddedOrBuilder() { + if (diffCase_ == 13) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + + public static final int CAVEAT_REMOVED_FIELD_NUMBER = 14; + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + * @return Whether the caveatRemoved field is set. + */ + @java.lang.Override + public boolean hasCaveatRemoved() { + return diffCase_ == 14; + } + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + * @return The caveatRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveat getCaveatRemoved() { + if (diffCase_ == 14) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatOrBuilder getCaveatRemovedOrBuilder() { + if (diffCase_ == 14) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + + public static final int CAVEAT_DOC_COMMENT_CHANGED_FIELD_NUMBER = 15; + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + * @return Whether the caveatDocCommentChanged field is set. + */ + @java.lang.Override + public boolean hasCaveatDocCommentChanged() { + return diffCase_ == 15; + } + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + * @return The caveatDocCommentChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveat getCaveatDocCommentChanged() { + if (diffCase_ == 15) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatOrBuilder getCaveatDocCommentChangedOrBuilder() { + if (diffCase_ == 15) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + + public static final int CAVEAT_EXPR_CHANGED_FIELD_NUMBER = 16; + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + * @return Whether the caveatExprChanged field is set. + */ + @java.lang.Override + public boolean hasCaveatExprChanged() { + return diffCase_ == 16; + } + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + * @return The caveatExprChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveat getCaveatExprChanged() { + if (diffCase_ == 16) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatOrBuilder getCaveatExprChangedOrBuilder() { + if (diffCase_ == 16) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + + public static final int CAVEAT_PARAMETER_ADDED_FIELD_NUMBER = 17; + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + * @return Whether the caveatParameterAdded field is set. + */ + @java.lang.Override + public boolean hasCaveatParameterAdded() { + return diffCase_ == 17; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + * @return The caveatParameterAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameter getCaveatParameterAdded() { + if (diffCase_ == 17) { + return (com.authzed.api.v1.ExpCaveatParameter) diff_; + } + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterOrBuilder getCaveatParameterAddedOrBuilder() { + if (diffCase_ == 17) { + return (com.authzed.api.v1.ExpCaveatParameter) diff_; + } + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + + public static final int CAVEAT_PARAMETER_REMOVED_FIELD_NUMBER = 18; + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + * @return Whether the caveatParameterRemoved field is set. + */ + @java.lang.Override + public boolean hasCaveatParameterRemoved() { + return diffCase_ == 18; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + * @return The caveatParameterRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameter getCaveatParameterRemoved() { + if (diffCase_ == 18) { + return (com.authzed.api.v1.ExpCaveatParameter) diff_; + } + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterOrBuilder getCaveatParameterRemovedOrBuilder() { + if (diffCase_ == 18) { + return (com.authzed.api.v1.ExpCaveatParameter) diff_; + } + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + + public static final int CAVEAT_PARAMETER_TYPE_CHANGED_FIELD_NUMBER = 19; + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + * @return Whether the caveatParameterTypeChanged field is set. + */ + @java.lang.Override + public boolean hasCaveatParameterTypeChanged() { + return diffCase_ == 19; + } + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + * @return The caveatParameterTypeChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterTypeChange getCaveatParameterTypeChanged() { + if (diffCase_ == 19) { + return (com.authzed.api.v1.ExpCaveatParameterTypeChange) diff_; + } + return com.authzed.api.v1.ExpCaveatParameterTypeChange.getDefaultInstance(); + } + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterTypeChangeOrBuilder getCaveatParameterTypeChangedOrBuilder() { + if (diffCase_ == 19) { + return (com.authzed.api.v1.ExpCaveatParameterTypeChange) diff_; + } + return com.authzed.api.v1.ExpCaveatParameterTypeChange.getDefaultInstance(); + } + + 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 (diffCase_ == 1) { + output.writeMessage(1, (com.authzed.api.v1.ExpDefinition) diff_); + } + if (diffCase_ == 2) { + output.writeMessage(2, (com.authzed.api.v1.ExpDefinition) diff_); + } + if (diffCase_ == 3) { + output.writeMessage(3, (com.authzed.api.v1.ExpDefinition) diff_); + } + if (diffCase_ == 4) { + output.writeMessage(4, (com.authzed.api.v1.ExpRelation) diff_); + } + if (diffCase_ == 5) { + output.writeMessage(5, (com.authzed.api.v1.ExpRelation) diff_); + } + if (diffCase_ == 6) { + output.writeMessage(6, (com.authzed.api.v1.ExpRelation) diff_); + } + if (diffCase_ == 7) { + output.writeMessage(7, (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_); + } + if (diffCase_ == 8) { + output.writeMessage(8, (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_); + } + if (diffCase_ == 9) { + output.writeMessage(9, (com.authzed.api.v1.ExpPermission) diff_); + } + if (diffCase_ == 10) { + output.writeMessage(10, (com.authzed.api.v1.ExpPermission) diff_); + } + if (diffCase_ == 11) { + output.writeMessage(11, (com.authzed.api.v1.ExpPermission) diff_); + } + if (diffCase_ == 12) { + output.writeMessage(12, (com.authzed.api.v1.ExpPermission) diff_); + } + if (diffCase_ == 13) { + output.writeMessage(13, (com.authzed.api.v1.ExpCaveat) diff_); + } + if (diffCase_ == 14) { + output.writeMessage(14, (com.authzed.api.v1.ExpCaveat) diff_); + } + if (diffCase_ == 15) { + output.writeMessage(15, (com.authzed.api.v1.ExpCaveat) diff_); + } + if (diffCase_ == 16) { + output.writeMessage(16, (com.authzed.api.v1.ExpCaveat) diff_); + } + if (diffCase_ == 17) { + output.writeMessage(17, (com.authzed.api.v1.ExpCaveatParameter) diff_); + } + if (diffCase_ == 18) { + output.writeMessage(18, (com.authzed.api.v1.ExpCaveatParameter) diff_); + } + if (diffCase_ == 19) { + output.writeMessage(19, (com.authzed.api.v1.ExpCaveatParameterTypeChange) diff_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (diffCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.authzed.api.v1.ExpDefinition) diff_); + } + if (diffCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.authzed.api.v1.ExpDefinition) diff_); + } + if (diffCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.authzed.api.v1.ExpDefinition) diff_); + } + if (diffCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.authzed.api.v1.ExpRelation) diff_); + } + if (diffCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.authzed.api.v1.ExpRelation) diff_); + } + if (diffCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.authzed.api.v1.ExpRelation) diff_); + } + if (diffCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_); + } + if (diffCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_); + } + if (diffCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.authzed.api.v1.ExpPermission) diff_); + } + if (diffCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (com.authzed.api.v1.ExpPermission) diff_); + } + if (diffCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (com.authzed.api.v1.ExpPermission) diff_); + } + if (diffCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (com.authzed.api.v1.ExpPermission) diff_); + } + if (diffCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (com.authzed.api.v1.ExpCaveat) diff_); + } + if (diffCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, (com.authzed.api.v1.ExpCaveat) diff_); + } + if (diffCase_ == 15) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, (com.authzed.api.v1.ExpCaveat) diff_); + } + if (diffCase_ == 16) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, (com.authzed.api.v1.ExpCaveat) diff_); + } + if (diffCase_ == 17) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, (com.authzed.api.v1.ExpCaveatParameter) diff_); + } + if (diffCase_ == 18) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, (com.authzed.api.v1.ExpCaveatParameter) diff_); + } + if (diffCase_ == 19) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, (com.authzed.api.v1.ExpCaveatParameterTypeChange) diff_); + } + 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.ExpSchemaDiff)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpSchemaDiff other = (com.authzed.api.v1.ExpSchemaDiff) obj; + + if (!getDiffCase().equals(other.getDiffCase())) return false; + switch (diffCase_) { + case 1: + if (!getDefinitionAdded() + .equals(other.getDefinitionAdded())) return false; + break; + case 2: + if (!getDefinitionRemoved() + .equals(other.getDefinitionRemoved())) return false; + break; + case 3: + if (!getDefinitionDocCommentChanged() + .equals(other.getDefinitionDocCommentChanged())) return false; + break; + case 4: + if (!getRelationAdded() + .equals(other.getRelationAdded())) return false; + break; + case 5: + if (!getRelationRemoved() + .equals(other.getRelationRemoved())) return false; + break; + case 6: + if (!getRelationDocCommentChanged() + .equals(other.getRelationDocCommentChanged())) return false; + break; + case 7: + if (!getRelationSubjectTypeAdded() + .equals(other.getRelationSubjectTypeAdded())) return false; + break; + case 8: + if (!getRelationSubjectTypeRemoved() + .equals(other.getRelationSubjectTypeRemoved())) return false; + break; + case 9: + if (!getPermissionAdded() + .equals(other.getPermissionAdded())) return false; + break; + case 10: + if (!getPermissionRemoved() + .equals(other.getPermissionRemoved())) return false; + break; + case 11: + if (!getPermissionDocCommentChanged() + .equals(other.getPermissionDocCommentChanged())) return false; + break; + case 12: + if (!getPermissionExprChanged() + .equals(other.getPermissionExprChanged())) return false; + break; + case 13: + if (!getCaveatAdded() + .equals(other.getCaveatAdded())) return false; + break; + case 14: + if (!getCaveatRemoved() + .equals(other.getCaveatRemoved())) return false; + break; + case 15: + if (!getCaveatDocCommentChanged() + .equals(other.getCaveatDocCommentChanged())) return false; + break; + case 16: + if (!getCaveatExprChanged() + .equals(other.getCaveatExprChanged())) return false; + break; + case 17: + if (!getCaveatParameterAdded() + .equals(other.getCaveatParameterAdded())) return false; + break; + case 18: + if (!getCaveatParameterRemoved() + .equals(other.getCaveatParameterRemoved())) return false; + break; + case 19: + if (!getCaveatParameterTypeChanged() + .equals(other.getCaveatParameterTypeChanged())) 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(); + switch (diffCase_) { + case 1: + hash = (37 * hash) + DEFINITION_ADDED_FIELD_NUMBER; + hash = (53 * hash) + getDefinitionAdded().hashCode(); + break; + case 2: + hash = (37 * hash) + DEFINITION_REMOVED_FIELD_NUMBER; + hash = (53 * hash) + getDefinitionRemoved().hashCode(); + break; + case 3: + hash = (37 * hash) + DEFINITION_DOC_COMMENT_CHANGED_FIELD_NUMBER; + hash = (53 * hash) + getDefinitionDocCommentChanged().hashCode(); + break; + case 4: + hash = (37 * hash) + RELATION_ADDED_FIELD_NUMBER; + hash = (53 * hash) + getRelationAdded().hashCode(); + break; + case 5: + hash = (37 * hash) + RELATION_REMOVED_FIELD_NUMBER; + hash = (53 * hash) + getRelationRemoved().hashCode(); + break; + case 6: + hash = (37 * hash) + RELATION_DOC_COMMENT_CHANGED_FIELD_NUMBER; + hash = (53 * hash) + getRelationDocCommentChanged().hashCode(); + break; + case 7: + hash = (37 * hash) + RELATION_SUBJECT_TYPE_ADDED_FIELD_NUMBER; + hash = (53 * hash) + getRelationSubjectTypeAdded().hashCode(); + break; + case 8: + hash = (37 * hash) + RELATION_SUBJECT_TYPE_REMOVED_FIELD_NUMBER; + hash = (53 * hash) + getRelationSubjectTypeRemoved().hashCode(); + break; + case 9: + hash = (37 * hash) + PERMISSION_ADDED_FIELD_NUMBER; + hash = (53 * hash) + getPermissionAdded().hashCode(); + break; + case 10: + hash = (37 * hash) + PERMISSION_REMOVED_FIELD_NUMBER; + hash = (53 * hash) + getPermissionRemoved().hashCode(); + break; + case 11: + hash = (37 * hash) + PERMISSION_DOC_COMMENT_CHANGED_FIELD_NUMBER; + hash = (53 * hash) + getPermissionDocCommentChanged().hashCode(); + break; + case 12: + hash = (37 * hash) + PERMISSION_EXPR_CHANGED_FIELD_NUMBER; + hash = (53 * hash) + getPermissionExprChanged().hashCode(); + break; + case 13: + hash = (37 * hash) + CAVEAT_ADDED_FIELD_NUMBER; + hash = (53 * hash) + getCaveatAdded().hashCode(); + break; + case 14: + hash = (37 * hash) + CAVEAT_REMOVED_FIELD_NUMBER; + hash = (53 * hash) + getCaveatRemoved().hashCode(); + break; + case 15: + hash = (37 * hash) + CAVEAT_DOC_COMMENT_CHANGED_FIELD_NUMBER; + hash = (53 * hash) + getCaveatDocCommentChanged().hashCode(); + break; + case 16: + hash = (37 * hash) + CAVEAT_EXPR_CHANGED_FIELD_NUMBER; + hash = (53 * hash) + getCaveatExprChanged().hashCode(); + break; + case 17: + hash = (37 * hash) + CAVEAT_PARAMETER_ADDED_FIELD_NUMBER; + hash = (53 * hash) + getCaveatParameterAdded().hashCode(); + break; + case 18: + hash = (37 * hash) + CAVEAT_PARAMETER_REMOVED_FIELD_NUMBER; + hash = (53 * hash) + getCaveatParameterRemoved().hashCode(); + break; + case 19: + hash = (37 * hash) + CAVEAT_PARAMETER_TYPE_CHANGED_FIELD_NUMBER; + hash = (53 * hash) + getCaveatParameterTypeChanged().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpSchemaDiff parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpSchemaDiff 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.ExpSchemaDiff parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpSchemaDiff 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.ExpSchemaDiff parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpSchemaDiff parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpSchemaDiff parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpSchemaDiff 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.ExpSchemaDiff parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpSchemaDiff 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.ExpSchemaDiff parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpSchemaDiff 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.ExpSchemaDiff 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; + } + /** + *
+   * ExpSchemaDiff is the representation of a diff between two schemas.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ExpSchemaDiff} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpSchemaDiff) + com.authzed.api.v1.ExpSchemaDiffOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpSchemaDiff_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpSchemaDiff_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpSchemaDiff.class, com.authzed.api.v1.ExpSchemaDiff.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpSchemaDiff.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (definitionAddedBuilder_ != null) { + definitionAddedBuilder_.clear(); + } + if (definitionRemovedBuilder_ != null) { + definitionRemovedBuilder_.clear(); + } + if (definitionDocCommentChangedBuilder_ != null) { + definitionDocCommentChangedBuilder_.clear(); + } + if (relationAddedBuilder_ != null) { + relationAddedBuilder_.clear(); + } + if (relationRemovedBuilder_ != null) { + relationRemovedBuilder_.clear(); + } + if (relationDocCommentChangedBuilder_ != null) { + relationDocCommentChangedBuilder_.clear(); + } + if (relationSubjectTypeAddedBuilder_ != null) { + relationSubjectTypeAddedBuilder_.clear(); + } + if (relationSubjectTypeRemovedBuilder_ != null) { + relationSubjectTypeRemovedBuilder_.clear(); + } + if (permissionAddedBuilder_ != null) { + permissionAddedBuilder_.clear(); + } + if (permissionRemovedBuilder_ != null) { + permissionRemovedBuilder_.clear(); + } + if (permissionDocCommentChangedBuilder_ != null) { + permissionDocCommentChangedBuilder_.clear(); + } + if (permissionExprChangedBuilder_ != null) { + permissionExprChangedBuilder_.clear(); + } + if (caveatAddedBuilder_ != null) { + caveatAddedBuilder_.clear(); + } + if (caveatRemovedBuilder_ != null) { + caveatRemovedBuilder_.clear(); + } + if (caveatDocCommentChangedBuilder_ != null) { + caveatDocCommentChangedBuilder_.clear(); + } + if (caveatExprChangedBuilder_ != null) { + caveatExprChangedBuilder_.clear(); + } + if (caveatParameterAddedBuilder_ != null) { + caveatParameterAddedBuilder_.clear(); + } + if (caveatParameterRemovedBuilder_ != null) { + caveatParameterRemovedBuilder_.clear(); + } + if (caveatParameterTypeChangedBuilder_ != null) { + caveatParameterTypeChangedBuilder_.clear(); + } + diffCase_ = 0; + diff_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpSchemaDiff_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpSchemaDiff getDefaultInstanceForType() { + return com.authzed.api.v1.ExpSchemaDiff.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpSchemaDiff build() { + com.authzed.api.v1.ExpSchemaDiff result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpSchemaDiff buildPartial() { + com.authzed.api.v1.ExpSchemaDiff result = new com.authzed.api.v1.ExpSchemaDiff(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExpSchemaDiff result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.authzed.api.v1.ExpSchemaDiff result) { + result.diffCase_ = diffCase_; + result.diff_ = this.diff_; + if (diffCase_ == 1 && + definitionAddedBuilder_ != null) { + result.diff_ = definitionAddedBuilder_.build(); + } + if (diffCase_ == 2 && + definitionRemovedBuilder_ != null) { + result.diff_ = definitionRemovedBuilder_.build(); + } + if (diffCase_ == 3 && + definitionDocCommentChangedBuilder_ != null) { + result.diff_ = definitionDocCommentChangedBuilder_.build(); + } + if (diffCase_ == 4 && + relationAddedBuilder_ != null) { + result.diff_ = relationAddedBuilder_.build(); + } + if (diffCase_ == 5 && + relationRemovedBuilder_ != null) { + result.diff_ = relationRemovedBuilder_.build(); + } + if (diffCase_ == 6 && + relationDocCommentChangedBuilder_ != null) { + result.diff_ = relationDocCommentChangedBuilder_.build(); + } + if (diffCase_ == 7 && + relationSubjectTypeAddedBuilder_ != null) { + result.diff_ = relationSubjectTypeAddedBuilder_.build(); + } + if (diffCase_ == 8 && + relationSubjectTypeRemovedBuilder_ != null) { + result.diff_ = relationSubjectTypeRemovedBuilder_.build(); + } + if (diffCase_ == 9 && + permissionAddedBuilder_ != null) { + result.diff_ = permissionAddedBuilder_.build(); + } + if (diffCase_ == 10 && + permissionRemovedBuilder_ != null) { + result.diff_ = permissionRemovedBuilder_.build(); + } + if (diffCase_ == 11 && + permissionDocCommentChangedBuilder_ != null) { + result.diff_ = permissionDocCommentChangedBuilder_.build(); + } + if (diffCase_ == 12 && + permissionExprChangedBuilder_ != null) { + result.diff_ = permissionExprChangedBuilder_.build(); + } + if (diffCase_ == 13 && + caveatAddedBuilder_ != null) { + result.diff_ = caveatAddedBuilder_.build(); + } + if (diffCase_ == 14 && + caveatRemovedBuilder_ != null) { + result.diff_ = caveatRemovedBuilder_.build(); + } + if (diffCase_ == 15 && + caveatDocCommentChangedBuilder_ != null) { + result.diff_ = caveatDocCommentChangedBuilder_.build(); + } + if (diffCase_ == 16 && + caveatExprChangedBuilder_ != null) { + result.diff_ = caveatExprChangedBuilder_.build(); + } + if (diffCase_ == 17 && + caveatParameterAddedBuilder_ != null) { + result.diff_ = caveatParameterAddedBuilder_.build(); + } + if (diffCase_ == 18 && + caveatParameterRemovedBuilder_ != null) { + result.diff_ = caveatParameterRemovedBuilder_.build(); + } + if (diffCase_ == 19 && + caveatParameterTypeChangedBuilder_ != null) { + result.diff_ = caveatParameterTypeChangedBuilder_.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.ExpSchemaDiff) { + return mergeFrom((com.authzed.api.v1.ExpSchemaDiff)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpSchemaDiff other) { + if (other == com.authzed.api.v1.ExpSchemaDiff.getDefaultInstance()) return this; + switch (other.getDiffCase()) { + case DEFINITION_ADDED: { + mergeDefinitionAdded(other.getDefinitionAdded()); + break; + } + case DEFINITION_REMOVED: { + mergeDefinitionRemoved(other.getDefinitionRemoved()); + break; + } + case DEFINITION_DOC_COMMENT_CHANGED: { + mergeDefinitionDocCommentChanged(other.getDefinitionDocCommentChanged()); + break; + } + case RELATION_ADDED: { + mergeRelationAdded(other.getRelationAdded()); + break; + } + case RELATION_REMOVED: { + mergeRelationRemoved(other.getRelationRemoved()); + break; + } + case RELATION_DOC_COMMENT_CHANGED: { + mergeRelationDocCommentChanged(other.getRelationDocCommentChanged()); + break; + } + case RELATION_SUBJECT_TYPE_ADDED: { + mergeRelationSubjectTypeAdded(other.getRelationSubjectTypeAdded()); + break; + } + case RELATION_SUBJECT_TYPE_REMOVED: { + mergeRelationSubjectTypeRemoved(other.getRelationSubjectTypeRemoved()); + break; + } + case PERMISSION_ADDED: { + mergePermissionAdded(other.getPermissionAdded()); + break; + } + case PERMISSION_REMOVED: { + mergePermissionRemoved(other.getPermissionRemoved()); + break; + } + case PERMISSION_DOC_COMMENT_CHANGED: { + mergePermissionDocCommentChanged(other.getPermissionDocCommentChanged()); + break; + } + case PERMISSION_EXPR_CHANGED: { + mergePermissionExprChanged(other.getPermissionExprChanged()); + break; + } + case CAVEAT_ADDED: { + mergeCaveatAdded(other.getCaveatAdded()); + break; + } + case CAVEAT_REMOVED: { + mergeCaveatRemoved(other.getCaveatRemoved()); + break; + } + case CAVEAT_DOC_COMMENT_CHANGED: { + mergeCaveatDocCommentChanged(other.getCaveatDocCommentChanged()); + break; + } + case CAVEAT_EXPR_CHANGED: { + mergeCaveatExprChanged(other.getCaveatExprChanged()); + break; + } + case CAVEAT_PARAMETER_ADDED: { + mergeCaveatParameterAdded(other.getCaveatParameterAdded()); + break; + } + case CAVEAT_PARAMETER_REMOVED: { + mergeCaveatParameterRemoved(other.getCaveatParameterRemoved()); + break; + } + case CAVEAT_PARAMETER_TYPE_CHANGED: { + mergeCaveatParameterTypeChanged(other.getCaveatParameterTypeChanged()); + break; + } + case DIFF_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( + getDefinitionAddedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + getDefinitionRemovedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getDefinitionDocCommentChangedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getRelationAddedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getRelationRemovedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + getRelationDocCommentChangedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 6; + break; + } // case 50 + case 58: { + input.readMessage( + getRelationSubjectTypeAddedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 7; + break; + } // case 58 + case 66: { + input.readMessage( + getRelationSubjectTypeRemovedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 8; + break; + } // case 66 + case 74: { + input.readMessage( + getPermissionAddedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 9; + break; + } // case 74 + case 82: { + input.readMessage( + getPermissionRemovedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + getPermissionDocCommentChangedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 11; + break; + } // case 90 + case 98: { + input.readMessage( + getPermissionExprChangedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 12; + break; + } // case 98 + case 106: { + input.readMessage( + getCaveatAddedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 13; + break; + } // case 106 + case 114: { + input.readMessage( + getCaveatRemovedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 14; + break; + } // case 114 + case 122: { + input.readMessage( + getCaveatDocCommentChangedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 15; + break; + } // case 122 + case 130: { + input.readMessage( + getCaveatExprChangedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 16; + break; + } // case 130 + case 138: { + input.readMessage( + getCaveatParameterAddedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 17; + break; + } // case 138 + case 146: { + input.readMessage( + getCaveatParameterRemovedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 18; + break; + } // case 146 + case 154: { + input.readMessage( + getCaveatParameterTypeChangedFieldBuilder().getBuilder(), + extensionRegistry); + diffCase_ = 19; + break; + } // case 154 + 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 diffCase_ = 0; + private java.lang.Object diff_; + public DiffCase + getDiffCase() { + return DiffCase.forNumber( + diffCase_); + } + + public Builder clearDiff() { + diffCase_ = 0; + diff_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder> definitionAddedBuilder_; + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + * @return Whether the definitionAdded field is set. + */ + @java.lang.Override + public boolean hasDefinitionAdded() { + return diffCase_ == 1; + } + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + * @return The definitionAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinition getDefinitionAdded() { + if (definitionAddedBuilder_ == null) { + if (diffCase_ == 1) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } else { + if (diffCase_ == 1) { + return definitionAddedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + */ + public Builder setDefinitionAdded(com.authzed.api.v1.ExpDefinition value) { + if (definitionAddedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + definitionAddedBuilder_.setMessage(value); + } + diffCase_ = 1; + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + */ + public Builder setDefinitionAdded( + com.authzed.api.v1.ExpDefinition.Builder builderForValue) { + if (definitionAddedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + definitionAddedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 1; + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + */ + public Builder mergeDefinitionAdded(com.authzed.api.v1.ExpDefinition value) { + if (definitionAddedBuilder_ == null) { + if (diffCase_ == 1 && + diff_ != com.authzed.api.v1.ExpDefinition.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpDefinition.newBuilder((com.authzed.api.v1.ExpDefinition) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 1) { + definitionAddedBuilder_.mergeFrom(value); + } else { + definitionAddedBuilder_.setMessage(value); + } + } + diffCase_ = 1; + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + */ + public Builder clearDefinitionAdded() { + if (definitionAddedBuilder_ == null) { + if (diffCase_ == 1) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 1) { + diffCase_ = 0; + diff_ = null; + } + definitionAddedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + */ + public com.authzed.api.v1.ExpDefinition.Builder getDefinitionAddedBuilder() { + return getDefinitionAddedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionAddedOrBuilder() { + if ((diffCase_ == 1) && (definitionAddedBuilder_ != null)) { + return definitionAddedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 1) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder> + getDefinitionAddedFieldBuilder() { + if (definitionAddedBuilder_ == null) { + if (!(diffCase_ == 1)) { + diff_ = com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + definitionAddedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder>( + (com.authzed.api.v1.ExpDefinition) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 1; + onChanged(); + return definitionAddedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder> definitionRemovedBuilder_; + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + * @return Whether the definitionRemoved field is set. + */ + @java.lang.Override + public boolean hasDefinitionRemoved() { + return diffCase_ == 2; + } + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + * @return The definitionRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinition getDefinitionRemoved() { + if (definitionRemovedBuilder_ == null) { + if (diffCase_ == 2) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } else { + if (diffCase_ == 2) { + return definitionRemovedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + */ + public Builder setDefinitionRemoved(com.authzed.api.v1.ExpDefinition value) { + if (definitionRemovedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + definitionRemovedBuilder_.setMessage(value); + } + diffCase_ = 2; + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + */ + public Builder setDefinitionRemoved( + com.authzed.api.v1.ExpDefinition.Builder builderForValue) { + if (definitionRemovedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + definitionRemovedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 2; + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + */ + public Builder mergeDefinitionRemoved(com.authzed.api.v1.ExpDefinition value) { + if (definitionRemovedBuilder_ == null) { + if (diffCase_ == 2 && + diff_ != com.authzed.api.v1.ExpDefinition.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpDefinition.newBuilder((com.authzed.api.v1.ExpDefinition) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 2) { + definitionRemovedBuilder_.mergeFrom(value); + } else { + definitionRemovedBuilder_.setMessage(value); + } + } + diffCase_ = 2; + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + */ + public Builder clearDefinitionRemoved() { + if (definitionRemovedBuilder_ == null) { + if (diffCase_ == 2) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 2) { + diffCase_ = 0; + diff_ = null; + } + definitionRemovedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + */ + public com.authzed.api.v1.ExpDefinition.Builder getDefinitionRemovedBuilder() { + return getDefinitionRemovedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionRemovedOrBuilder() { + if ((diffCase_ == 2) && (definitionRemovedBuilder_ != null)) { + return definitionRemovedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 2) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder> + getDefinitionRemovedFieldBuilder() { + if (definitionRemovedBuilder_ == null) { + if (!(diffCase_ == 2)) { + diff_ = com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + definitionRemovedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder>( + (com.authzed.api.v1.ExpDefinition) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 2; + onChanged(); + return definitionRemovedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder> definitionDocCommentChangedBuilder_; + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + * @return Whether the definitionDocCommentChanged field is set. + */ + @java.lang.Override + public boolean hasDefinitionDocCommentChanged() { + return diffCase_ == 3; + } + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + * @return The definitionDocCommentChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinition getDefinitionDocCommentChanged() { + if (definitionDocCommentChangedBuilder_ == null) { + if (diffCase_ == 3) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } else { + if (diffCase_ == 3) { + return definitionDocCommentChangedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + */ + public Builder setDefinitionDocCommentChanged(com.authzed.api.v1.ExpDefinition value) { + if (definitionDocCommentChangedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + definitionDocCommentChangedBuilder_.setMessage(value); + } + diffCase_ = 3; + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + */ + public Builder setDefinitionDocCommentChanged( + com.authzed.api.v1.ExpDefinition.Builder builderForValue) { + if (definitionDocCommentChangedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + definitionDocCommentChangedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 3; + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + */ + public Builder mergeDefinitionDocCommentChanged(com.authzed.api.v1.ExpDefinition value) { + if (definitionDocCommentChangedBuilder_ == null) { + if (diffCase_ == 3 && + diff_ != com.authzed.api.v1.ExpDefinition.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpDefinition.newBuilder((com.authzed.api.v1.ExpDefinition) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 3) { + definitionDocCommentChangedBuilder_.mergeFrom(value); + } else { + definitionDocCommentChangedBuilder_.setMessage(value); + } + } + diffCase_ = 3; + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + */ + public Builder clearDefinitionDocCommentChanged() { + if (definitionDocCommentChangedBuilder_ == null) { + if (diffCase_ == 3) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 3) { + diffCase_ = 0; + diff_ = null; + } + definitionDocCommentChangedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + */ + public com.authzed.api.v1.ExpDefinition.Builder getDefinitionDocCommentChangedBuilder() { + return getDefinitionDocCommentChangedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionDocCommentChangedOrBuilder() { + if ((diffCase_ == 3) && (definitionDocCommentChangedBuilder_ != null)) { + return definitionDocCommentChangedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 3) { + return (com.authzed.api.v1.ExpDefinition) diff_; + } + return com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder> + getDefinitionDocCommentChangedFieldBuilder() { + if (definitionDocCommentChangedBuilder_ == null) { + if (!(diffCase_ == 3)) { + diff_ = com.authzed.api.v1.ExpDefinition.getDefaultInstance(); + } + definitionDocCommentChangedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder>( + (com.authzed.api.v1.ExpDefinition) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 3; + onChanged(); + return definitionDocCommentChangedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder> relationAddedBuilder_; + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + * @return Whether the relationAdded field is set. + */ + @java.lang.Override + public boolean hasRelationAdded() { + return diffCase_ == 4; + } + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + * @return The relationAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelation getRelationAdded() { + if (relationAddedBuilder_ == null) { + if (diffCase_ == 4) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } else { + if (diffCase_ == 4) { + return relationAddedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + */ + public Builder setRelationAdded(com.authzed.api.v1.ExpRelation value) { + if (relationAddedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + relationAddedBuilder_.setMessage(value); + } + diffCase_ = 4; + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + */ + public Builder setRelationAdded( + com.authzed.api.v1.ExpRelation.Builder builderForValue) { + if (relationAddedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + relationAddedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 4; + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + */ + public Builder mergeRelationAdded(com.authzed.api.v1.ExpRelation value) { + if (relationAddedBuilder_ == null) { + if (diffCase_ == 4 && + diff_ != com.authzed.api.v1.ExpRelation.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpRelation.newBuilder((com.authzed.api.v1.ExpRelation) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 4) { + relationAddedBuilder_.mergeFrom(value); + } else { + relationAddedBuilder_.setMessage(value); + } + } + diffCase_ = 4; + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + */ + public Builder clearRelationAdded() { + if (relationAddedBuilder_ == null) { + if (diffCase_ == 4) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 4) { + diffCase_ = 0; + diff_ = null; + } + relationAddedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + */ + public com.authzed.api.v1.ExpRelation.Builder getRelationAddedBuilder() { + return getRelationAddedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationOrBuilder getRelationAddedOrBuilder() { + if ((diffCase_ == 4) && (relationAddedBuilder_ != null)) { + return relationAddedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 4) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder> + getRelationAddedFieldBuilder() { + if (relationAddedBuilder_ == null) { + if (!(diffCase_ == 4)) { + diff_ = com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + relationAddedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder>( + (com.authzed.api.v1.ExpRelation) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 4; + onChanged(); + return relationAddedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder> relationRemovedBuilder_; + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + * @return Whether the relationRemoved field is set. + */ + @java.lang.Override + public boolean hasRelationRemoved() { + return diffCase_ == 5; + } + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + * @return The relationRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelation getRelationRemoved() { + if (relationRemovedBuilder_ == null) { + if (diffCase_ == 5) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } else { + if (diffCase_ == 5) { + return relationRemovedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + */ + public Builder setRelationRemoved(com.authzed.api.v1.ExpRelation value) { + if (relationRemovedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + relationRemovedBuilder_.setMessage(value); + } + diffCase_ = 5; + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + */ + public Builder setRelationRemoved( + com.authzed.api.v1.ExpRelation.Builder builderForValue) { + if (relationRemovedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + relationRemovedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 5; + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + */ + public Builder mergeRelationRemoved(com.authzed.api.v1.ExpRelation value) { + if (relationRemovedBuilder_ == null) { + if (diffCase_ == 5 && + diff_ != com.authzed.api.v1.ExpRelation.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpRelation.newBuilder((com.authzed.api.v1.ExpRelation) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 5) { + relationRemovedBuilder_.mergeFrom(value); + } else { + relationRemovedBuilder_.setMessage(value); + } + } + diffCase_ = 5; + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + */ + public Builder clearRelationRemoved() { + if (relationRemovedBuilder_ == null) { + if (diffCase_ == 5) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 5) { + diffCase_ = 0; + diff_ = null; + } + relationRemovedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + */ + public com.authzed.api.v1.ExpRelation.Builder getRelationRemovedBuilder() { + return getRelationRemovedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationOrBuilder getRelationRemovedOrBuilder() { + if ((diffCase_ == 5) && (relationRemovedBuilder_ != null)) { + return relationRemovedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 5) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder> + getRelationRemovedFieldBuilder() { + if (relationRemovedBuilder_ == null) { + if (!(diffCase_ == 5)) { + diff_ = com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + relationRemovedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder>( + (com.authzed.api.v1.ExpRelation) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 5; + onChanged(); + return relationRemovedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder> relationDocCommentChangedBuilder_; + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + * @return Whether the relationDocCommentChanged field is set. + */ + @java.lang.Override + public boolean hasRelationDocCommentChanged() { + return diffCase_ == 6; + } + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + * @return The relationDocCommentChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelation getRelationDocCommentChanged() { + if (relationDocCommentChangedBuilder_ == null) { + if (diffCase_ == 6) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } else { + if (diffCase_ == 6) { + return relationDocCommentChangedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + */ + public Builder setRelationDocCommentChanged(com.authzed.api.v1.ExpRelation value) { + if (relationDocCommentChangedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + relationDocCommentChangedBuilder_.setMessage(value); + } + diffCase_ = 6; + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + */ + public Builder setRelationDocCommentChanged( + com.authzed.api.v1.ExpRelation.Builder builderForValue) { + if (relationDocCommentChangedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + relationDocCommentChangedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 6; + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + */ + public Builder mergeRelationDocCommentChanged(com.authzed.api.v1.ExpRelation value) { + if (relationDocCommentChangedBuilder_ == null) { + if (diffCase_ == 6 && + diff_ != com.authzed.api.v1.ExpRelation.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpRelation.newBuilder((com.authzed.api.v1.ExpRelation) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 6) { + relationDocCommentChangedBuilder_.mergeFrom(value); + } else { + relationDocCommentChangedBuilder_.setMessage(value); + } + } + diffCase_ = 6; + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + */ + public Builder clearRelationDocCommentChanged() { + if (relationDocCommentChangedBuilder_ == null) { + if (diffCase_ == 6) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 6) { + diffCase_ = 0; + diff_ = null; + } + relationDocCommentChangedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + */ + public com.authzed.api.v1.ExpRelation.Builder getRelationDocCommentChangedBuilder() { + return getRelationDocCommentChangedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationOrBuilder getRelationDocCommentChangedOrBuilder() { + if ((diffCase_ == 6) && (relationDocCommentChangedBuilder_ != null)) { + return relationDocCommentChangedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 6) { + return (com.authzed.api.v1.ExpRelation) diff_; + } + return com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder> + getRelationDocCommentChangedFieldBuilder() { + if (relationDocCommentChangedBuilder_ == null) { + if (!(diffCase_ == 6)) { + diff_ = com.authzed.api.v1.ExpRelation.getDefaultInstance(); + } + relationDocCommentChangedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelation, com.authzed.api.v1.ExpRelation.Builder, com.authzed.api.v1.ExpRelationOrBuilder>( + (com.authzed.api.v1.ExpRelation) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 6; + onChanged(); + return relationDocCommentChangedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelationSubjectTypeChange, com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder, com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder> relationSubjectTypeAddedBuilder_; + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + * @return Whether the relationSubjectTypeAdded field is set. + */ + @java.lang.Override + public boolean hasRelationSubjectTypeAdded() { + return diffCase_ == 7; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + * @return The relationSubjectTypeAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChange getRelationSubjectTypeAdded() { + if (relationSubjectTypeAddedBuilder_ == null) { + if (diffCase_ == 7) { + return (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_; + } + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } else { + if (diffCase_ == 7) { + return relationSubjectTypeAddedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + */ + public Builder setRelationSubjectTypeAdded(com.authzed.api.v1.ExpRelationSubjectTypeChange value) { + if (relationSubjectTypeAddedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + relationSubjectTypeAddedBuilder_.setMessage(value); + } + diffCase_ = 7; + return this; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + */ + public Builder setRelationSubjectTypeAdded( + com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder builderForValue) { + if (relationSubjectTypeAddedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + relationSubjectTypeAddedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 7; + return this; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + */ + public Builder mergeRelationSubjectTypeAdded(com.authzed.api.v1.ExpRelationSubjectTypeChange value) { + if (relationSubjectTypeAddedBuilder_ == null) { + if (diffCase_ == 7 && + diff_ != com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpRelationSubjectTypeChange.newBuilder((com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 7) { + relationSubjectTypeAddedBuilder_.mergeFrom(value); + } else { + relationSubjectTypeAddedBuilder_.setMessage(value); + } + } + diffCase_ = 7; + return this; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + */ + public Builder clearRelationSubjectTypeAdded() { + if (relationSubjectTypeAddedBuilder_ == null) { + if (diffCase_ == 7) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 7) { + diffCase_ = 0; + diff_ = null; + } + relationSubjectTypeAddedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + */ + public com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder getRelationSubjectTypeAddedBuilder() { + return getRelationSubjectTypeAddedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder getRelationSubjectTypeAddedOrBuilder() { + if ((diffCase_ == 7) && (relationSubjectTypeAddedBuilder_ != null)) { + return relationSubjectTypeAddedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 7) { + return (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_; + } + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelationSubjectTypeChange, com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder, com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder> + getRelationSubjectTypeAddedFieldBuilder() { + if (relationSubjectTypeAddedBuilder_ == null) { + if (!(diffCase_ == 7)) { + diff_ = com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + relationSubjectTypeAddedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelationSubjectTypeChange, com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder, com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder>( + (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 7; + onChanged(); + return relationSubjectTypeAddedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelationSubjectTypeChange, com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder, com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder> relationSubjectTypeRemovedBuilder_; + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + * @return Whether the relationSubjectTypeRemoved field is set. + */ + @java.lang.Override + public boolean hasRelationSubjectTypeRemoved() { + return diffCase_ == 8; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + * @return The relationSubjectTypeRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChange getRelationSubjectTypeRemoved() { + if (relationSubjectTypeRemovedBuilder_ == null) { + if (diffCase_ == 8) { + return (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_; + } + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } else { + if (diffCase_ == 8) { + return relationSubjectTypeRemovedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + */ + public Builder setRelationSubjectTypeRemoved(com.authzed.api.v1.ExpRelationSubjectTypeChange value) { + if (relationSubjectTypeRemovedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + relationSubjectTypeRemovedBuilder_.setMessage(value); + } + diffCase_ = 8; + return this; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + */ + public Builder setRelationSubjectTypeRemoved( + com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder builderForValue) { + if (relationSubjectTypeRemovedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + relationSubjectTypeRemovedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 8; + return this; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + */ + public Builder mergeRelationSubjectTypeRemoved(com.authzed.api.v1.ExpRelationSubjectTypeChange value) { + if (relationSubjectTypeRemovedBuilder_ == null) { + if (diffCase_ == 8 && + diff_ != com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpRelationSubjectTypeChange.newBuilder((com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 8) { + relationSubjectTypeRemovedBuilder_.mergeFrom(value); + } else { + relationSubjectTypeRemovedBuilder_.setMessage(value); + } + } + diffCase_ = 8; + return this; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + */ + public Builder clearRelationSubjectTypeRemoved() { + if (relationSubjectTypeRemovedBuilder_ == null) { + if (diffCase_ == 8) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 8) { + diffCase_ = 0; + diff_ = null; + } + relationSubjectTypeRemovedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + */ + public com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder getRelationSubjectTypeRemovedBuilder() { + return getRelationSubjectTypeRemovedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder getRelationSubjectTypeRemovedOrBuilder() { + if ((diffCase_ == 8) && (relationSubjectTypeRemovedBuilder_ != null)) { + return relationSubjectTypeRemovedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 8) { + return (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_; + } + return com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelationSubjectTypeChange, com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder, com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder> + getRelationSubjectTypeRemovedFieldBuilder() { + if (relationSubjectTypeRemovedBuilder_ == null) { + if (!(diffCase_ == 8)) { + diff_ = com.authzed.api.v1.ExpRelationSubjectTypeChange.getDefaultInstance(); + } + relationSubjectTypeRemovedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpRelationSubjectTypeChange, com.authzed.api.v1.ExpRelationSubjectTypeChange.Builder, com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder>( + (com.authzed.api.v1.ExpRelationSubjectTypeChange) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 8; + onChanged(); + return relationSubjectTypeRemovedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder> permissionAddedBuilder_; + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + * @return Whether the permissionAdded field is set. + */ + @java.lang.Override + public boolean hasPermissionAdded() { + return diffCase_ == 9; + } + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + * @return The permissionAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermission getPermissionAdded() { + if (permissionAddedBuilder_ == null) { + if (diffCase_ == 9) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } else { + if (diffCase_ == 9) { + return permissionAddedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + */ + public Builder setPermissionAdded(com.authzed.api.v1.ExpPermission value) { + if (permissionAddedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + permissionAddedBuilder_.setMessage(value); + } + diffCase_ = 9; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + */ + public Builder setPermissionAdded( + com.authzed.api.v1.ExpPermission.Builder builderForValue) { + if (permissionAddedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + permissionAddedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 9; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + */ + public Builder mergePermissionAdded(com.authzed.api.v1.ExpPermission value) { + if (permissionAddedBuilder_ == null) { + if (diffCase_ == 9 && + diff_ != com.authzed.api.v1.ExpPermission.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpPermission.newBuilder((com.authzed.api.v1.ExpPermission) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 9) { + permissionAddedBuilder_.mergeFrom(value); + } else { + permissionAddedBuilder_.setMessage(value); + } + } + diffCase_ = 9; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + */ + public Builder clearPermissionAdded() { + if (permissionAddedBuilder_ == null) { + if (diffCase_ == 9) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 9) { + diffCase_ = 0; + diff_ = null; + } + permissionAddedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + */ + public com.authzed.api.v1.ExpPermission.Builder getPermissionAddedBuilder() { + return getPermissionAddedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermissionOrBuilder getPermissionAddedOrBuilder() { + if ((diffCase_ == 9) && (permissionAddedBuilder_ != null)) { + return permissionAddedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 9) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder> + getPermissionAddedFieldBuilder() { + if (permissionAddedBuilder_ == null) { + if (!(diffCase_ == 9)) { + diff_ = com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + permissionAddedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder>( + (com.authzed.api.v1.ExpPermission) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 9; + onChanged(); + return permissionAddedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder> permissionRemovedBuilder_; + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + * @return Whether the permissionRemoved field is set. + */ + @java.lang.Override + public boolean hasPermissionRemoved() { + return diffCase_ == 10; + } + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + * @return The permissionRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermission getPermissionRemoved() { + if (permissionRemovedBuilder_ == null) { + if (diffCase_ == 10) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } else { + if (diffCase_ == 10) { + return permissionRemovedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + */ + public Builder setPermissionRemoved(com.authzed.api.v1.ExpPermission value) { + if (permissionRemovedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + permissionRemovedBuilder_.setMessage(value); + } + diffCase_ = 10; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + */ + public Builder setPermissionRemoved( + com.authzed.api.v1.ExpPermission.Builder builderForValue) { + if (permissionRemovedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + permissionRemovedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 10; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + */ + public Builder mergePermissionRemoved(com.authzed.api.v1.ExpPermission value) { + if (permissionRemovedBuilder_ == null) { + if (diffCase_ == 10 && + diff_ != com.authzed.api.v1.ExpPermission.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpPermission.newBuilder((com.authzed.api.v1.ExpPermission) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 10) { + permissionRemovedBuilder_.mergeFrom(value); + } else { + permissionRemovedBuilder_.setMessage(value); + } + } + diffCase_ = 10; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + */ + public Builder clearPermissionRemoved() { + if (permissionRemovedBuilder_ == null) { + if (diffCase_ == 10) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 10) { + diffCase_ = 0; + diff_ = null; + } + permissionRemovedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + */ + public com.authzed.api.v1.ExpPermission.Builder getPermissionRemovedBuilder() { + return getPermissionRemovedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermissionOrBuilder getPermissionRemovedOrBuilder() { + if ((diffCase_ == 10) && (permissionRemovedBuilder_ != null)) { + return permissionRemovedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 10) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder> + getPermissionRemovedFieldBuilder() { + if (permissionRemovedBuilder_ == null) { + if (!(diffCase_ == 10)) { + diff_ = com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + permissionRemovedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder>( + (com.authzed.api.v1.ExpPermission) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 10; + onChanged(); + return permissionRemovedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder> permissionDocCommentChangedBuilder_; + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + * @return Whether the permissionDocCommentChanged field is set. + */ + @java.lang.Override + public boolean hasPermissionDocCommentChanged() { + return diffCase_ == 11; + } + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + * @return The permissionDocCommentChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermission getPermissionDocCommentChanged() { + if (permissionDocCommentChangedBuilder_ == null) { + if (diffCase_ == 11) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } else { + if (diffCase_ == 11) { + return permissionDocCommentChangedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + */ + public Builder setPermissionDocCommentChanged(com.authzed.api.v1.ExpPermission value) { + if (permissionDocCommentChangedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + permissionDocCommentChangedBuilder_.setMessage(value); + } + diffCase_ = 11; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + */ + public Builder setPermissionDocCommentChanged( + com.authzed.api.v1.ExpPermission.Builder builderForValue) { + if (permissionDocCommentChangedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + permissionDocCommentChangedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 11; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + */ + public Builder mergePermissionDocCommentChanged(com.authzed.api.v1.ExpPermission value) { + if (permissionDocCommentChangedBuilder_ == null) { + if (diffCase_ == 11 && + diff_ != com.authzed.api.v1.ExpPermission.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpPermission.newBuilder((com.authzed.api.v1.ExpPermission) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 11) { + permissionDocCommentChangedBuilder_.mergeFrom(value); + } else { + permissionDocCommentChangedBuilder_.setMessage(value); + } + } + diffCase_ = 11; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + */ + public Builder clearPermissionDocCommentChanged() { + if (permissionDocCommentChangedBuilder_ == null) { + if (diffCase_ == 11) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 11) { + diffCase_ = 0; + diff_ = null; + } + permissionDocCommentChangedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + */ + public com.authzed.api.v1.ExpPermission.Builder getPermissionDocCommentChangedBuilder() { + return getPermissionDocCommentChangedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermissionOrBuilder getPermissionDocCommentChangedOrBuilder() { + if ((diffCase_ == 11) && (permissionDocCommentChangedBuilder_ != null)) { + return permissionDocCommentChangedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 11) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder> + getPermissionDocCommentChangedFieldBuilder() { + if (permissionDocCommentChangedBuilder_ == null) { + if (!(diffCase_ == 11)) { + diff_ = com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + permissionDocCommentChangedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder>( + (com.authzed.api.v1.ExpPermission) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 11; + onChanged(); + return permissionDocCommentChangedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder> permissionExprChangedBuilder_; + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + * @return Whether the permissionExprChanged field is set. + */ + @java.lang.Override + public boolean hasPermissionExprChanged() { + return diffCase_ == 12; + } + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + * @return The permissionExprChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermission getPermissionExprChanged() { + if (permissionExprChangedBuilder_ == null) { + if (diffCase_ == 12) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } else { + if (diffCase_ == 12) { + return permissionExprChangedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + */ + public Builder setPermissionExprChanged(com.authzed.api.v1.ExpPermission value) { + if (permissionExprChangedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + permissionExprChangedBuilder_.setMessage(value); + } + diffCase_ = 12; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + */ + public Builder setPermissionExprChanged( + com.authzed.api.v1.ExpPermission.Builder builderForValue) { + if (permissionExprChangedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + permissionExprChangedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 12; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + */ + public Builder mergePermissionExprChanged(com.authzed.api.v1.ExpPermission value) { + if (permissionExprChangedBuilder_ == null) { + if (diffCase_ == 12 && + diff_ != com.authzed.api.v1.ExpPermission.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpPermission.newBuilder((com.authzed.api.v1.ExpPermission) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 12) { + permissionExprChangedBuilder_.mergeFrom(value); + } else { + permissionExprChangedBuilder_.setMessage(value); + } + } + diffCase_ = 12; + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + */ + public Builder clearPermissionExprChanged() { + if (permissionExprChangedBuilder_ == null) { + if (diffCase_ == 12) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 12) { + diffCase_ = 0; + diff_ = null; + } + permissionExprChangedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + */ + public com.authzed.api.v1.ExpPermission.Builder getPermissionExprChangedBuilder() { + return getPermissionExprChangedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpPermissionOrBuilder getPermissionExprChangedOrBuilder() { + if ((diffCase_ == 12) && (permissionExprChangedBuilder_ != null)) { + return permissionExprChangedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 12) { + return (com.authzed.api.v1.ExpPermission) diff_; + } + return com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder> + getPermissionExprChangedFieldBuilder() { + if (permissionExprChangedBuilder_ == null) { + if (!(diffCase_ == 12)) { + diff_ = com.authzed.api.v1.ExpPermission.getDefaultInstance(); + } + permissionExprChangedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpPermission, com.authzed.api.v1.ExpPermission.Builder, com.authzed.api.v1.ExpPermissionOrBuilder>( + (com.authzed.api.v1.ExpPermission) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 12; + onChanged(); + return permissionExprChangedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder> caveatAddedBuilder_; + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + * @return Whether the caveatAdded field is set. + */ + @java.lang.Override + public boolean hasCaveatAdded() { + return diffCase_ == 13; + } + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + * @return The caveatAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveat getCaveatAdded() { + if (caveatAddedBuilder_ == null) { + if (diffCase_ == 13) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } else { + if (diffCase_ == 13) { + return caveatAddedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + */ + public Builder setCaveatAdded(com.authzed.api.v1.ExpCaveat value) { + if (caveatAddedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + caveatAddedBuilder_.setMessage(value); + } + diffCase_ = 13; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + */ + public Builder setCaveatAdded( + com.authzed.api.v1.ExpCaveat.Builder builderForValue) { + if (caveatAddedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + caveatAddedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 13; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + */ + public Builder mergeCaveatAdded(com.authzed.api.v1.ExpCaveat value) { + if (caveatAddedBuilder_ == null) { + if (diffCase_ == 13 && + diff_ != com.authzed.api.v1.ExpCaveat.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpCaveat.newBuilder((com.authzed.api.v1.ExpCaveat) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 13) { + caveatAddedBuilder_.mergeFrom(value); + } else { + caveatAddedBuilder_.setMessage(value); + } + } + diffCase_ = 13; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + */ + public Builder clearCaveatAdded() { + if (caveatAddedBuilder_ == null) { + if (diffCase_ == 13) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 13) { + diffCase_ = 0; + diff_ = null; + } + caveatAddedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + */ + public com.authzed.api.v1.ExpCaveat.Builder getCaveatAddedBuilder() { + return getCaveatAddedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatOrBuilder getCaveatAddedOrBuilder() { + if ((diffCase_ == 13) && (caveatAddedBuilder_ != null)) { + return caveatAddedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 13) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder> + getCaveatAddedFieldBuilder() { + if (caveatAddedBuilder_ == null) { + if (!(diffCase_ == 13)) { + diff_ = com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + caveatAddedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder>( + (com.authzed.api.v1.ExpCaveat) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 13; + onChanged(); + return caveatAddedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder> caveatRemovedBuilder_; + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + * @return Whether the caveatRemoved field is set. + */ + @java.lang.Override + public boolean hasCaveatRemoved() { + return diffCase_ == 14; + } + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + * @return The caveatRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveat getCaveatRemoved() { + if (caveatRemovedBuilder_ == null) { + if (diffCase_ == 14) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } else { + if (diffCase_ == 14) { + return caveatRemovedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + */ + public Builder setCaveatRemoved(com.authzed.api.v1.ExpCaveat value) { + if (caveatRemovedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + caveatRemovedBuilder_.setMessage(value); + } + diffCase_ = 14; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + */ + public Builder setCaveatRemoved( + com.authzed.api.v1.ExpCaveat.Builder builderForValue) { + if (caveatRemovedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + caveatRemovedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 14; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + */ + public Builder mergeCaveatRemoved(com.authzed.api.v1.ExpCaveat value) { + if (caveatRemovedBuilder_ == null) { + if (diffCase_ == 14 && + diff_ != com.authzed.api.v1.ExpCaveat.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpCaveat.newBuilder((com.authzed.api.v1.ExpCaveat) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 14) { + caveatRemovedBuilder_.mergeFrom(value); + } else { + caveatRemovedBuilder_.setMessage(value); + } + } + diffCase_ = 14; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + */ + public Builder clearCaveatRemoved() { + if (caveatRemovedBuilder_ == null) { + if (diffCase_ == 14) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 14) { + diffCase_ = 0; + diff_ = null; + } + caveatRemovedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + */ + public com.authzed.api.v1.ExpCaveat.Builder getCaveatRemovedBuilder() { + return getCaveatRemovedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatOrBuilder getCaveatRemovedOrBuilder() { + if ((diffCase_ == 14) && (caveatRemovedBuilder_ != null)) { + return caveatRemovedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 14) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder> + getCaveatRemovedFieldBuilder() { + if (caveatRemovedBuilder_ == null) { + if (!(diffCase_ == 14)) { + diff_ = com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + caveatRemovedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder>( + (com.authzed.api.v1.ExpCaveat) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 14; + onChanged(); + return caveatRemovedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder> caveatDocCommentChangedBuilder_; + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + * @return Whether the caveatDocCommentChanged field is set. + */ + @java.lang.Override + public boolean hasCaveatDocCommentChanged() { + return diffCase_ == 15; + } + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + * @return The caveatDocCommentChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveat getCaveatDocCommentChanged() { + if (caveatDocCommentChangedBuilder_ == null) { + if (diffCase_ == 15) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } else { + if (diffCase_ == 15) { + return caveatDocCommentChangedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + */ + public Builder setCaveatDocCommentChanged(com.authzed.api.v1.ExpCaveat value) { + if (caveatDocCommentChangedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + caveatDocCommentChangedBuilder_.setMessage(value); + } + diffCase_ = 15; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + */ + public Builder setCaveatDocCommentChanged( + com.authzed.api.v1.ExpCaveat.Builder builderForValue) { + if (caveatDocCommentChangedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + caveatDocCommentChangedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 15; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + */ + public Builder mergeCaveatDocCommentChanged(com.authzed.api.v1.ExpCaveat value) { + if (caveatDocCommentChangedBuilder_ == null) { + if (diffCase_ == 15 && + diff_ != com.authzed.api.v1.ExpCaveat.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpCaveat.newBuilder((com.authzed.api.v1.ExpCaveat) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 15) { + caveatDocCommentChangedBuilder_.mergeFrom(value); + } else { + caveatDocCommentChangedBuilder_.setMessage(value); + } + } + diffCase_ = 15; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + */ + public Builder clearCaveatDocCommentChanged() { + if (caveatDocCommentChangedBuilder_ == null) { + if (diffCase_ == 15) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 15) { + diffCase_ = 0; + diff_ = null; + } + caveatDocCommentChangedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + */ + public com.authzed.api.v1.ExpCaveat.Builder getCaveatDocCommentChangedBuilder() { + return getCaveatDocCommentChangedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatOrBuilder getCaveatDocCommentChangedOrBuilder() { + if ((diffCase_ == 15) && (caveatDocCommentChangedBuilder_ != null)) { + return caveatDocCommentChangedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 15) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder> + getCaveatDocCommentChangedFieldBuilder() { + if (caveatDocCommentChangedBuilder_ == null) { + if (!(diffCase_ == 15)) { + diff_ = com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + caveatDocCommentChangedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder>( + (com.authzed.api.v1.ExpCaveat) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 15; + onChanged(); + return caveatDocCommentChangedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder> caveatExprChangedBuilder_; + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + * @return Whether the caveatExprChanged field is set. + */ + @java.lang.Override + public boolean hasCaveatExprChanged() { + return diffCase_ == 16; + } + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + * @return The caveatExprChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveat getCaveatExprChanged() { + if (caveatExprChangedBuilder_ == null) { + if (diffCase_ == 16) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } else { + if (diffCase_ == 16) { + return caveatExprChangedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + */ + public Builder setCaveatExprChanged(com.authzed.api.v1.ExpCaveat value) { + if (caveatExprChangedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + caveatExprChangedBuilder_.setMessage(value); + } + diffCase_ = 16; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + */ + public Builder setCaveatExprChanged( + com.authzed.api.v1.ExpCaveat.Builder builderForValue) { + if (caveatExprChangedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + caveatExprChangedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 16; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + */ + public Builder mergeCaveatExprChanged(com.authzed.api.v1.ExpCaveat value) { + if (caveatExprChangedBuilder_ == null) { + if (diffCase_ == 16 && + diff_ != com.authzed.api.v1.ExpCaveat.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpCaveat.newBuilder((com.authzed.api.v1.ExpCaveat) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 16) { + caveatExprChangedBuilder_.mergeFrom(value); + } else { + caveatExprChangedBuilder_.setMessage(value); + } + } + diffCase_ = 16; + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + */ + public Builder clearCaveatExprChanged() { + if (caveatExprChangedBuilder_ == null) { + if (diffCase_ == 16) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 16) { + diffCase_ = 0; + diff_ = null; + } + caveatExprChangedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + */ + public com.authzed.api.v1.ExpCaveat.Builder getCaveatExprChangedBuilder() { + return getCaveatExprChangedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatOrBuilder getCaveatExprChangedOrBuilder() { + if ((diffCase_ == 16) && (caveatExprChangedBuilder_ != null)) { + return caveatExprChangedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 16) { + return (com.authzed.api.v1.ExpCaveat) diff_; + } + return com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder> + getCaveatExprChangedFieldBuilder() { + if (caveatExprChangedBuilder_ == null) { + if (!(diffCase_ == 16)) { + diff_ = com.authzed.api.v1.ExpCaveat.getDefaultInstance(); + } + caveatExprChangedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder>( + (com.authzed.api.v1.ExpCaveat) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 16; + onChanged(); + return caveatExprChangedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder> caveatParameterAddedBuilder_; + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + * @return Whether the caveatParameterAdded field is set. + */ + @java.lang.Override + public boolean hasCaveatParameterAdded() { + return diffCase_ == 17; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + * @return The caveatParameterAdded. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameter getCaveatParameterAdded() { + if (caveatParameterAddedBuilder_ == null) { + if (diffCase_ == 17) { + return (com.authzed.api.v1.ExpCaveatParameter) diff_; + } + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } else { + if (diffCase_ == 17) { + return caveatParameterAddedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + */ + public Builder setCaveatParameterAdded(com.authzed.api.v1.ExpCaveatParameter value) { + if (caveatParameterAddedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + caveatParameterAddedBuilder_.setMessage(value); + } + diffCase_ = 17; + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + */ + public Builder setCaveatParameterAdded( + com.authzed.api.v1.ExpCaveatParameter.Builder builderForValue) { + if (caveatParameterAddedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + caveatParameterAddedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 17; + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + */ + public Builder mergeCaveatParameterAdded(com.authzed.api.v1.ExpCaveatParameter value) { + if (caveatParameterAddedBuilder_ == null) { + if (diffCase_ == 17 && + diff_ != com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpCaveatParameter.newBuilder((com.authzed.api.v1.ExpCaveatParameter) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 17) { + caveatParameterAddedBuilder_.mergeFrom(value); + } else { + caveatParameterAddedBuilder_.setMessage(value); + } + } + diffCase_ = 17; + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + */ + public Builder clearCaveatParameterAdded() { + if (caveatParameterAddedBuilder_ == null) { + if (diffCase_ == 17) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 17) { + diffCase_ = 0; + diff_ = null; + } + caveatParameterAddedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + */ + public com.authzed.api.v1.ExpCaveatParameter.Builder getCaveatParameterAddedBuilder() { + return getCaveatParameterAddedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterOrBuilder getCaveatParameterAddedOrBuilder() { + if ((diffCase_ == 17) && (caveatParameterAddedBuilder_ != null)) { + return caveatParameterAddedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 17) { + return (com.authzed.api.v1.ExpCaveatParameter) diff_; + } + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder> + getCaveatParameterAddedFieldBuilder() { + if (caveatParameterAddedBuilder_ == null) { + if (!(diffCase_ == 17)) { + diff_ = com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + caveatParameterAddedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder>( + (com.authzed.api.v1.ExpCaveatParameter) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 17; + onChanged(); + return caveatParameterAddedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder> caveatParameterRemovedBuilder_; + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + * @return Whether the caveatParameterRemoved field is set. + */ + @java.lang.Override + public boolean hasCaveatParameterRemoved() { + return diffCase_ == 18; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + * @return The caveatParameterRemoved. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameter getCaveatParameterRemoved() { + if (caveatParameterRemovedBuilder_ == null) { + if (diffCase_ == 18) { + return (com.authzed.api.v1.ExpCaveatParameter) diff_; + } + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } else { + if (diffCase_ == 18) { + return caveatParameterRemovedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + */ + public Builder setCaveatParameterRemoved(com.authzed.api.v1.ExpCaveatParameter value) { + if (caveatParameterRemovedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + caveatParameterRemovedBuilder_.setMessage(value); + } + diffCase_ = 18; + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + */ + public Builder setCaveatParameterRemoved( + com.authzed.api.v1.ExpCaveatParameter.Builder builderForValue) { + if (caveatParameterRemovedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + caveatParameterRemovedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 18; + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + */ + public Builder mergeCaveatParameterRemoved(com.authzed.api.v1.ExpCaveatParameter value) { + if (caveatParameterRemovedBuilder_ == null) { + if (diffCase_ == 18 && + diff_ != com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpCaveatParameter.newBuilder((com.authzed.api.v1.ExpCaveatParameter) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 18) { + caveatParameterRemovedBuilder_.mergeFrom(value); + } else { + caveatParameterRemovedBuilder_.setMessage(value); + } + } + diffCase_ = 18; + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + */ + public Builder clearCaveatParameterRemoved() { + if (caveatParameterRemovedBuilder_ == null) { + if (diffCase_ == 18) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 18) { + diffCase_ = 0; + diff_ = null; + } + caveatParameterRemovedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + */ + public com.authzed.api.v1.ExpCaveatParameter.Builder getCaveatParameterRemovedBuilder() { + return getCaveatParameterRemovedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterOrBuilder getCaveatParameterRemovedOrBuilder() { + if ((diffCase_ == 18) && (caveatParameterRemovedBuilder_ != null)) { + return caveatParameterRemovedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 18) { + return (com.authzed.api.v1.ExpCaveatParameter) diff_; + } + return com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder> + getCaveatParameterRemovedFieldBuilder() { + if (caveatParameterRemovedBuilder_ == null) { + if (!(diffCase_ == 18)) { + diff_ = com.authzed.api.v1.ExpCaveatParameter.getDefaultInstance(); + } + caveatParameterRemovedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameter, com.authzed.api.v1.ExpCaveatParameter.Builder, com.authzed.api.v1.ExpCaveatParameterOrBuilder>( + (com.authzed.api.v1.ExpCaveatParameter) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 18; + onChanged(); + return caveatParameterRemovedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameterTypeChange, com.authzed.api.v1.ExpCaveatParameterTypeChange.Builder, com.authzed.api.v1.ExpCaveatParameterTypeChangeOrBuilder> caveatParameterTypeChangedBuilder_; + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + * @return Whether the caveatParameterTypeChanged field is set. + */ + @java.lang.Override + public boolean hasCaveatParameterTypeChanged() { + return diffCase_ == 19; + } + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + * @return The caveatParameterTypeChanged. + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterTypeChange getCaveatParameterTypeChanged() { + if (caveatParameterTypeChangedBuilder_ == null) { + if (diffCase_ == 19) { + return (com.authzed.api.v1.ExpCaveatParameterTypeChange) diff_; + } + return com.authzed.api.v1.ExpCaveatParameterTypeChange.getDefaultInstance(); + } else { + if (diffCase_ == 19) { + return caveatParameterTypeChangedBuilder_.getMessage(); + } + return com.authzed.api.v1.ExpCaveatParameterTypeChange.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + */ + public Builder setCaveatParameterTypeChanged(com.authzed.api.v1.ExpCaveatParameterTypeChange value) { + if (caveatParameterTypeChangedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diff_ = value; + onChanged(); + } else { + caveatParameterTypeChangedBuilder_.setMessage(value); + } + diffCase_ = 19; + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + */ + public Builder setCaveatParameterTypeChanged( + com.authzed.api.v1.ExpCaveatParameterTypeChange.Builder builderForValue) { + if (caveatParameterTypeChangedBuilder_ == null) { + diff_ = builderForValue.build(); + onChanged(); + } else { + caveatParameterTypeChangedBuilder_.setMessage(builderForValue.build()); + } + diffCase_ = 19; + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + */ + public Builder mergeCaveatParameterTypeChanged(com.authzed.api.v1.ExpCaveatParameterTypeChange value) { + if (caveatParameterTypeChangedBuilder_ == null) { + if (diffCase_ == 19 && + diff_ != com.authzed.api.v1.ExpCaveatParameterTypeChange.getDefaultInstance()) { + diff_ = com.authzed.api.v1.ExpCaveatParameterTypeChange.newBuilder((com.authzed.api.v1.ExpCaveatParameterTypeChange) diff_) + .mergeFrom(value).buildPartial(); + } else { + diff_ = value; + } + onChanged(); + } else { + if (diffCase_ == 19) { + caveatParameterTypeChangedBuilder_.mergeFrom(value); + } else { + caveatParameterTypeChangedBuilder_.setMessage(value); + } + } + diffCase_ = 19; + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + */ + public Builder clearCaveatParameterTypeChanged() { + if (caveatParameterTypeChangedBuilder_ == null) { + if (diffCase_ == 19) { + diffCase_ = 0; + diff_ = null; + onChanged(); + } + } else { + if (diffCase_ == 19) { + diffCase_ = 0; + diff_ = null; + } + caveatParameterTypeChangedBuilder_.clear(); + } + return this; + } + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + */ + public com.authzed.api.v1.ExpCaveatParameterTypeChange.Builder getCaveatParameterTypeChangedBuilder() { + return getCaveatParameterTypeChangedFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatParameterTypeChangeOrBuilder getCaveatParameterTypeChangedOrBuilder() { + if ((diffCase_ == 19) && (caveatParameterTypeChangedBuilder_ != null)) { + return caveatParameterTypeChangedBuilder_.getMessageOrBuilder(); + } else { + if (diffCase_ == 19) { + return (com.authzed.api.v1.ExpCaveatParameterTypeChange) diff_; + } + return com.authzed.api.v1.ExpCaveatParameterTypeChange.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameterTypeChange, com.authzed.api.v1.ExpCaveatParameterTypeChange.Builder, com.authzed.api.v1.ExpCaveatParameterTypeChangeOrBuilder> + getCaveatParameterTypeChangedFieldBuilder() { + if (caveatParameterTypeChangedBuilder_ == null) { + if (!(diffCase_ == 19)) { + diff_ = com.authzed.api.v1.ExpCaveatParameterTypeChange.getDefaultInstance(); + } + caveatParameterTypeChangedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ExpCaveatParameterTypeChange, com.authzed.api.v1.ExpCaveatParameterTypeChange.Builder, com.authzed.api.v1.ExpCaveatParameterTypeChangeOrBuilder>( + (com.authzed.api.v1.ExpCaveatParameterTypeChange) diff_, + getParentForChildren(), + isClean()); + diff_ = null; + } + diffCase_ = 19; + onChanged(); + return caveatParameterTypeChangedBuilder_; + } + @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.ExpSchemaDiff) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpSchemaDiff) + private static final com.authzed.api.v1.ExpSchemaDiff DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpSchemaDiff(); + } + + public static com.authzed.api.v1.ExpSchemaDiff getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpSchemaDiff 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.ExpSchemaDiff getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpSchemaDiffOrBuilder.java b/generated/com/authzed/api/v1/ExpSchemaDiffOrBuilder.java new file mode 100644 index 00000000..e04850ac --- /dev/null +++ b/generated/com/authzed/api/v1/ExpSchemaDiffOrBuilder.java @@ -0,0 +1,296 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpSchemaDiffOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpSchemaDiff) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + * @return Whether the definitionAdded field is set. + */ + boolean hasDefinitionAdded(); + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + * @return The definitionAdded. + */ + com.authzed.api.v1.ExpDefinition getDefinitionAdded(); + /** + * .authzed.api.v1.ExpDefinition definition_added = 1 [json_name = "definitionAdded"]; + */ + com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionAddedOrBuilder(); + + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + * @return Whether the definitionRemoved field is set. + */ + boolean hasDefinitionRemoved(); + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + * @return The definitionRemoved. + */ + com.authzed.api.v1.ExpDefinition getDefinitionRemoved(); + /** + * .authzed.api.v1.ExpDefinition definition_removed = 2 [json_name = "definitionRemoved"]; + */ + com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionRemovedOrBuilder(); + + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + * @return Whether the definitionDocCommentChanged field is set. + */ + boolean hasDefinitionDocCommentChanged(); + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + * @return The definitionDocCommentChanged. + */ + com.authzed.api.v1.ExpDefinition getDefinitionDocCommentChanged(); + /** + * .authzed.api.v1.ExpDefinition definition_doc_comment_changed = 3 [json_name = "definitionDocCommentChanged"]; + */ + com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionDocCommentChangedOrBuilder(); + + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + * @return Whether the relationAdded field is set. + */ + boolean hasRelationAdded(); + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + * @return The relationAdded. + */ + com.authzed.api.v1.ExpRelation getRelationAdded(); + /** + * .authzed.api.v1.ExpRelation relation_added = 4 [json_name = "relationAdded"]; + */ + com.authzed.api.v1.ExpRelationOrBuilder getRelationAddedOrBuilder(); + + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + * @return Whether the relationRemoved field is set. + */ + boolean hasRelationRemoved(); + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + * @return The relationRemoved. + */ + com.authzed.api.v1.ExpRelation getRelationRemoved(); + /** + * .authzed.api.v1.ExpRelation relation_removed = 5 [json_name = "relationRemoved"]; + */ + com.authzed.api.v1.ExpRelationOrBuilder getRelationRemovedOrBuilder(); + + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + * @return Whether the relationDocCommentChanged field is set. + */ + boolean hasRelationDocCommentChanged(); + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + * @return The relationDocCommentChanged. + */ + com.authzed.api.v1.ExpRelation getRelationDocCommentChanged(); + /** + * .authzed.api.v1.ExpRelation relation_doc_comment_changed = 6 [json_name = "relationDocCommentChanged"]; + */ + com.authzed.api.v1.ExpRelationOrBuilder getRelationDocCommentChangedOrBuilder(); + + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + * @return Whether the relationSubjectTypeAdded field is set. + */ + boolean hasRelationSubjectTypeAdded(); + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + * @return The relationSubjectTypeAdded. + */ + com.authzed.api.v1.ExpRelationSubjectTypeChange getRelationSubjectTypeAdded(); + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_added = 7 [json_name = "relationSubjectTypeAdded"]; + */ + com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder getRelationSubjectTypeAddedOrBuilder(); + + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + * @return Whether the relationSubjectTypeRemoved field is set. + */ + boolean hasRelationSubjectTypeRemoved(); + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + * @return The relationSubjectTypeRemoved. + */ + com.authzed.api.v1.ExpRelationSubjectTypeChange getRelationSubjectTypeRemoved(); + /** + * .authzed.api.v1.ExpRelationSubjectTypeChange relation_subject_type_removed = 8 [json_name = "relationSubjectTypeRemoved"]; + */ + com.authzed.api.v1.ExpRelationSubjectTypeChangeOrBuilder getRelationSubjectTypeRemovedOrBuilder(); + + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + * @return Whether the permissionAdded field is set. + */ + boolean hasPermissionAdded(); + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + * @return The permissionAdded. + */ + com.authzed.api.v1.ExpPermission getPermissionAdded(); + /** + * .authzed.api.v1.ExpPermission permission_added = 9 [json_name = "permissionAdded"]; + */ + com.authzed.api.v1.ExpPermissionOrBuilder getPermissionAddedOrBuilder(); + + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + * @return Whether the permissionRemoved field is set. + */ + boolean hasPermissionRemoved(); + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + * @return The permissionRemoved. + */ + com.authzed.api.v1.ExpPermission getPermissionRemoved(); + /** + * .authzed.api.v1.ExpPermission permission_removed = 10 [json_name = "permissionRemoved"]; + */ + com.authzed.api.v1.ExpPermissionOrBuilder getPermissionRemovedOrBuilder(); + + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + * @return Whether the permissionDocCommentChanged field is set. + */ + boolean hasPermissionDocCommentChanged(); + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + * @return The permissionDocCommentChanged. + */ + com.authzed.api.v1.ExpPermission getPermissionDocCommentChanged(); + /** + * .authzed.api.v1.ExpPermission permission_doc_comment_changed = 11 [json_name = "permissionDocCommentChanged"]; + */ + com.authzed.api.v1.ExpPermissionOrBuilder getPermissionDocCommentChangedOrBuilder(); + + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + * @return Whether the permissionExprChanged field is set. + */ + boolean hasPermissionExprChanged(); + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + * @return The permissionExprChanged. + */ + com.authzed.api.v1.ExpPermission getPermissionExprChanged(); + /** + * .authzed.api.v1.ExpPermission permission_expr_changed = 12 [json_name = "permissionExprChanged"]; + */ + com.authzed.api.v1.ExpPermissionOrBuilder getPermissionExprChangedOrBuilder(); + + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + * @return Whether the caveatAdded field is set. + */ + boolean hasCaveatAdded(); + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + * @return The caveatAdded. + */ + com.authzed.api.v1.ExpCaveat getCaveatAdded(); + /** + * .authzed.api.v1.ExpCaveat caveat_added = 13 [json_name = "caveatAdded"]; + */ + com.authzed.api.v1.ExpCaveatOrBuilder getCaveatAddedOrBuilder(); + + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + * @return Whether the caveatRemoved field is set. + */ + boolean hasCaveatRemoved(); + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + * @return The caveatRemoved. + */ + com.authzed.api.v1.ExpCaveat getCaveatRemoved(); + /** + * .authzed.api.v1.ExpCaveat caveat_removed = 14 [json_name = "caveatRemoved"]; + */ + com.authzed.api.v1.ExpCaveatOrBuilder getCaveatRemovedOrBuilder(); + + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + * @return Whether the caveatDocCommentChanged field is set. + */ + boolean hasCaveatDocCommentChanged(); + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + * @return The caveatDocCommentChanged. + */ + com.authzed.api.v1.ExpCaveat getCaveatDocCommentChanged(); + /** + * .authzed.api.v1.ExpCaveat caveat_doc_comment_changed = 15 [json_name = "caveatDocCommentChanged"]; + */ + com.authzed.api.v1.ExpCaveatOrBuilder getCaveatDocCommentChangedOrBuilder(); + + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + * @return Whether the caveatExprChanged field is set. + */ + boolean hasCaveatExprChanged(); + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + * @return The caveatExprChanged. + */ + com.authzed.api.v1.ExpCaveat getCaveatExprChanged(); + /** + * .authzed.api.v1.ExpCaveat caveat_expr_changed = 16 [json_name = "caveatExprChanged"]; + */ + com.authzed.api.v1.ExpCaveatOrBuilder getCaveatExprChangedOrBuilder(); + + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + * @return Whether the caveatParameterAdded field is set. + */ + boolean hasCaveatParameterAdded(); + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + * @return The caveatParameterAdded. + */ + com.authzed.api.v1.ExpCaveatParameter getCaveatParameterAdded(); + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_added = 17 [json_name = "caveatParameterAdded"]; + */ + com.authzed.api.v1.ExpCaveatParameterOrBuilder getCaveatParameterAddedOrBuilder(); + + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + * @return Whether the caveatParameterRemoved field is set. + */ + boolean hasCaveatParameterRemoved(); + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + * @return The caveatParameterRemoved. + */ + com.authzed.api.v1.ExpCaveatParameter getCaveatParameterRemoved(); + /** + * .authzed.api.v1.ExpCaveatParameter caveat_parameter_removed = 18 [json_name = "caveatParameterRemoved"]; + */ + com.authzed.api.v1.ExpCaveatParameterOrBuilder getCaveatParameterRemovedOrBuilder(); + + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + * @return Whether the caveatParameterTypeChanged field is set. + */ + boolean hasCaveatParameterTypeChanged(); + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + * @return The caveatParameterTypeChanged. + */ + com.authzed.api.v1.ExpCaveatParameterTypeChange getCaveatParameterTypeChanged(); + /** + * .authzed.api.v1.ExpCaveatParameterTypeChange caveat_parameter_type_changed = 19 [json_name = "caveatParameterTypeChanged"]; + */ + com.authzed.api.v1.ExpCaveatParameterTypeChangeOrBuilder getCaveatParameterTypeChangedOrBuilder(); + + public com.authzed.api.v1.ExpSchemaDiff.DiffCase getDiffCase(); +} diff --git a/generated/com/authzed/api/v1/ExpSchemaFilter.java b/generated/com/authzed/api/v1/ExpSchemaFilter.java new file mode 100644 index 00000000..17453c7c --- /dev/null +++ b/generated/com/authzed/api/v1/ExpSchemaFilter.java @@ -0,0 +1,1072 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ExpSchemaFilter is a filter that can be applied to the schema on reflection.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ExpSchemaFilter} + */ +public final class ExpSchemaFilter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpSchemaFilter) + ExpSchemaFilterOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpSchemaFilter.newBuilder() to construct. + private ExpSchemaFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpSchemaFilter() { + optionalDefinitionNameFilter_ = ""; + optionalCaveatNameFilter_ = ""; + optionalRelationNameFilter_ = ""; + optionalPermissionNameFilter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpSchemaFilter(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpSchemaFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpSchemaFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpSchemaFilter.class, com.authzed.api.v1.ExpSchemaFilter.Builder.class); + } + + public static final int OPTIONAL_DEFINITION_NAME_FILTER_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalDefinitionNameFilter_ = ""; + /** + *
+   * optional_definition_name_filter is a prefix that is matched against the definition name.
+   * 
+ * + * string optional_definition_name_filter = 1 [json_name = "optionalDefinitionNameFilter"]; + * @return The optionalDefinitionNameFilter. + */ + @java.lang.Override + public java.lang.String getOptionalDefinitionNameFilter() { + java.lang.Object ref = optionalDefinitionNameFilter_; + 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(); + optionalDefinitionNameFilter_ = s; + return s; + } + } + /** + *
+   * optional_definition_name_filter is a prefix that is matched against the definition name.
+   * 
+ * + * string optional_definition_name_filter = 1 [json_name = "optionalDefinitionNameFilter"]; + * @return The bytes for optionalDefinitionNameFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalDefinitionNameFilterBytes() { + java.lang.Object ref = optionalDefinitionNameFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalDefinitionNameFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_CAVEAT_NAME_FILTER_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalCaveatNameFilter_ = ""; + /** + *
+   * optional_caveat_name_filter is a prefix that is matched against the caveat name.
+   * 
+ * + * string optional_caveat_name_filter = 2 [json_name = "optionalCaveatNameFilter"]; + * @return The optionalCaveatNameFilter. + */ + @java.lang.Override + public java.lang.String getOptionalCaveatNameFilter() { + java.lang.Object ref = optionalCaveatNameFilter_; + 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(); + optionalCaveatNameFilter_ = s; + return s; + } + } + /** + *
+   * optional_caveat_name_filter is a prefix that is matched against the caveat name.
+   * 
+ * + * string optional_caveat_name_filter = 2 [json_name = "optionalCaveatNameFilter"]; + * @return The bytes for optionalCaveatNameFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalCaveatNameFilterBytes() { + java.lang.Object ref = optionalCaveatNameFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalCaveatNameFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_RELATION_NAME_FILTER_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalRelationNameFilter_ = ""; + /** + *
+   * optional_relation_name_filter is a prefix that is matched against the relation name.
+   * 
+ * + * string optional_relation_name_filter = 3 [json_name = "optionalRelationNameFilter"]; + * @return The optionalRelationNameFilter. + */ + @java.lang.Override + public java.lang.String getOptionalRelationNameFilter() { + java.lang.Object ref = optionalRelationNameFilter_; + 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(); + optionalRelationNameFilter_ = s; + return s; + } + } + /** + *
+   * optional_relation_name_filter is a prefix that is matched against the relation name.
+   * 
+ * + * string optional_relation_name_filter = 3 [json_name = "optionalRelationNameFilter"]; + * @return The bytes for optionalRelationNameFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalRelationNameFilterBytes() { + java.lang.Object ref = optionalRelationNameFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalRelationNameFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_PERMISSION_NAME_FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalPermissionNameFilter_ = ""; + /** + *
+   * optional_permission_name_filter is a prefix that is matched against the permission name.
+   * 
+ * + * string optional_permission_name_filter = 4 [json_name = "optionalPermissionNameFilter"]; + * @return The optionalPermissionNameFilter. + */ + @java.lang.Override + public java.lang.String getOptionalPermissionNameFilter() { + java.lang.Object ref = optionalPermissionNameFilter_; + 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(); + optionalPermissionNameFilter_ = s; + return s; + } + } + /** + *
+   * optional_permission_name_filter is a prefix that is matched against the permission name.
+   * 
+ * + * string optional_permission_name_filter = 4 [json_name = "optionalPermissionNameFilter"]; + * @return The bytes for optionalPermissionNameFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalPermissionNameFilterBytes() { + java.lang.Object ref = optionalPermissionNameFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalPermissionNameFilter_ = 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(optionalDefinitionNameFilter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, optionalDefinitionNameFilter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalCaveatNameFilter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, optionalCaveatNameFilter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalRelationNameFilter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, optionalRelationNameFilter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalPermissionNameFilter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, optionalPermissionNameFilter_); + } + 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(optionalDefinitionNameFilter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, optionalDefinitionNameFilter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalCaveatNameFilter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, optionalCaveatNameFilter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalRelationNameFilter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, optionalRelationNameFilter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalPermissionNameFilter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, optionalPermissionNameFilter_); + } + 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.ExpSchemaFilter)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpSchemaFilter other = (com.authzed.api.v1.ExpSchemaFilter) obj; + + if (!getOptionalDefinitionNameFilter() + .equals(other.getOptionalDefinitionNameFilter())) return false; + if (!getOptionalCaveatNameFilter() + .equals(other.getOptionalCaveatNameFilter())) return false; + if (!getOptionalRelationNameFilter() + .equals(other.getOptionalRelationNameFilter())) return false; + if (!getOptionalPermissionNameFilter() + .equals(other.getOptionalPermissionNameFilter())) 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) + OPTIONAL_DEFINITION_NAME_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getOptionalDefinitionNameFilter().hashCode(); + hash = (37 * hash) + OPTIONAL_CAVEAT_NAME_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getOptionalCaveatNameFilter().hashCode(); + hash = (37 * hash) + OPTIONAL_RELATION_NAME_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getOptionalRelationNameFilter().hashCode(); + hash = (37 * hash) + OPTIONAL_PERMISSION_NAME_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getOptionalPermissionNameFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpSchemaFilter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpSchemaFilter 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.ExpSchemaFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpSchemaFilter 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.ExpSchemaFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpSchemaFilter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpSchemaFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpSchemaFilter 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.ExpSchemaFilter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpSchemaFilter 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.ExpSchemaFilter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpSchemaFilter 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.ExpSchemaFilter 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; + } + /** + *
+   * ExpSchemaFilter is a filter that can be applied to the schema on reflection.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ExpSchemaFilter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpSchemaFilter) + com.authzed.api.v1.ExpSchemaFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpSchemaFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpSchemaFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpSchemaFilter.class, com.authzed.api.v1.ExpSchemaFilter.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpSchemaFilter.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + optionalDefinitionNameFilter_ = ""; + optionalCaveatNameFilter_ = ""; + optionalRelationNameFilter_ = ""; + optionalPermissionNameFilter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpSchemaFilter_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpSchemaFilter getDefaultInstanceForType() { + return com.authzed.api.v1.ExpSchemaFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpSchemaFilter build() { + com.authzed.api.v1.ExpSchemaFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpSchemaFilter buildPartial() { + com.authzed.api.v1.ExpSchemaFilter result = new com.authzed.api.v1.ExpSchemaFilter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExpSchemaFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.optionalDefinitionNameFilter_ = optionalDefinitionNameFilter_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optionalCaveatNameFilter_ = optionalCaveatNameFilter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.optionalRelationNameFilter_ = optionalRelationNameFilter_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.optionalPermissionNameFilter_ = optionalPermissionNameFilter_; + } + } + + @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.ExpSchemaFilter) { + return mergeFrom((com.authzed.api.v1.ExpSchemaFilter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpSchemaFilter other) { + if (other == com.authzed.api.v1.ExpSchemaFilter.getDefaultInstance()) return this; + if (!other.getOptionalDefinitionNameFilter().isEmpty()) { + optionalDefinitionNameFilter_ = other.optionalDefinitionNameFilter_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOptionalCaveatNameFilter().isEmpty()) { + optionalCaveatNameFilter_ = other.optionalCaveatNameFilter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOptionalRelationNameFilter().isEmpty()) { + optionalRelationNameFilter_ = other.optionalRelationNameFilter_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOptionalPermissionNameFilter().isEmpty()) { + optionalPermissionNameFilter_ = other.optionalPermissionNameFilter_; + bitField0_ |= 0x00000008; + 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: { + optionalDefinitionNameFilter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + optionalCaveatNameFilter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + optionalRelationNameFilter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + optionalPermissionNameFilter_ = 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 bitField0_; + + private java.lang.Object optionalDefinitionNameFilter_ = ""; + /** + *
+     * optional_definition_name_filter is a prefix that is matched against the definition name.
+     * 
+ * + * string optional_definition_name_filter = 1 [json_name = "optionalDefinitionNameFilter"]; + * @return The optionalDefinitionNameFilter. + */ + public java.lang.String getOptionalDefinitionNameFilter() { + java.lang.Object ref = optionalDefinitionNameFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalDefinitionNameFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_definition_name_filter is a prefix that is matched against the definition name.
+     * 
+ * + * string optional_definition_name_filter = 1 [json_name = "optionalDefinitionNameFilter"]; + * @return The bytes for optionalDefinitionNameFilter. + */ + public com.google.protobuf.ByteString + getOptionalDefinitionNameFilterBytes() { + java.lang.Object ref = optionalDefinitionNameFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalDefinitionNameFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_definition_name_filter is a prefix that is matched against the definition name.
+     * 
+ * + * string optional_definition_name_filter = 1 [json_name = "optionalDefinitionNameFilter"]; + * @param value The optionalDefinitionNameFilter to set. + * @return This builder for chaining. + */ + public Builder setOptionalDefinitionNameFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalDefinitionNameFilter_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * optional_definition_name_filter is a prefix that is matched against the definition name.
+     * 
+ * + * string optional_definition_name_filter = 1 [json_name = "optionalDefinitionNameFilter"]; + * @return This builder for chaining. + */ + public Builder clearOptionalDefinitionNameFilter() { + optionalDefinitionNameFilter_ = getDefaultInstance().getOptionalDefinitionNameFilter(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * optional_definition_name_filter is a prefix that is matched against the definition name.
+     * 
+ * + * string optional_definition_name_filter = 1 [json_name = "optionalDefinitionNameFilter"]; + * @param value The bytes for optionalDefinitionNameFilter to set. + * @return This builder for chaining. + */ + public Builder setOptionalDefinitionNameFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalDefinitionNameFilter_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object optionalCaveatNameFilter_ = ""; + /** + *
+     * optional_caveat_name_filter is a prefix that is matched against the caveat name.
+     * 
+ * + * string optional_caveat_name_filter = 2 [json_name = "optionalCaveatNameFilter"]; + * @return The optionalCaveatNameFilter. + */ + public java.lang.String getOptionalCaveatNameFilter() { + java.lang.Object ref = optionalCaveatNameFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalCaveatNameFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_caveat_name_filter is a prefix that is matched against the caveat name.
+     * 
+ * + * string optional_caveat_name_filter = 2 [json_name = "optionalCaveatNameFilter"]; + * @return The bytes for optionalCaveatNameFilter. + */ + public com.google.protobuf.ByteString + getOptionalCaveatNameFilterBytes() { + java.lang.Object ref = optionalCaveatNameFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalCaveatNameFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_caveat_name_filter is a prefix that is matched against the caveat name.
+     * 
+ * + * string optional_caveat_name_filter = 2 [json_name = "optionalCaveatNameFilter"]; + * @param value The optionalCaveatNameFilter to set. + * @return This builder for chaining. + */ + public Builder setOptionalCaveatNameFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalCaveatNameFilter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_caveat_name_filter is a prefix that is matched against the caveat name.
+     * 
+ * + * string optional_caveat_name_filter = 2 [json_name = "optionalCaveatNameFilter"]; + * @return This builder for chaining. + */ + public Builder clearOptionalCaveatNameFilter() { + optionalCaveatNameFilter_ = getDefaultInstance().getOptionalCaveatNameFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * optional_caveat_name_filter is a prefix that is matched against the caveat name.
+     * 
+ * + * string optional_caveat_name_filter = 2 [json_name = "optionalCaveatNameFilter"]; + * @param value The bytes for optionalCaveatNameFilter to set. + * @return This builder for chaining. + */ + public Builder setOptionalCaveatNameFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalCaveatNameFilter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object optionalRelationNameFilter_ = ""; + /** + *
+     * optional_relation_name_filter is a prefix that is matched against the relation name.
+     * 
+ * + * string optional_relation_name_filter = 3 [json_name = "optionalRelationNameFilter"]; + * @return The optionalRelationNameFilter. + */ + public java.lang.String getOptionalRelationNameFilter() { + java.lang.Object ref = optionalRelationNameFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalRelationNameFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_relation_name_filter is a prefix that is matched against the relation name.
+     * 
+ * + * string optional_relation_name_filter = 3 [json_name = "optionalRelationNameFilter"]; + * @return The bytes for optionalRelationNameFilter. + */ + public com.google.protobuf.ByteString + getOptionalRelationNameFilterBytes() { + java.lang.Object ref = optionalRelationNameFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalRelationNameFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_relation_name_filter is a prefix that is matched against the relation name.
+     * 
+ * + * string optional_relation_name_filter = 3 [json_name = "optionalRelationNameFilter"]; + * @param value The optionalRelationNameFilter to set. + * @return This builder for chaining. + */ + public Builder setOptionalRelationNameFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalRelationNameFilter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_relation_name_filter is a prefix that is matched against the relation name.
+     * 
+ * + * string optional_relation_name_filter = 3 [json_name = "optionalRelationNameFilter"]; + * @return This builder for chaining. + */ + public Builder clearOptionalRelationNameFilter() { + optionalRelationNameFilter_ = getDefaultInstance().getOptionalRelationNameFilter(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * optional_relation_name_filter is a prefix that is matched against the relation name.
+     * 
+ * + * string optional_relation_name_filter = 3 [json_name = "optionalRelationNameFilter"]; + * @param value The bytes for optionalRelationNameFilter to set. + * @return This builder for chaining. + */ + public Builder setOptionalRelationNameFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalRelationNameFilter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object optionalPermissionNameFilter_ = ""; + /** + *
+     * optional_permission_name_filter is a prefix that is matched against the permission name.
+     * 
+ * + * string optional_permission_name_filter = 4 [json_name = "optionalPermissionNameFilter"]; + * @return The optionalPermissionNameFilter. + */ + public java.lang.String getOptionalPermissionNameFilter() { + java.lang.Object ref = optionalPermissionNameFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalPermissionNameFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_permission_name_filter is a prefix that is matched against the permission name.
+     * 
+ * + * string optional_permission_name_filter = 4 [json_name = "optionalPermissionNameFilter"]; + * @return The bytes for optionalPermissionNameFilter. + */ + public com.google.protobuf.ByteString + getOptionalPermissionNameFilterBytes() { + java.lang.Object ref = optionalPermissionNameFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalPermissionNameFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_permission_name_filter is a prefix that is matched against the permission name.
+     * 
+ * + * string optional_permission_name_filter = 4 [json_name = "optionalPermissionNameFilter"]; + * @param value The optionalPermissionNameFilter to set. + * @return This builder for chaining. + */ + public Builder setOptionalPermissionNameFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalPermissionNameFilter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * optional_permission_name_filter is a prefix that is matched against the permission name.
+     * 
+ * + * string optional_permission_name_filter = 4 [json_name = "optionalPermissionNameFilter"]; + * @return This builder for chaining. + */ + public Builder clearOptionalPermissionNameFilter() { + optionalPermissionNameFilter_ = getDefaultInstance().getOptionalPermissionNameFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * optional_permission_name_filter is a prefix that is matched against the permission name.
+     * 
+ * + * string optional_permission_name_filter = 4 [json_name = "optionalPermissionNameFilter"]; + * @param value The bytes for optionalPermissionNameFilter to set. + * @return This builder for chaining. + */ + public Builder setOptionalPermissionNameFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalPermissionNameFilter_ = 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.ExpSchemaFilter) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpSchemaFilter) + private static final com.authzed.api.v1.ExpSchemaFilter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpSchemaFilter(); + } + + public static com.authzed.api.v1.ExpSchemaFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpSchemaFilter 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.ExpSchemaFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpSchemaFilterOrBuilder.java b/generated/com/authzed/api/v1/ExpSchemaFilterOrBuilder.java new file mode 100644 index 00000000..5b1086b9 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpSchemaFilterOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpSchemaFilterOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpSchemaFilter) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * optional_definition_name_filter is a prefix that is matched against the definition name.
+   * 
+ * + * string optional_definition_name_filter = 1 [json_name = "optionalDefinitionNameFilter"]; + * @return The optionalDefinitionNameFilter. + */ + java.lang.String getOptionalDefinitionNameFilter(); + /** + *
+   * optional_definition_name_filter is a prefix that is matched against the definition name.
+   * 
+ * + * string optional_definition_name_filter = 1 [json_name = "optionalDefinitionNameFilter"]; + * @return The bytes for optionalDefinitionNameFilter. + */ + com.google.protobuf.ByteString + getOptionalDefinitionNameFilterBytes(); + + /** + *
+   * optional_caveat_name_filter is a prefix that is matched against the caveat name.
+   * 
+ * + * string optional_caveat_name_filter = 2 [json_name = "optionalCaveatNameFilter"]; + * @return The optionalCaveatNameFilter. + */ + java.lang.String getOptionalCaveatNameFilter(); + /** + *
+   * optional_caveat_name_filter is a prefix that is matched against the caveat name.
+   * 
+ * + * string optional_caveat_name_filter = 2 [json_name = "optionalCaveatNameFilter"]; + * @return The bytes for optionalCaveatNameFilter. + */ + com.google.protobuf.ByteString + getOptionalCaveatNameFilterBytes(); + + /** + *
+   * optional_relation_name_filter is a prefix that is matched against the relation name.
+   * 
+ * + * string optional_relation_name_filter = 3 [json_name = "optionalRelationNameFilter"]; + * @return The optionalRelationNameFilter. + */ + java.lang.String getOptionalRelationNameFilter(); + /** + *
+   * optional_relation_name_filter is a prefix that is matched against the relation name.
+   * 
+ * + * string optional_relation_name_filter = 3 [json_name = "optionalRelationNameFilter"]; + * @return The bytes for optionalRelationNameFilter. + */ + com.google.protobuf.ByteString + getOptionalRelationNameFilterBytes(); + + /** + *
+   * optional_permission_name_filter is a prefix that is matched against the permission name.
+   * 
+ * + * string optional_permission_name_filter = 4 [json_name = "optionalPermissionNameFilter"]; + * @return The optionalPermissionNameFilter. + */ + java.lang.String getOptionalPermissionNameFilter(); + /** + *
+   * optional_permission_name_filter is a prefix that is matched against the permission name.
+   * 
+ * + * string optional_permission_name_filter = 4 [json_name = "optionalPermissionNameFilter"]; + * @return The bytes for optionalPermissionNameFilter. + */ + com.google.protobuf.ByteString + getOptionalPermissionNameFilterBytes(); +} diff --git a/generated/com/authzed/api/v1/ExpTypeReference.java b/generated/com/authzed/api/v1/ExpTypeReference.java new file mode 100644 index 00000000..ed7f4978 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpTypeReference.java @@ -0,0 +1,1259 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ExpTypeReference is the representation of a type reference in the schema.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ExpTypeReference} + */ +public final class ExpTypeReference extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpTypeReference) + ExpTypeReferenceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpTypeReference.newBuilder() to construct. + private ExpTypeReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpTypeReference() { + subjectDefinitionName_ = ""; + optionalCaveatName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpTypeReference(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpTypeReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpTypeReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpTypeReference.class, com.authzed.api.v1.ExpTypeReference.Builder.class); + } + + private int typerefCase_ = 0; + private java.lang.Object typeref_; + public enum TyperefCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IS_TERMINAL_SUBJECT(3), + OPTIONAL_RELATION_NAME(4), + IS_PUBLIC_WILDCARD(5), + TYPEREF_NOT_SET(0); + private final int value; + private TyperefCase(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 TyperefCase valueOf(int value) { + return forNumber(value); + } + + public static TyperefCase forNumber(int value) { + switch (value) { + case 3: return IS_TERMINAL_SUBJECT; + case 4: return OPTIONAL_RELATION_NAME; + case 5: return IS_PUBLIC_WILDCARD; + case 0: return TYPEREF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TyperefCase + getTyperefCase() { + return TyperefCase.forNumber( + typerefCase_); + } + + public static final int SUBJECT_DEFINITION_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object subjectDefinitionName_ = ""; + /** + *
+   * subject_definition_name is the name of the subject's definition.
+   * 
+ * + * string subject_definition_name = 1 [json_name = "subjectDefinitionName"]; + * @return The subjectDefinitionName. + */ + @java.lang.Override + public java.lang.String getSubjectDefinitionName() { + java.lang.Object ref = subjectDefinitionName_; + 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(); + subjectDefinitionName_ = s; + return s; + } + } + /** + *
+   * subject_definition_name is the name of the subject's definition.
+   * 
+ * + * string subject_definition_name = 1 [json_name = "subjectDefinitionName"]; + * @return The bytes for subjectDefinitionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectDefinitionNameBytes() { + java.lang.Object ref = subjectDefinitionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectDefinitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_CAVEAT_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalCaveatName_ = ""; + /** + *
+   * optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+   * 
+ * + * string optional_caveat_name = 2 [json_name = "optionalCaveatName"]; + * @return The optionalCaveatName. + */ + @java.lang.Override + public java.lang.String getOptionalCaveatName() { + java.lang.Object ref = optionalCaveatName_; + 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(); + optionalCaveatName_ = s; + return s; + } + } + /** + *
+   * optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+   * 
+ * + * string optional_caveat_name = 2 [json_name = "optionalCaveatName"]; + * @return The bytes for optionalCaveatName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalCaveatNameBytes() { + java.lang.Object ref = optionalCaveatName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalCaveatName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_TERMINAL_SUBJECT_FIELD_NUMBER = 3; + /** + *
+   * is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
+   * 
+ * + * bool is_terminal_subject = 3 [json_name = "isTerminalSubject"]; + * @return Whether the isTerminalSubject field is set. + */ + @java.lang.Override + public boolean hasIsTerminalSubject() { + return typerefCase_ == 3; + } + /** + *
+   * is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
+   * 
+ * + * bool is_terminal_subject = 3 [json_name = "isTerminalSubject"]; + * @return The isTerminalSubject. + */ + @java.lang.Override + public boolean getIsTerminalSubject() { + if (typerefCase_ == 3) { + return (java.lang.Boolean) typeref_; + } + return false; + } + + public static final int OPTIONAL_RELATION_NAME_FIELD_NUMBER = 4; + /** + *
+   * optional_relation_name is the name of the relation that is applied to the subject, if any.
+   * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @return Whether the optionalRelationName field is set. + */ + public boolean hasOptionalRelationName() { + return typerefCase_ == 4; + } + /** + *
+   * optional_relation_name is the name of the relation that is applied to the subject, if any.
+   * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @return The optionalRelationName. + */ + public java.lang.String getOptionalRelationName() { + java.lang.Object ref = ""; + if (typerefCase_ == 4) { + ref = typeref_; + } + 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(); + if (typerefCase_ == 4) { + typeref_ = s; + } + return s; + } + } + /** + *
+   * optional_relation_name is the name of the relation that is applied to the subject, if any.
+   * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @return The bytes for optionalRelationName. + */ + public com.google.protobuf.ByteString + getOptionalRelationNameBytes() { + java.lang.Object ref = ""; + if (typerefCase_ == 4) { + ref = typeref_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (typerefCase_ == 4) { + typeref_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_PUBLIC_WILDCARD_FIELD_NUMBER = 5; + /** + *
+   * is_public_wildcard is true if the subject is a public wildcard.
+   * 
+ * + * bool is_public_wildcard = 5 [json_name = "isPublicWildcard"]; + * @return Whether the isPublicWildcard field is set. + */ + @java.lang.Override + public boolean hasIsPublicWildcard() { + return typerefCase_ == 5; + } + /** + *
+   * is_public_wildcard is true if the subject is a public wildcard.
+   * 
+ * + * bool is_public_wildcard = 5 [json_name = "isPublicWildcard"]; + * @return The isPublicWildcard. + */ + @java.lang.Override + public boolean getIsPublicWildcard() { + if (typerefCase_ == 5) { + return (java.lang.Boolean) typeref_; + } + return false; + } + + 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(subjectDefinitionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subjectDefinitionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalCaveatName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, optionalCaveatName_); + } + if (typerefCase_ == 3) { + output.writeBool( + 3, (boolean)((java.lang.Boolean) typeref_)); + } + if (typerefCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, typeref_); + } + if (typerefCase_ == 5) { + output.writeBool( + 5, (boolean)((java.lang.Boolean) typeref_)); + } + 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(subjectDefinitionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subjectDefinitionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalCaveatName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, optionalCaveatName_); + } + if (typerefCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 3, (boolean)((java.lang.Boolean) typeref_)); + } + if (typerefCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, typeref_); + } + if (typerefCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 5, (boolean)((java.lang.Boolean) typeref_)); + } + 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.ExpTypeReference)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpTypeReference other = (com.authzed.api.v1.ExpTypeReference) obj; + + if (!getSubjectDefinitionName() + .equals(other.getSubjectDefinitionName())) return false; + if (!getOptionalCaveatName() + .equals(other.getOptionalCaveatName())) return false; + if (!getTyperefCase().equals(other.getTyperefCase())) return false; + switch (typerefCase_) { + case 3: + if (getIsTerminalSubject() + != other.getIsTerminalSubject()) return false; + break; + case 4: + if (!getOptionalRelationName() + .equals(other.getOptionalRelationName())) return false; + break; + case 5: + if (getIsPublicWildcard() + != other.getIsPublicWildcard()) 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(); + hash = (37 * hash) + SUBJECT_DEFINITION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSubjectDefinitionName().hashCode(); + hash = (37 * hash) + OPTIONAL_CAVEAT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOptionalCaveatName().hashCode(); + switch (typerefCase_) { + case 3: + hash = (37 * hash) + IS_TERMINAL_SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsTerminalSubject()); + break; + case 4: + hash = (37 * hash) + OPTIONAL_RELATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOptionalRelationName().hashCode(); + break; + case 5: + hash = (37 * hash) + IS_PUBLIC_WILDCARD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsPublicWildcard()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpTypeReference parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpTypeReference 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.ExpTypeReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpTypeReference 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.ExpTypeReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpTypeReference parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpTypeReference parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpTypeReference 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.ExpTypeReference parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpTypeReference 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.ExpTypeReference parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpTypeReference 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.ExpTypeReference 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; + } + /** + *
+   * ExpTypeReference is the representation of a type reference in the schema.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ExpTypeReference} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpTypeReference) + com.authzed.api.v1.ExpTypeReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpTypeReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpTypeReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpTypeReference.class, com.authzed.api.v1.ExpTypeReference.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpTypeReference.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectDefinitionName_ = ""; + optionalCaveatName_ = ""; + typerefCase_ = 0; + typeref_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExpTypeReference_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpTypeReference getDefaultInstanceForType() { + return com.authzed.api.v1.ExpTypeReference.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpTypeReference build() { + com.authzed.api.v1.ExpTypeReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpTypeReference buildPartial() { + com.authzed.api.v1.ExpTypeReference result = new com.authzed.api.v1.ExpTypeReference(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExpTypeReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectDefinitionName_ = subjectDefinitionName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optionalCaveatName_ = optionalCaveatName_; + } + } + + private void buildPartialOneofs(com.authzed.api.v1.ExpTypeReference result) { + result.typerefCase_ = typerefCase_; + result.typeref_ = this.typeref_; + } + + @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.ExpTypeReference) { + return mergeFrom((com.authzed.api.v1.ExpTypeReference)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpTypeReference other) { + if (other == com.authzed.api.v1.ExpTypeReference.getDefaultInstance()) return this; + if (!other.getSubjectDefinitionName().isEmpty()) { + subjectDefinitionName_ = other.subjectDefinitionName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOptionalCaveatName().isEmpty()) { + optionalCaveatName_ = other.optionalCaveatName_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getTyperefCase()) { + case IS_TERMINAL_SUBJECT: { + setIsTerminalSubject(other.getIsTerminalSubject()); + break; + } + case OPTIONAL_RELATION_NAME: { + typerefCase_ = 4; + typeref_ = other.typeref_; + onChanged(); + break; + } + case IS_PUBLIC_WILDCARD: { + setIsPublicWildcard(other.getIsPublicWildcard()); + break; + } + case TYPEREF_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: { + subjectDefinitionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + optionalCaveatName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + typeref_ = input.readBool(); + typerefCase_ = 3; + break; + } // case 24 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + typerefCase_ = 4; + typeref_ = s; + break; + } // case 34 + case 40: { + typeref_ = input.readBool(); + typerefCase_ = 5; + break; + } // case 40 + 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 typerefCase_ = 0; + private java.lang.Object typeref_; + public TyperefCase + getTyperefCase() { + return TyperefCase.forNumber( + typerefCase_); + } + + public Builder clearTyperef() { + typerefCase_ = 0; + typeref_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object subjectDefinitionName_ = ""; + /** + *
+     * subject_definition_name is the name of the subject's definition.
+     * 
+ * + * string subject_definition_name = 1 [json_name = "subjectDefinitionName"]; + * @return The subjectDefinitionName. + */ + public java.lang.String getSubjectDefinitionName() { + java.lang.Object ref = subjectDefinitionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectDefinitionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * subject_definition_name is the name of the subject's definition.
+     * 
+ * + * string subject_definition_name = 1 [json_name = "subjectDefinitionName"]; + * @return The bytes for subjectDefinitionName. + */ + public com.google.protobuf.ByteString + getSubjectDefinitionNameBytes() { + java.lang.Object ref = subjectDefinitionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectDefinitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * subject_definition_name is the name of the subject's definition.
+     * 
+ * + * string subject_definition_name = 1 [json_name = "subjectDefinitionName"]; + * @param value The subjectDefinitionName to set. + * @return This builder for chaining. + */ + public Builder setSubjectDefinitionName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subjectDefinitionName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * subject_definition_name is the name of the subject's definition.
+     * 
+ * + * string subject_definition_name = 1 [json_name = "subjectDefinitionName"]; + * @return This builder for chaining. + */ + public Builder clearSubjectDefinitionName() { + subjectDefinitionName_ = getDefaultInstance().getSubjectDefinitionName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * subject_definition_name is the name of the subject's definition.
+     * 
+ * + * string subject_definition_name = 1 [json_name = "subjectDefinitionName"]; + * @param value The bytes for subjectDefinitionName to set. + * @return This builder for chaining. + */ + public Builder setSubjectDefinitionNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subjectDefinitionName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object optionalCaveatName_ = ""; + /** + *
+     * optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+     * 
+ * + * string optional_caveat_name = 2 [json_name = "optionalCaveatName"]; + * @return The optionalCaveatName. + */ + public java.lang.String getOptionalCaveatName() { + java.lang.Object ref = optionalCaveatName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalCaveatName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+     * 
+ * + * string optional_caveat_name = 2 [json_name = "optionalCaveatName"]; + * @return The bytes for optionalCaveatName. + */ + public com.google.protobuf.ByteString + getOptionalCaveatNameBytes() { + java.lang.Object ref = optionalCaveatName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalCaveatName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+     * 
+ * + * string optional_caveat_name = 2 [json_name = "optionalCaveatName"]; + * @param value The optionalCaveatName to set. + * @return This builder for chaining. + */ + public Builder setOptionalCaveatName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalCaveatName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+     * 
+ * + * string optional_caveat_name = 2 [json_name = "optionalCaveatName"]; + * @return This builder for chaining. + */ + public Builder clearOptionalCaveatName() { + optionalCaveatName_ = getDefaultInstance().getOptionalCaveatName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+     * 
+ * + * string optional_caveat_name = 2 [json_name = "optionalCaveatName"]; + * @param value The bytes for optionalCaveatName to set. + * @return This builder for chaining. + */ + public Builder setOptionalCaveatNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalCaveatName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + *
+     * is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
+     * 
+ * + * bool is_terminal_subject = 3 [json_name = "isTerminalSubject"]; + * @return Whether the isTerminalSubject field is set. + */ + public boolean hasIsTerminalSubject() { + return typerefCase_ == 3; + } + /** + *
+     * is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
+     * 
+ * + * bool is_terminal_subject = 3 [json_name = "isTerminalSubject"]; + * @return The isTerminalSubject. + */ + public boolean getIsTerminalSubject() { + if (typerefCase_ == 3) { + return (java.lang.Boolean) typeref_; + } + return false; + } + /** + *
+     * is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
+     * 
+ * + * bool is_terminal_subject = 3 [json_name = "isTerminalSubject"]; + * @param value The isTerminalSubject to set. + * @return This builder for chaining. + */ + public Builder setIsTerminalSubject(boolean value) { + + typerefCase_ = 3; + typeref_ = value; + onChanged(); + return this; + } + /** + *
+     * is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
+     * 
+ * + * bool is_terminal_subject = 3 [json_name = "isTerminalSubject"]; + * @return This builder for chaining. + */ + public Builder clearIsTerminalSubject() { + if (typerefCase_ == 3) { + typerefCase_ = 0; + typeref_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * optional_relation_name is the name of the relation that is applied to the subject, if any.
+     * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @return Whether the optionalRelationName field is set. + */ + @java.lang.Override + public boolean hasOptionalRelationName() { + return typerefCase_ == 4; + } + /** + *
+     * optional_relation_name is the name of the relation that is applied to the subject, if any.
+     * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @return The optionalRelationName. + */ + @java.lang.Override + public java.lang.String getOptionalRelationName() { + java.lang.Object ref = ""; + if (typerefCase_ == 4) { + ref = typeref_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (typerefCase_ == 4) { + typeref_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_relation_name is the name of the relation that is applied to the subject, if any.
+     * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @return The bytes for optionalRelationName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalRelationNameBytes() { + java.lang.Object ref = ""; + if (typerefCase_ == 4) { + ref = typeref_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (typerefCase_ == 4) { + typeref_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_relation_name is the name of the relation that is applied to the subject, if any.
+     * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @param value The optionalRelationName to set. + * @return This builder for chaining. + */ + public Builder setOptionalRelationName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + typerefCase_ = 4; + typeref_ = value; + onChanged(); + return this; + } + /** + *
+     * optional_relation_name is the name of the relation that is applied to the subject, if any.
+     * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @return This builder for chaining. + */ + public Builder clearOptionalRelationName() { + if (typerefCase_ == 4) { + typerefCase_ = 0; + typeref_ = null; + onChanged(); + } + return this; + } + /** + *
+     * optional_relation_name is the name of the relation that is applied to the subject, if any.
+     * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @param value The bytes for optionalRelationName to set. + * @return This builder for chaining. + */ + public Builder setOptionalRelationNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + typerefCase_ = 4; + typeref_ = value; + onChanged(); + return this; + } + + /** + *
+     * is_public_wildcard is true if the subject is a public wildcard.
+     * 
+ * + * bool is_public_wildcard = 5 [json_name = "isPublicWildcard"]; + * @return Whether the isPublicWildcard field is set. + */ + public boolean hasIsPublicWildcard() { + return typerefCase_ == 5; + } + /** + *
+     * is_public_wildcard is true if the subject is a public wildcard.
+     * 
+ * + * bool is_public_wildcard = 5 [json_name = "isPublicWildcard"]; + * @return The isPublicWildcard. + */ + public boolean getIsPublicWildcard() { + if (typerefCase_ == 5) { + return (java.lang.Boolean) typeref_; + } + return false; + } + /** + *
+     * is_public_wildcard is true if the subject is a public wildcard.
+     * 
+ * + * bool is_public_wildcard = 5 [json_name = "isPublicWildcard"]; + * @param value The isPublicWildcard to set. + * @return This builder for chaining. + */ + public Builder setIsPublicWildcard(boolean value) { + + typerefCase_ = 5; + typeref_ = value; + onChanged(); + return this; + } + /** + *
+     * is_public_wildcard is true if the subject is a public wildcard.
+     * 
+ * + * bool is_public_wildcard = 5 [json_name = "isPublicWildcard"]; + * @return This builder for chaining. + */ + public Builder clearIsPublicWildcard() { + if (typerefCase_ == 5) { + typerefCase_ = 0; + typeref_ = null; + 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.ExpTypeReference) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpTypeReference) + private static final com.authzed.api.v1.ExpTypeReference DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpTypeReference(); + } + + public static com.authzed.api.v1.ExpTypeReference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpTypeReference 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.ExpTypeReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpTypeReferenceOrBuilder.java b/generated/com/authzed/api/v1/ExpTypeReferenceOrBuilder.java new file mode 100644 index 00000000..bc9dbd38 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpTypeReferenceOrBuilder.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExpTypeReferenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpTypeReference) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * subject_definition_name is the name of the subject's definition.
+   * 
+ * + * string subject_definition_name = 1 [json_name = "subjectDefinitionName"]; + * @return The subjectDefinitionName. + */ + java.lang.String getSubjectDefinitionName(); + /** + *
+   * subject_definition_name is the name of the subject's definition.
+   * 
+ * + * string subject_definition_name = 1 [json_name = "subjectDefinitionName"]; + * @return The bytes for subjectDefinitionName. + */ + com.google.protobuf.ByteString + getSubjectDefinitionNameBytes(); + + /** + *
+   * optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+   * 
+ * + * string optional_caveat_name = 2 [json_name = "optionalCaveatName"]; + * @return The optionalCaveatName. + */ + java.lang.String getOptionalCaveatName(); + /** + *
+   * optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+   * 
+ * + * string optional_caveat_name = 2 [json_name = "optionalCaveatName"]; + * @return The bytes for optionalCaveatName. + */ + com.google.protobuf.ByteString + getOptionalCaveatNameBytes(); + + /** + *
+   * is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
+   * 
+ * + * bool is_terminal_subject = 3 [json_name = "isTerminalSubject"]; + * @return Whether the isTerminalSubject field is set. + */ + boolean hasIsTerminalSubject(); + /** + *
+   * is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
+   * 
+ * + * bool is_terminal_subject = 3 [json_name = "isTerminalSubject"]; + * @return The isTerminalSubject. + */ + boolean getIsTerminalSubject(); + + /** + *
+   * optional_relation_name is the name of the relation that is applied to the subject, if any.
+   * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @return Whether the optionalRelationName field is set. + */ + boolean hasOptionalRelationName(); + /** + *
+   * optional_relation_name is the name of the relation that is applied to the subject, if any.
+   * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @return The optionalRelationName. + */ + java.lang.String getOptionalRelationName(); + /** + *
+   * optional_relation_name is the name of the relation that is applied to the subject, if any.
+   * 
+ * + * string optional_relation_name = 4 [json_name = "optionalRelationName"]; + * @return The bytes for optionalRelationName. + */ + com.google.protobuf.ByteString + getOptionalRelationNameBytes(); + + /** + *
+   * is_public_wildcard is true if the subject is a public wildcard.
+   * 
+ * + * bool is_public_wildcard = 5 [json_name = "isPublicWildcard"]; + * @return Whether the isPublicWildcard field is set. + */ + boolean hasIsPublicWildcard(); + /** + *
+   * is_public_wildcard is true if the subject is a public wildcard.
+   * 
+ * + * bool is_public_wildcard = 5 [json_name = "isPublicWildcard"]; + * @return The isPublicWildcard. + */ + boolean getIsPublicWildcard(); + + public com.authzed.api.v1.ExpTypeReference.TyperefCase getTyperefCase(); +} diff --git a/generated/com/authzed/api/v1/ExpandPermissionTreeRequest.java b/generated/com/authzed/api/v1/ExpandPermissionTreeRequest.java new file mode 100644 index 00000000..482eaf24 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpandPermissionTreeRequest.java @@ -0,0 +1,1007 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ExpandPermissionTreeRequest returns a tree representing the expansion of all
+ * relationships found accessible from a permission or relation on a particular
+ * resource.
+ * ExpandPermissionTreeRequest is typically used to determine the full set of
+ * subjects with a permission, along with the relationships that grant said
+ * access.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ExpandPermissionTreeRequest} + */ +public final class ExpandPermissionTreeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpandPermissionTreeRequest) + ExpandPermissionTreeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpandPermissionTreeRequest.newBuilder() to construct. + private ExpandPermissionTreeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpandPermissionTreeRequest() { + permission_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpandPermissionTreeRequest(); + } + + @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.PermissionService.internal_static_authzed_api_v1_ExpandPermissionTreeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ExpandPermissionTreeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpandPermissionTreeRequest.class, com.authzed.api.v1.ExpandPermissionTreeRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int RESOURCE_FIELD_NUMBER = 2; + private com.authzed.api.v1.ObjectReference resource_; + /** + *
+   * resource is the resource over which to run the expansion.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+   * resource is the resource over which to run the expansion.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getResource() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + /** + *
+   * resource is the resource over which to run the expansion.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + + public static final int PERMISSION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object permission_ = ""; + /** + *
+   * permission is the name of the permission or relation over which to run the
+   * expansion for the resource.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + *
+   * permission is the name of the permission or relation over which to run the
+   * expansion for the resource.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = 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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + if (resource_ != null) { + output.writeMessage(2, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, permission_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, permission_); + } + 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.ExpandPermissionTreeRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpandPermissionTreeRequest other = (com.authzed.api.v1.ExpandPermissionTreeRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (!getPermission() + .equals(other.getPermission())) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpandPermissionTreeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpandPermissionTreeRequest 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.ExpandPermissionTreeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpandPermissionTreeRequest 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.ExpandPermissionTreeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpandPermissionTreeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpandPermissionTreeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpandPermissionTreeRequest 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.ExpandPermissionTreeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpandPermissionTreeRequest 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.ExpandPermissionTreeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpandPermissionTreeRequest 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.ExpandPermissionTreeRequest 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; + } + /** + *
+   * ExpandPermissionTreeRequest returns a tree representing the expansion of all
+   * relationships found accessible from a permission or relation on a particular
+   * resource.
+   * ExpandPermissionTreeRequest is typically used to determine the full set of
+   * subjects with a permission, along with the relationships that grant said
+   * access.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ExpandPermissionTreeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpandPermissionTreeRequest) + com.authzed.api.v1.ExpandPermissionTreeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ExpandPermissionTreeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ExpandPermissionTreeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpandPermissionTreeRequest.class, com.authzed.api.v1.ExpandPermissionTreeRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpandPermissionTreeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + permission_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ExpandPermissionTreeRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpandPermissionTreeRequest getDefaultInstanceForType() { + return com.authzed.api.v1.ExpandPermissionTreeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpandPermissionTreeRequest build() { + com.authzed.api.v1.ExpandPermissionTreeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpandPermissionTreeRequest buildPartial() { + com.authzed.api.v1.ExpandPermissionTreeRequest result = new com.authzed.api.v1.ExpandPermissionTreeRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExpandPermissionTreeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resource_ = resourceBuilder_ == null + ? resource_ + : resourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permission_ = permission_; + } + } + + @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.ExpandPermissionTreeRequest) { + return mergeFrom((com.authzed.api.v1.ExpandPermissionTreeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpandPermissionTreeRequest other) { + if (other == com.authzed.api.v1.ExpandPermissionTreeRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + bitField0_ |= 0x00000004; + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getResourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + permission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private com.authzed.api.v1.ObjectReference resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> resourceBuilder_; + /** + *
+     * resource is the resource over which to run the expansion.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * resource is the resource over which to run the expansion.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + public com.authzed.api.v1.ObjectReference getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+     * resource is the resource over which to run the expansion.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + } else { + resourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource over which to run the expansion.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource( + com.authzed.api.v1.ObjectReference.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource over which to run the expansion.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder mergeResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + resource_ != null && + resource_ != com.authzed.api.v1.ObjectReference.getDefaultInstance()) { + getResourceBuilder().mergeFrom(value); + } else { + resource_ = value; + } + } else { + resourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource over which to run the expansion.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder clearResource() { + bitField0_ = (bitField0_ & ~0x00000002); + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * resource is the resource over which to run the expansion.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReference.Builder getResourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+     * resource is the resource over which to run the expansion.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + } + /** + *
+     * resource is the resource over which to run the expansion.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private java.lang.Object permission_ = ""; + /** + *
+     * permission is the name of the permission or relation over which to run the
+     * expansion for the resource.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * permission is the name of the permission or relation over which to run the
+     * expansion for the resource.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * permission is the name of the permission or relation over which to run the
+     * expansion for the resource.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * permission is the name of the permission or relation over which to run the
+     * expansion for the resource.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermission() { + permission_ = getDefaultInstance().getPermission(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * permission is the name of the permission or relation over which to run the
+     * expansion for the resource.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permission_ = value; + bitField0_ |= 0x00000004; + 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.ExpandPermissionTreeRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpandPermissionTreeRequest) + private static final com.authzed.api.v1.ExpandPermissionTreeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpandPermissionTreeRequest(); + } + + public static com.authzed.api.v1.ExpandPermissionTreeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpandPermissionTreeRequest 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.ExpandPermissionTreeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpandPermissionTreeRequestOrBuilder.java b/generated/com/authzed/api/v1/ExpandPermissionTreeRequestOrBuilder.java new file mode 100644 index 00000000..f8ddee92 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpandPermissionTreeRequestOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface ExpandPermissionTreeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpandPermissionTreeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + *
+   * resource is the resource over which to run the expansion.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+   * resource is the resource over which to run the expansion.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + com.authzed.api.v1.ObjectReference getResource(); + /** + *
+   * resource is the resource over which to run the expansion.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder(); + + /** + *
+   * permission is the name of the permission or relation over which to run the
+   * expansion for the resource.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + java.lang.String getPermission(); + /** + *
+   * permission is the name of the permission or relation over which to run the
+   * expansion for the resource.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); +} diff --git a/generated/com/authzed/api/v1/ExpandPermissionTreeResponse.java b/generated/com/authzed/api/v1/ExpandPermissionTreeResponse.java new file mode 100644 index 00000000..1fd1f54b --- /dev/null +++ b/generated/com/authzed/api/v1/ExpandPermissionTreeResponse.java @@ -0,0 +1,842 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExpandPermissionTreeResponse} + */ +public final class ExpandPermissionTreeResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExpandPermissionTreeResponse) + ExpandPermissionTreeResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExpandPermissionTreeResponse.newBuilder() to construct. + private ExpandPermissionTreeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExpandPermissionTreeResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExpandPermissionTreeResponse(); + } + + @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.PermissionService.internal_static_authzed_api_v1_ExpandPermissionTreeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ExpandPermissionTreeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpandPermissionTreeResponse.class, com.authzed.api.v1.ExpandPermissionTreeResponse.Builder.class); + } + + public static final int EXPANDED_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken expandedAt_; + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + * @return Whether the expandedAt field is set. + */ + @java.lang.Override + public boolean hasExpandedAt() { + return expandedAt_ != null; + } + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + * @return The expandedAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getExpandedAt() { + return expandedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : expandedAt_; + } + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getExpandedAtOrBuilder() { + return expandedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : expandedAt_; + } + + public static final int TREE_ROOT_FIELD_NUMBER = 2; + private com.authzed.api.v1.PermissionRelationshipTree treeRoot_; + /** + *
+   * tree_root is a tree structure whose leaf nodes are subjects, and
+   * intermediate nodes represent the various operations (union, intersection,
+   * exclusion) to reach those subjects.
+   * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + * @return Whether the treeRoot field is set. + */ + @java.lang.Override + public boolean hasTreeRoot() { + return treeRoot_ != null; + } + /** + *
+   * tree_root is a tree structure whose leaf nodes are subjects, and
+   * intermediate nodes represent the various operations (union, intersection,
+   * exclusion) to reach those subjects.
+   * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + * @return The treeRoot. + */ + @java.lang.Override + public com.authzed.api.v1.PermissionRelationshipTree getTreeRoot() { + return treeRoot_ == null ? com.authzed.api.v1.PermissionRelationshipTree.getDefaultInstance() : treeRoot_; + } + /** + *
+   * tree_root is a tree structure whose leaf nodes are subjects, and
+   * intermediate nodes represent the various operations (union, intersection,
+   * exclusion) to reach those subjects.
+   * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + */ + @java.lang.Override + public com.authzed.api.v1.PermissionRelationshipTreeOrBuilder getTreeRootOrBuilder() { + return treeRoot_ == null ? com.authzed.api.v1.PermissionRelationshipTree.getDefaultInstance() : treeRoot_; + } + + 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 (expandedAt_ != null) { + output.writeMessage(1, getExpandedAt()); + } + if (treeRoot_ != null) { + output.writeMessage(2, getTreeRoot()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (expandedAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getExpandedAt()); + } + if (treeRoot_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getTreeRoot()); + } + 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.ExpandPermissionTreeResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.ExpandPermissionTreeResponse other = (com.authzed.api.v1.ExpandPermissionTreeResponse) obj; + + if (hasExpandedAt() != other.hasExpandedAt()) return false; + if (hasExpandedAt()) { + if (!getExpandedAt() + .equals(other.getExpandedAt())) return false; + } + if (hasTreeRoot() != other.hasTreeRoot()) return false; + if (hasTreeRoot()) { + if (!getTreeRoot() + .equals(other.getTreeRoot())) 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 (hasExpandedAt()) { + hash = (37 * hash) + EXPANDED_AT_FIELD_NUMBER; + hash = (53 * hash) + getExpandedAt().hashCode(); + } + if (hasTreeRoot()) { + hash = (37 * hash) + TREE_ROOT_FIELD_NUMBER; + hash = (53 * hash) + getTreeRoot().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExpandPermissionTreeResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpandPermissionTreeResponse 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.ExpandPermissionTreeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpandPermissionTreeResponse 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.ExpandPermissionTreeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExpandPermissionTreeResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExpandPermissionTreeResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpandPermissionTreeResponse 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.ExpandPermissionTreeResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpandPermissionTreeResponse 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.ExpandPermissionTreeResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExpandPermissionTreeResponse 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.ExpandPermissionTreeResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExpandPermissionTreeResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExpandPermissionTreeResponse) + com.authzed.api.v1.ExpandPermissionTreeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ExpandPermissionTreeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ExpandPermissionTreeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExpandPermissionTreeResponse.class, com.authzed.api.v1.ExpandPermissionTreeResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.ExpandPermissionTreeResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + expandedAt_ = null; + if (expandedAtBuilder_ != null) { + expandedAtBuilder_.dispose(); + expandedAtBuilder_ = null; + } + treeRoot_ = null; + if (treeRootBuilder_ != null) { + treeRootBuilder_.dispose(); + treeRootBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ExpandPermissionTreeResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExpandPermissionTreeResponse getDefaultInstanceForType() { + return com.authzed.api.v1.ExpandPermissionTreeResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExpandPermissionTreeResponse build() { + com.authzed.api.v1.ExpandPermissionTreeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExpandPermissionTreeResponse buildPartial() { + com.authzed.api.v1.ExpandPermissionTreeResponse result = new com.authzed.api.v1.ExpandPermissionTreeResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExpandPermissionTreeResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.expandedAt_ = expandedAtBuilder_ == null + ? expandedAt_ + : expandedAtBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.treeRoot_ = treeRootBuilder_ == null + ? treeRoot_ + : treeRootBuilder_.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.ExpandPermissionTreeResponse) { + return mergeFrom((com.authzed.api.v1.ExpandPermissionTreeResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExpandPermissionTreeResponse other) { + if (other == com.authzed.api.v1.ExpandPermissionTreeResponse.getDefaultInstance()) return this; + if (other.hasExpandedAt()) { + mergeExpandedAt(other.getExpandedAt()); + } + if (other.hasTreeRoot()) { + mergeTreeRoot(other.getTreeRoot()); + } + 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( + getExpandedAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getTreeRootFieldBuilder().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 com.authzed.api.v1.ZedToken expandedAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> expandedAtBuilder_; + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + * @return Whether the expandedAt field is set. + */ + public boolean hasExpandedAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + * @return The expandedAt. + */ + public com.authzed.api.v1.ZedToken getExpandedAt() { + if (expandedAtBuilder_ == null) { + return expandedAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : expandedAt_; + } else { + return expandedAtBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + */ + public Builder setExpandedAt(com.authzed.api.v1.ZedToken value) { + if (expandedAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expandedAt_ = value; + } else { + expandedAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + */ + public Builder setExpandedAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (expandedAtBuilder_ == null) { + expandedAt_ = builderForValue.build(); + } else { + expandedAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + */ + public Builder mergeExpandedAt(com.authzed.api.v1.ZedToken value) { + if (expandedAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + expandedAt_ != null && + expandedAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getExpandedAtBuilder().mergeFrom(value); + } else { + expandedAt_ = value; + } + } else { + expandedAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + */ + public Builder clearExpandedAt() { + bitField0_ = (bitField0_ & ~0x00000001); + expandedAt_ = null; + if (expandedAtBuilder_ != null) { + expandedAtBuilder_.dispose(); + expandedAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getExpandedAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getExpandedAtFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getExpandedAtOrBuilder() { + if (expandedAtBuilder_ != null) { + return expandedAtBuilder_.getMessageOrBuilder(); + } else { + return expandedAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : expandedAt_; + } + } + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getExpandedAtFieldBuilder() { + if (expandedAtBuilder_ == null) { + expandedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getExpandedAt(), + getParentForChildren(), + isClean()); + expandedAt_ = null; + } + return expandedAtBuilder_; + } + + private com.authzed.api.v1.PermissionRelationshipTree treeRoot_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PermissionRelationshipTree, com.authzed.api.v1.PermissionRelationshipTree.Builder, com.authzed.api.v1.PermissionRelationshipTreeOrBuilder> treeRootBuilder_; + /** + *
+     * tree_root is a tree structure whose leaf nodes are subjects, and
+     * intermediate nodes represent the various operations (union, intersection,
+     * exclusion) to reach those subjects.
+     * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + * @return Whether the treeRoot field is set. + */ + public boolean hasTreeRoot() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * tree_root is a tree structure whose leaf nodes are subjects, and
+     * intermediate nodes represent the various operations (union, intersection,
+     * exclusion) to reach those subjects.
+     * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + * @return The treeRoot. + */ + public com.authzed.api.v1.PermissionRelationshipTree getTreeRoot() { + if (treeRootBuilder_ == null) { + return treeRoot_ == null ? com.authzed.api.v1.PermissionRelationshipTree.getDefaultInstance() : treeRoot_; + } else { + return treeRootBuilder_.getMessage(); + } + } + /** + *
+     * tree_root is a tree structure whose leaf nodes are subjects, and
+     * intermediate nodes represent the various operations (union, intersection,
+     * exclusion) to reach those subjects.
+     * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + */ + public Builder setTreeRoot(com.authzed.api.v1.PermissionRelationshipTree value) { + if (treeRootBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + treeRoot_ = value; + } else { + treeRootBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * tree_root is a tree structure whose leaf nodes are subjects, and
+     * intermediate nodes represent the various operations (union, intersection,
+     * exclusion) to reach those subjects.
+     * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + */ + public Builder setTreeRoot( + com.authzed.api.v1.PermissionRelationshipTree.Builder builderForValue) { + if (treeRootBuilder_ == null) { + treeRoot_ = builderForValue.build(); + } else { + treeRootBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * tree_root is a tree structure whose leaf nodes are subjects, and
+     * intermediate nodes represent the various operations (union, intersection,
+     * exclusion) to reach those subjects.
+     * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + */ + public Builder mergeTreeRoot(com.authzed.api.v1.PermissionRelationshipTree value) { + if (treeRootBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + treeRoot_ != null && + treeRoot_ != com.authzed.api.v1.PermissionRelationshipTree.getDefaultInstance()) { + getTreeRootBuilder().mergeFrom(value); + } else { + treeRoot_ = value; + } + } else { + treeRootBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * tree_root is a tree structure whose leaf nodes are subjects, and
+     * intermediate nodes represent the various operations (union, intersection,
+     * exclusion) to reach those subjects.
+     * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + */ + public Builder clearTreeRoot() { + bitField0_ = (bitField0_ & ~0x00000002); + treeRoot_ = null; + if (treeRootBuilder_ != null) { + treeRootBuilder_.dispose(); + treeRootBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * tree_root is a tree structure whose leaf nodes are subjects, and
+     * intermediate nodes represent the various operations (union, intersection,
+     * exclusion) to reach those subjects.
+     * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + */ + public com.authzed.api.v1.PermissionRelationshipTree.Builder getTreeRootBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTreeRootFieldBuilder().getBuilder(); + } + /** + *
+     * tree_root is a tree structure whose leaf nodes are subjects, and
+     * intermediate nodes represent the various operations (union, intersection,
+     * exclusion) to reach those subjects.
+     * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + */ + public com.authzed.api.v1.PermissionRelationshipTreeOrBuilder getTreeRootOrBuilder() { + if (treeRootBuilder_ != null) { + return treeRootBuilder_.getMessageOrBuilder(); + } else { + return treeRoot_ == null ? + com.authzed.api.v1.PermissionRelationshipTree.getDefaultInstance() : treeRoot_; + } + } + /** + *
+     * tree_root is a tree structure whose leaf nodes are subjects, and
+     * intermediate nodes represent the various operations (union, intersection,
+     * exclusion) to reach those subjects.
+     * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PermissionRelationshipTree, com.authzed.api.v1.PermissionRelationshipTree.Builder, com.authzed.api.v1.PermissionRelationshipTreeOrBuilder> + getTreeRootFieldBuilder() { + if (treeRootBuilder_ == null) { + treeRootBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PermissionRelationshipTree, com.authzed.api.v1.PermissionRelationshipTree.Builder, com.authzed.api.v1.PermissionRelationshipTreeOrBuilder>( + getTreeRoot(), + getParentForChildren(), + isClean()); + treeRoot_ = null; + } + return treeRootBuilder_; + } + @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.ExpandPermissionTreeResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExpandPermissionTreeResponse) + private static final com.authzed.api.v1.ExpandPermissionTreeResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExpandPermissionTreeResponse(); + } + + public static com.authzed.api.v1.ExpandPermissionTreeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExpandPermissionTreeResponse 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.ExpandPermissionTreeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExpandPermissionTreeResponseOrBuilder.java b/generated/com/authzed/api/v1/ExpandPermissionTreeResponseOrBuilder.java new file mode 100644 index 00000000..6f2a6112 --- /dev/null +++ b/generated/com/authzed/api/v1/ExpandPermissionTreeResponseOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface ExpandPermissionTreeResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExpandPermissionTreeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + * @return Whether the expandedAt field is set. + */ + boolean hasExpandedAt(); + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + * @return The expandedAt. + */ + com.authzed.api.v1.ZedToken getExpandedAt(); + /** + * .authzed.api.v1.ZedToken expanded_at = 1 [json_name = "expandedAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getExpandedAtOrBuilder(); + + /** + *
+   * tree_root is a tree structure whose leaf nodes are subjects, and
+   * intermediate nodes represent the various operations (union, intersection,
+   * exclusion) to reach those subjects.
+   * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + * @return Whether the treeRoot field is set. + */ + boolean hasTreeRoot(); + /** + *
+   * tree_root is a tree structure whose leaf nodes are subjects, and
+   * intermediate nodes represent the various operations (union, intersection,
+   * exclusion) to reach those subjects.
+   * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + * @return The treeRoot. + */ + com.authzed.api.v1.PermissionRelationshipTree getTreeRoot(); + /** + *
+   * tree_root is a tree structure whose leaf nodes are subjects, and
+   * intermediate nodes represent the various operations (union, intersection,
+   * exclusion) to reach those subjects.
+   * 
+ * + * .authzed.api.v1.PermissionRelationshipTree tree_root = 2 [json_name = "treeRoot"]; + */ + com.authzed.api.v1.PermissionRelationshipTreeOrBuilder getTreeRootOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalComputablePermissionsRequest.java b/generated/com/authzed/api/v1/ExperimentalComputablePermissionsRequest.java new file mode 100644 index 00000000..bd4ce41b --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalComputablePermissionsRequest.java @@ -0,0 +1,1039 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalComputablePermissionsRequest} + */ +public final class ExperimentalComputablePermissionsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalComputablePermissionsRequest) + ExperimentalComputablePermissionsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalComputablePermissionsRequest.newBuilder() to construct. + private ExperimentalComputablePermissionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalComputablePermissionsRequest() { + definitionName_ = ""; + relationName_ = ""; + optionalDefinitionNameFilter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalComputablePermissionsRequest(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalComputablePermissionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalComputablePermissionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalComputablePermissionsRequest.class, com.authzed.api.v1.ExperimentalComputablePermissionsRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int DEFINITION_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object definitionName_ = ""; + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The definitionName. + */ + @java.lang.Override + public java.lang.String getDefinitionName() { + java.lang.Object ref = definitionName_; + 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(); + definitionName_ = s; + return s; + } + } + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The bytes for definitionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefinitionNameBytes() { + java.lang.Object ref = definitionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + definitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATION_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object relationName_ = ""; + /** + * string relation_name = 3 [json_name = "relationName"]; + * @return The relationName. + */ + @java.lang.Override + public java.lang.String getRelationName() { + java.lang.Object ref = relationName_; + 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(); + relationName_ = s; + return s; + } + } + /** + * string relation_name = 3 [json_name = "relationName"]; + * @return The bytes for relationName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRelationNameBytes() { + java.lang.Object ref = relationName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_DEFINITION_NAME_FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalDefinitionNameFilter_ = ""; + /** + *
+   * optional_definition_name_match is a prefix that is matched against the definition name(s)
+   * for the permissions returned.
+   * If not specified, will be ignored.
+   * 
+ * + * string optional_definition_name_filter = 4 [json_name = "optionalDefinitionNameFilter"]; + * @return The optionalDefinitionNameFilter. + */ + @java.lang.Override + public java.lang.String getOptionalDefinitionNameFilter() { + java.lang.Object ref = optionalDefinitionNameFilter_; + 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(); + optionalDefinitionNameFilter_ = s; + return s; + } + } + /** + *
+   * optional_definition_name_match is a prefix that is matched against the definition name(s)
+   * for the permissions returned.
+   * If not specified, will be ignored.
+   * 
+ * + * string optional_definition_name_filter = 4 [json_name = "optionalDefinitionNameFilter"]; + * @return The bytes for optionalDefinitionNameFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalDefinitionNameFilterBytes() { + java.lang.Object ref = optionalDefinitionNameFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalDefinitionNameFilter_ = 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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(definitionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, definitionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, relationName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalDefinitionNameFilter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, optionalDefinitionNameFilter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(definitionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, definitionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, relationName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalDefinitionNameFilter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, optionalDefinitionNameFilter_); + } + 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.ExperimentalComputablePermissionsRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalComputablePermissionsRequest other = (com.authzed.api.v1.ExperimentalComputablePermissionsRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (!getDefinitionName() + .equals(other.getDefinitionName())) return false; + if (!getRelationName() + .equals(other.getRelationName())) return false; + if (!getOptionalDefinitionNameFilter() + .equals(other.getOptionalDefinitionNameFilter())) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + hash = (37 * hash) + DEFINITION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDefinitionName().hashCode(); + hash = (37 * hash) + RELATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRelationName().hashCode(); + hash = (37 * hash) + OPTIONAL_DEFINITION_NAME_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getOptionalDefinitionNameFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalComputablePermissionsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsRequest 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.ExperimentalComputablePermissionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsRequest 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.ExperimentalComputablePermissionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsRequest 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.ExperimentalComputablePermissionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsRequest 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.ExperimentalComputablePermissionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsRequest 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.ExperimentalComputablePermissionsRequest 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalComputablePermissionsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalComputablePermissionsRequest) + com.authzed.api.v1.ExperimentalComputablePermissionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalComputablePermissionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalComputablePermissionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalComputablePermissionsRequest.class, com.authzed.api.v1.ExperimentalComputablePermissionsRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalComputablePermissionsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + definitionName_ = ""; + relationName_ = ""; + optionalDefinitionNameFilter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalComputablePermissionsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalComputablePermissionsRequest getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalComputablePermissionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalComputablePermissionsRequest build() { + com.authzed.api.v1.ExperimentalComputablePermissionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalComputablePermissionsRequest buildPartial() { + com.authzed.api.v1.ExperimentalComputablePermissionsRequest result = new com.authzed.api.v1.ExperimentalComputablePermissionsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalComputablePermissionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.definitionName_ = definitionName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.relationName_ = relationName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.optionalDefinitionNameFilter_ = optionalDefinitionNameFilter_; + } + } + + @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.ExperimentalComputablePermissionsRequest) { + return mergeFrom((com.authzed.api.v1.ExperimentalComputablePermissionsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalComputablePermissionsRequest other) { + if (other == com.authzed.api.v1.ExperimentalComputablePermissionsRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (!other.getDefinitionName().isEmpty()) { + definitionName_ = other.definitionName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRelationName().isEmpty()) { + relationName_ = other.relationName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOptionalDefinitionNameFilter().isEmpty()) { + optionalDefinitionNameFilter_ = other.optionalDefinitionNameFilter_; + bitField0_ |= 0x00000008; + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + definitionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + relationName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + optionalDefinitionNameFilter_ = 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 bitField0_; + + private com.authzed.api.v1.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private java.lang.Object definitionName_ = ""; + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The definitionName. + */ + public java.lang.String getDefinitionName() { + java.lang.Object ref = definitionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + definitionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The bytes for definitionName. + */ + public com.google.protobuf.ByteString + getDefinitionNameBytes() { + java.lang.Object ref = definitionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + definitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @param value The definitionName to set. + * @return This builder for chaining. + */ + public Builder setDefinitionName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + definitionName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return This builder for chaining. + */ + public Builder clearDefinitionName() { + definitionName_ = getDefaultInstance().getDefinitionName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @param value The bytes for definitionName to set. + * @return This builder for chaining. + */ + public Builder setDefinitionNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + definitionName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object relationName_ = ""; + /** + * string relation_name = 3 [json_name = "relationName"]; + * @return The relationName. + */ + public java.lang.String getRelationName() { + java.lang.Object ref = relationName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relationName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string relation_name = 3 [json_name = "relationName"]; + * @return The bytes for relationName. + */ + public com.google.protobuf.ByteString + getRelationNameBytes() { + java.lang.Object ref = relationName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string relation_name = 3 [json_name = "relationName"]; + * @param value The relationName to set. + * @return This builder for chaining. + */ + public Builder setRelationName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + relationName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string relation_name = 3 [json_name = "relationName"]; + * @return This builder for chaining. + */ + public Builder clearRelationName() { + relationName_ = getDefaultInstance().getRelationName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string relation_name = 3 [json_name = "relationName"]; + * @param value The bytes for relationName to set. + * @return This builder for chaining. + */ + public Builder setRelationNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + relationName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object optionalDefinitionNameFilter_ = ""; + /** + *
+     * optional_definition_name_match is a prefix that is matched against the definition name(s)
+     * for the permissions returned.
+     * If not specified, will be ignored.
+     * 
+ * + * string optional_definition_name_filter = 4 [json_name = "optionalDefinitionNameFilter"]; + * @return The optionalDefinitionNameFilter. + */ + public java.lang.String getOptionalDefinitionNameFilter() { + java.lang.Object ref = optionalDefinitionNameFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalDefinitionNameFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_definition_name_match is a prefix that is matched against the definition name(s)
+     * for the permissions returned.
+     * If not specified, will be ignored.
+     * 
+ * + * string optional_definition_name_filter = 4 [json_name = "optionalDefinitionNameFilter"]; + * @return The bytes for optionalDefinitionNameFilter. + */ + public com.google.protobuf.ByteString + getOptionalDefinitionNameFilterBytes() { + java.lang.Object ref = optionalDefinitionNameFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalDefinitionNameFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_definition_name_match is a prefix that is matched against the definition name(s)
+     * for the permissions returned.
+     * If not specified, will be ignored.
+     * 
+ * + * string optional_definition_name_filter = 4 [json_name = "optionalDefinitionNameFilter"]; + * @param value The optionalDefinitionNameFilter to set. + * @return This builder for chaining. + */ + public Builder setOptionalDefinitionNameFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalDefinitionNameFilter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * optional_definition_name_match is a prefix that is matched against the definition name(s)
+     * for the permissions returned.
+     * If not specified, will be ignored.
+     * 
+ * + * string optional_definition_name_filter = 4 [json_name = "optionalDefinitionNameFilter"]; + * @return This builder for chaining. + */ + public Builder clearOptionalDefinitionNameFilter() { + optionalDefinitionNameFilter_ = getDefaultInstance().getOptionalDefinitionNameFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * optional_definition_name_match is a prefix that is matched against the definition name(s)
+     * for the permissions returned.
+     * If not specified, will be ignored.
+     * 
+ * + * string optional_definition_name_filter = 4 [json_name = "optionalDefinitionNameFilter"]; + * @param value The bytes for optionalDefinitionNameFilter to set. + * @return This builder for chaining. + */ + public Builder setOptionalDefinitionNameFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalDefinitionNameFilter_ = 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.ExperimentalComputablePermissionsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalComputablePermissionsRequest) + private static final com.authzed.api.v1.ExperimentalComputablePermissionsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalComputablePermissionsRequest(); + } + + public static com.authzed.api.v1.ExperimentalComputablePermissionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalComputablePermissionsRequest 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.ExperimentalComputablePermissionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalComputablePermissionsRequestOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalComputablePermissionsRequestOrBuilder.java new file mode 100644 index 00000000..b5aee3e2 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalComputablePermissionsRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalComputablePermissionsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalComputablePermissionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The definitionName. + */ + java.lang.String getDefinitionName(); + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The bytes for definitionName. + */ + com.google.protobuf.ByteString + getDefinitionNameBytes(); + + /** + * string relation_name = 3 [json_name = "relationName"]; + * @return The relationName. + */ + java.lang.String getRelationName(); + /** + * string relation_name = 3 [json_name = "relationName"]; + * @return The bytes for relationName. + */ + com.google.protobuf.ByteString + getRelationNameBytes(); + + /** + *
+   * optional_definition_name_match is a prefix that is matched against the definition name(s)
+   * for the permissions returned.
+   * If not specified, will be ignored.
+   * 
+ * + * string optional_definition_name_filter = 4 [json_name = "optionalDefinitionNameFilter"]; + * @return The optionalDefinitionNameFilter. + */ + java.lang.String getOptionalDefinitionNameFilter(); + /** + *
+   * optional_definition_name_match is a prefix that is matched against the definition name(s)
+   * for the permissions returned.
+   * If not specified, will be ignored.
+   * 
+ * + * string optional_definition_name_filter = 4 [json_name = "optionalDefinitionNameFilter"]; + * @return The bytes for optionalDefinitionNameFilter. + */ + com.google.protobuf.ByteString + getOptionalDefinitionNameFilterBytes(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalComputablePermissionsResponse.java b/generated/com/authzed/api/v1/ExperimentalComputablePermissionsResponse.java new file mode 100644 index 00000000..bf3ee940 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalComputablePermissionsResponse.java @@ -0,0 +1,991 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalComputablePermissionsResponse} + */ +public final class ExperimentalComputablePermissionsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalComputablePermissionsResponse) + ExperimentalComputablePermissionsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalComputablePermissionsResponse.newBuilder() to construct. + private ExperimentalComputablePermissionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalComputablePermissionsResponse() { + permissions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalComputablePermissionsResponse(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalComputablePermissionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalComputablePermissionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalComputablePermissionsResponse.class, com.authzed.api.v1.ExperimentalComputablePermissionsResponse.Builder.class); + } + + public static final int PERMISSIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List permissions_; + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + @java.lang.Override + public java.util.List getPermissionsList() { + return permissions_; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + @java.lang.Override + public java.util.List + getPermissionsOrBuilderList() { + return permissions_; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + @java.lang.Override + public int getPermissionsCount() { + return permissions_.size(); + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationReference getPermissions(int index) { + return permissions_.get(index); + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationReferenceOrBuilder getPermissionsOrBuilder( + int index) { + return permissions_.get(index); + } + + public static final int READ_AT_FIELD_NUMBER = 2; + private com.authzed.api.v1.ZedToken readAt_; + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + @java.lang.Override + public boolean hasReadAt() { + return readAt_ != null; + } + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return The readAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getReadAt() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + + 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 < permissions_.size(); i++) { + output.writeMessage(1, permissions_.get(i)); + } + if (readAt_ != null) { + output.writeMessage(2, getReadAt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < permissions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, permissions_.get(i)); + } + if (readAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReadAt()); + } + 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.ExperimentalComputablePermissionsResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalComputablePermissionsResponse other = (com.authzed.api.v1.ExperimentalComputablePermissionsResponse) obj; + + if (!getPermissionsList() + .equals(other.getPermissionsList())) return false; + if (hasReadAt() != other.hasReadAt()) return false; + if (hasReadAt()) { + if (!getReadAt() + .equals(other.getReadAt())) 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 (getPermissionsCount() > 0) { + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissionsList().hashCode(); + } + if (hasReadAt()) { + hash = (37 * hash) + READ_AT_FIELD_NUMBER; + hash = (53 * hash) + getReadAt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalComputablePermissionsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsResponse 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.ExperimentalComputablePermissionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsResponse 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.ExperimentalComputablePermissionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsResponse 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.ExperimentalComputablePermissionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsResponse 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.ExperimentalComputablePermissionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalComputablePermissionsResponse 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.ExperimentalComputablePermissionsResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalComputablePermissionsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalComputablePermissionsResponse) + com.authzed.api.v1.ExperimentalComputablePermissionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalComputablePermissionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalComputablePermissionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalComputablePermissionsResponse.class, com.authzed.api.v1.ExperimentalComputablePermissionsResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalComputablePermissionsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (permissionsBuilder_ == null) { + permissions_ = java.util.Collections.emptyList(); + } else { + permissions_ = null; + permissionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalComputablePermissionsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalComputablePermissionsResponse getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalComputablePermissionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalComputablePermissionsResponse build() { + com.authzed.api.v1.ExperimentalComputablePermissionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalComputablePermissionsResponse buildPartial() { + com.authzed.api.v1.ExperimentalComputablePermissionsResponse result = new com.authzed.api.v1.ExperimentalComputablePermissionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.ExperimentalComputablePermissionsResponse result) { + if (permissionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + permissions_ = java.util.Collections.unmodifiableList(permissions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.permissions_ = permissions_; + } else { + result.permissions_ = permissionsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalComputablePermissionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.readAt_ = readAtBuilder_ == null + ? readAt_ + : readAtBuilder_.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.ExperimentalComputablePermissionsResponse) { + return mergeFrom((com.authzed.api.v1.ExperimentalComputablePermissionsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalComputablePermissionsResponse other) { + if (other == com.authzed.api.v1.ExperimentalComputablePermissionsResponse.getDefaultInstance()) return this; + if (permissionsBuilder_ == null) { + if (!other.permissions_.isEmpty()) { + if (permissions_.isEmpty()) { + permissions_ = other.permissions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePermissionsIsMutable(); + permissions_.addAll(other.permissions_); + } + onChanged(); + } + } else { + if (!other.permissions_.isEmpty()) { + if (permissionsBuilder_.isEmpty()) { + permissionsBuilder_.dispose(); + permissionsBuilder_ = null; + permissions_ = other.permissions_; + bitField0_ = (bitField0_ & ~0x00000001); + permissionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPermissionsFieldBuilder() : null; + } else { + permissionsBuilder_.addAllMessages(other.permissions_); + } + } + } + if (other.hasReadAt()) { + mergeReadAt(other.getReadAt()); + } + 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.ExpRelationReference m = + input.readMessage( + com.authzed.api.v1.ExpRelationReference.parser(), + extensionRegistry); + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.add(m); + } else { + permissionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + getReadAtFieldBuilder().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.util.List permissions_ = + java.util.Collections.emptyList(); + private void ensurePermissionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + permissions_ = new java.util.ArrayList(permissions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpRelationReference, com.authzed.api.v1.ExpRelationReference.Builder, com.authzed.api.v1.ExpRelationReferenceOrBuilder> permissionsBuilder_; + + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public java.util.List getPermissionsList() { + if (permissionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(permissions_); + } else { + return permissionsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public int getPermissionsCount() { + if (permissionsBuilder_ == null) { + return permissions_.size(); + } else { + return permissionsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public com.authzed.api.v1.ExpRelationReference getPermissions(int index) { + if (permissionsBuilder_ == null) { + return permissions_.get(index); + } else { + return permissionsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public Builder setPermissions( + int index, com.authzed.api.v1.ExpRelationReference value) { + if (permissionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.set(index, value); + onChanged(); + } else { + permissionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public Builder setPermissions( + int index, com.authzed.api.v1.ExpRelationReference.Builder builderForValue) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.set(index, builderForValue.build()); + onChanged(); + } else { + permissionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public Builder addPermissions(com.authzed.api.v1.ExpRelationReference value) { + if (permissionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(value); + onChanged(); + } else { + permissionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public Builder addPermissions( + int index, com.authzed.api.v1.ExpRelationReference value) { + if (permissionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(index, value); + onChanged(); + } else { + permissionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public Builder addPermissions( + com.authzed.api.v1.ExpRelationReference.Builder builderForValue) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.add(builderForValue.build()); + onChanged(); + } else { + permissionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public Builder addPermissions( + int index, com.authzed.api.v1.ExpRelationReference.Builder builderForValue) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.add(index, builderForValue.build()); + onChanged(); + } else { + permissionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public Builder addAllPermissions( + java.lang.Iterable values) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, permissions_); + onChanged(); + } else { + permissionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public Builder clearPermissions() { + if (permissionsBuilder_ == null) { + permissions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + permissionsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public Builder removePermissions(int index) { + if (permissionsBuilder_ == null) { + ensurePermissionsIsMutable(); + permissions_.remove(index); + onChanged(); + } else { + permissionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public com.authzed.api.v1.ExpRelationReference.Builder getPermissionsBuilder( + int index) { + return getPermissionsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public com.authzed.api.v1.ExpRelationReferenceOrBuilder getPermissionsOrBuilder( + int index) { + if (permissionsBuilder_ == null) { + return permissions_.get(index); } else { + return permissionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public java.util.List + getPermissionsOrBuilderList() { + if (permissionsBuilder_ != null) { + return permissionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(permissions_); + } + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public com.authzed.api.v1.ExpRelationReference.Builder addPermissionsBuilder() { + return getPermissionsFieldBuilder().addBuilder( + com.authzed.api.v1.ExpRelationReference.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public com.authzed.api.v1.ExpRelationReference.Builder addPermissionsBuilder( + int index) { + return getPermissionsFieldBuilder().addBuilder( + index, com.authzed.api.v1.ExpRelationReference.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + public java.util.List + getPermissionsBuilderList() { + return getPermissionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpRelationReference, com.authzed.api.v1.ExpRelationReference.Builder, com.authzed.api.v1.ExpRelationReferenceOrBuilder> + getPermissionsFieldBuilder() { + if (permissionsBuilder_ == null) { + permissionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpRelationReference, com.authzed.api.v1.ExpRelationReference.Builder, com.authzed.api.v1.ExpRelationReferenceOrBuilder>( + permissions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + permissions_ = null; + } + return permissionsBuilder_; + } + + private com.authzed.api.v1.ZedToken readAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> readAtBuilder_; + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + public boolean hasReadAt() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return The readAt. + */ + public com.authzed.api.v1.ZedToken getReadAt() { + if (readAtBuilder_ == null) { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } else { + return readAtBuilder_.getMessage(); + } + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder setReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readAt_ = value; + } else { + readAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder setReadAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (readAtBuilder_ == null) { + readAt_ = builderForValue.build(); + } else { + readAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder mergeReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + readAt_ != null && + readAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getReadAtBuilder().mergeFrom(value); + } else { + readAt_ = value; + } + } else { + readAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder clearReadAt() { + bitField0_ = (bitField0_ & ~0x00000002); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getReadAtBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getReadAtFieldBuilder().getBuilder(); + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + if (readAtBuilder_ != null) { + return readAtBuilder_.getMessageOrBuilder(); + } else { + return readAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getReadAtFieldBuilder() { + if (readAtBuilder_ == null) { + readAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getReadAt(), + getParentForChildren(), + isClean()); + readAt_ = null; + } + return readAtBuilder_; + } + @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.ExperimentalComputablePermissionsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalComputablePermissionsResponse) + private static final com.authzed.api.v1.ExperimentalComputablePermissionsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalComputablePermissionsResponse(); + } + + public static com.authzed.api.v1.ExperimentalComputablePermissionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalComputablePermissionsResponse 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.ExperimentalComputablePermissionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalComputablePermissionsResponseOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalComputablePermissionsResponseOrBuilder.java new file mode 100644 index 00000000..f977f59e --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalComputablePermissionsResponseOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalComputablePermissionsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalComputablePermissionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + java.util.List + getPermissionsList(); + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + com.authzed.api.v1.ExpRelationReference getPermissions(int index); + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + int getPermissionsCount(); + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + java.util.List + getPermissionsOrBuilderList(); + /** + * repeated .authzed.api.v1.ExpRelationReference permissions = 1 [json_name = "permissions"]; + */ + com.authzed.api.v1.ExpRelationReferenceOrBuilder getPermissionsOrBuilder( + int index); + + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + boolean hasReadAt(); + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return The readAt. + */ + com.authzed.api.v1.ZedToken getReadAt(); + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalCountRelationshipsRequest.java b/generated/com/authzed/api/v1/ExperimentalCountRelationshipsRequest.java new file mode 100644 index 00000000..9d8483a5 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalCountRelationshipsRequest.java @@ -0,0 +1,572 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalCountRelationshipsRequest} + */ +public final class ExperimentalCountRelationshipsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalCountRelationshipsRequest) + ExperimentalCountRelationshipsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalCountRelationshipsRequest.newBuilder() to construct. + private ExperimentalCountRelationshipsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalCountRelationshipsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalCountRelationshipsRequest(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalCountRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalCountRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalCountRelationshipsRequest.class, com.authzed.api.v1.ExperimentalCountRelationshipsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * name is the name of the counter whose count is being requested.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + *
+   * name is the name of the counter whose count is being requested.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.ExperimentalCountRelationshipsRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalCountRelationshipsRequest other = (com.authzed.api.v1.ExperimentalCountRelationshipsRequest) obj; + + if (!getName() + .equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalCountRelationshipsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsRequest 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.ExperimentalCountRelationshipsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsRequest 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.ExperimentalCountRelationshipsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsRequest 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.ExperimentalCountRelationshipsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsRequest 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.ExperimentalCountRelationshipsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsRequest 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.ExperimentalCountRelationshipsRequest 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalCountRelationshipsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalCountRelationshipsRequest) + com.authzed.api.v1.ExperimentalCountRelationshipsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalCountRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalCountRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalCountRelationshipsRequest.class, com.authzed.api.v1.ExperimentalCountRelationshipsRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalCountRelationshipsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalCountRelationshipsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalCountRelationshipsRequest getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalCountRelationshipsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalCountRelationshipsRequest build() { + com.authzed.api.v1.ExperimentalCountRelationshipsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalCountRelationshipsRequest buildPartial() { + com.authzed.api.v1.ExperimentalCountRelationshipsRequest result = new com.authzed.api.v1.ExperimentalCountRelationshipsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalCountRelationshipsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.ExperimentalCountRelationshipsRequest) { + return mergeFrom((com.authzed.api.v1.ExperimentalCountRelationshipsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalCountRelationshipsRequest other) { + if (other == com.authzed.api.v1.ExperimentalCountRelationshipsRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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: { + name_ = 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 name_ = ""; + /** + *
+     * name is the name of the counter whose count is being requested.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * name is the name of the counter whose count is being requested.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * name is the name of the counter whose count is being requested.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * name is the name of the counter whose count is being requested.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * name is the name of the counter whose count is being requested.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = 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.ExperimentalCountRelationshipsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalCountRelationshipsRequest) + private static final com.authzed.api.v1.ExperimentalCountRelationshipsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalCountRelationshipsRequest(); + } + + public static com.authzed.api.v1.ExperimentalCountRelationshipsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalCountRelationshipsRequest 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.ExperimentalCountRelationshipsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalCountRelationshipsRequestOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalCountRelationshipsRequestOrBuilder.java new file mode 100644 index 00000000..3199b6ef --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalCountRelationshipsRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalCountRelationshipsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalCountRelationshipsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * name is the name of the counter whose count is being requested.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * name is the name of the counter whose count is being requested.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalCountRelationshipsResponse.java b/generated/com/authzed/api/v1/ExperimentalCountRelationshipsResponse.java new file mode 100644 index 00000000..0af843f4 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalCountRelationshipsResponse.java @@ -0,0 +1,854 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalCountRelationshipsResponse} + */ +public final class ExperimentalCountRelationshipsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalCountRelationshipsResponse) + ExperimentalCountRelationshipsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalCountRelationshipsResponse.newBuilder() to construct. + private ExperimentalCountRelationshipsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalCountRelationshipsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalCountRelationshipsResponse(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalCountRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalCountRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalCountRelationshipsResponse.class, com.authzed.api.v1.ExperimentalCountRelationshipsResponse.Builder.class); + } + + private int counterResultCase_ = 0; + private java.lang.Object counterResult_; + public enum CounterResultCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + COUNTER_STILL_CALCULATING(1), + READ_COUNTER_VALUE(2), + COUNTERRESULT_NOT_SET(0); + private final int value; + private CounterResultCase(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 CounterResultCase valueOf(int value) { + return forNumber(value); + } + + public static CounterResultCase forNumber(int value) { + switch (value) { + case 1: return COUNTER_STILL_CALCULATING; + case 2: return READ_COUNTER_VALUE; + case 0: return COUNTERRESULT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public CounterResultCase + getCounterResultCase() { + return CounterResultCase.forNumber( + counterResultCase_); + } + + public static final int COUNTER_STILL_CALCULATING_FIELD_NUMBER = 1; + /** + *
+   * counter_still_calculating is true if the counter is still calculating the count.
+   * 
+ * + * bool counter_still_calculating = 1 [json_name = "counterStillCalculating"]; + * @return Whether the counterStillCalculating field is set. + */ + @java.lang.Override + public boolean hasCounterStillCalculating() { + return counterResultCase_ == 1; + } + /** + *
+   * counter_still_calculating is true if the counter is still calculating the count.
+   * 
+ * + * bool counter_still_calculating = 1 [json_name = "counterStillCalculating"]; + * @return The counterStillCalculating. + */ + @java.lang.Override + public boolean getCounterStillCalculating() { + if (counterResultCase_ == 1) { + return (java.lang.Boolean) counterResult_; + } + return false; + } + + public static final int READ_COUNTER_VALUE_FIELD_NUMBER = 2; + /** + *
+   * read_counter_value is the value of the counter at the time of the read.
+   * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + * @return Whether the readCounterValue field is set. + */ + @java.lang.Override + public boolean hasReadCounterValue() { + return counterResultCase_ == 2; + } + /** + *
+   * read_counter_value is the value of the counter at the time of the read.
+   * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + * @return The readCounterValue. + */ + @java.lang.Override + public com.authzed.api.v1.ReadCounterValue getReadCounterValue() { + if (counterResultCase_ == 2) { + return (com.authzed.api.v1.ReadCounterValue) counterResult_; + } + return com.authzed.api.v1.ReadCounterValue.getDefaultInstance(); + } + /** + *
+   * read_counter_value is the value of the counter at the time of the read.
+   * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + */ + @java.lang.Override + public com.authzed.api.v1.ReadCounterValueOrBuilder getReadCounterValueOrBuilder() { + if (counterResultCase_ == 2) { + return (com.authzed.api.v1.ReadCounterValue) counterResult_; + } + return com.authzed.api.v1.ReadCounterValue.getDefaultInstance(); + } + + 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 (counterResultCase_ == 1) { + output.writeBool( + 1, (boolean)((java.lang.Boolean) counterResult_)); + } + if (counterResultCase_ == 2) { + output.writeMessage(2, (com.authzed.api.v1.ReadCounterValue) counterResult_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (counterResultCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 1, (boolean)((java.lang.Boolean) counterResult_)); + } + if (counterResultCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.authzed.api.v1.ReadCounterValue) counterResult_); + } + 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.ExperimentalCountRelationshipsResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalCountRelationshipsResponse other = (com.authzed.api.v1.ExperimentalCountRelationshipsResponse) obj; + + if (!getCounterResultCase().equals(other.getCounterResultCase())) return false; + switch (counterResultCase_) { + case 1: + if (getCounterStillCalculating() + != other.getCounterStillCalculating()) return false; + break; + case 2: + if (!getReadCounterValue() + .equals(other.getReadCounterValue())) 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(); + switch (counterResultCase_) { + case 1: + hash = (37 * hash) + COUNTER_STILL_CALCULATING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCounterStillCalculating()); + break; + case 2: + hash = (37 * hash) + READ_COUNTER_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getReadCounterValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalCountRelationshipsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsResponse 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.ExperimentalCountRelationshipsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsResponse 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.ExperimentalCountRelationshipsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsResponse 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.ExperimentalCountRelationshipsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsResponse 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.ExperimentalCountRelationshipsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalCountRelationshipsResponse 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.ExperimentalCountRelationshipsResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalCountRelationshipsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalCountRelationshipsResponse) + com.authzed.api.v1.ExperimentalCountRelationshipsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalCountRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalCountRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalCountRelationshipsResponse.class, com.authzed.api.v1.ExperimentalCountRelationshipsResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalCountRelationshipsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (readCounterValueBuilder_ != null) { + readCounterValueBuilder_.clear(); + } + counterResultCase_ = 0; + counterResult_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalCountRelationshipsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalCountRelationshipsResponse getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalCountRelationshipsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalCountRelationshipsResponse build() { + com.authzed.api.v1.ExperimentalCountRelationshipsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalCountRelationshipsResponse buildPartial() { + com.authzed.api.v1.ExperimentalCountRelationshipsResponse result = new com.authzed.api.v1.ExperimentalCountRelationshipsResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalCountRelationshipsResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.authzed.api.v1.ExperimentalCountRelationshipsResponse result) { + result.counterResultCase_ = counterResultCase_; + result.counterResult_ = this.counterResult_; + if (counterResultCase_ == 2 && + readCounterValueBuilder_ != null) { + result.counterResult_ = readCounterValueBuilder_.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.ExperimentalCountRelationshipsResponse) { + return mergeFrom((com.authzed.api.v1.ExperimentalCountRelationshipsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalCountRelationshipsResponse other) { + if (other == com.authzed.api.v1.ExperimentalCountRelationshipsResponse.getDefaultInstance()) return this; + switch (other.getCounterResultCase()) { + case COUNTER_STILL_CALCULATING: { + setCounterStillCalculating(other.getCounterStillCalculating()); + break; + } + case READ_COUNTER_VALUE: { + mergeReadCounterValue(other.getReadCounterValue()); + break; + } + case COUNTERRESULT_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 8: { + counterResult_ = input.readBool(); + counterResultCase_ = 1; + break; + } // case 8 + case 18: { + input.readMessage( + getReadCounterValueFieldBuilder().getBuilder(), + extensionRegistry); + counterResultCase_ = 2; + 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 counterResultCase_ = 0; + private java.lang.Object counterResult_; + public CounterResultCase + getCounterResultCase() { + return CounterResultCase.forNumber( + counterResultCase_); + } + + public Builder clearCounterResult() { + counterResultCase_ = 0; + counterResult_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * counter_still_calculating is true if the counter is still calculating the count.
+     * 
+ * + * bool counter_still_calculating = 1 [json_name = "counterStillCalculating"]; + * @return Whether the counterStillCalculating field is set. + */ + public boolean hasCounterStillCalculating() { + return counterResultCase_ == 1; + } + /** + *
+     * counter_still_calculating is true if the counter is still calculating the count.
+     * 
+ * + * bool counter_still_calculating = 1 [json_name = "counterStillCalculating"]; + * @return The counterStillCalculating. + */ + public boolean getCounterStillCalculating() { + if (counterResultCase_ == 1) { + return (java.lang.Boolean) counterResult_; + } + return false; + } + /** + *
+     * counter_still_calculating is true if the counter is still calculating the count.
+     * 
+ * + * bool counter_still_calculating = 1 [json_name = "counterStillCalculating"]; + * @param value The counterStillCalculating to set. + * @return This builder for chaining. + */ + public Builder setCounterStillCalculating(boolean value) { + + counterResultCase_ = 1; + counterResult_ = value; + onChanged(); + return this; + } + /** + *
+     * counter_still_calculating is true if the counter is still calculating the count.
+     * 
+ * + * bool counter_still_calculating = 1 [json_name = "counterStillCalculating"]; + * @return This builder for chaining. + */ + public Builder clearCounterStillCalculating() { + if (counterResultCase_ == 1) { + counterResultCase_ = 0; + counterResult_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ReadCounterValue, com.authzed.api.v1.ReadCounterValue.Builder, com.authzed.api.v1.ReadCounterValueOrBuilder> readCounterValueBuilder_; + /** + *
+     * read_counter_value is the value of the counter at the time of the read.
+     * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + * @return Whether the readCounterValue field is set. + */ + @java.lang.Override + public boolean hasReadCounterValue() { + return counterResultCase_ == 2; + } + /** + *
+     * read_counter_value is the value of the counter at the time of the read.
+     * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + * @return The readCounterValue. + */ + @java.lang.Override + public com.authzed.api.v1.ReadCounterValue getReadCounterValue() { + if (readCounterValueBuilder_ == null) { + if (counterResultCase_ == 2) { + return (com.authzed.api.v1.ReadCounterValue) counterResult_; + } + return com.authzed.api.v1.ReadCounterValue.getDefaultInstance(); + } else { + if (counterResultCase_ == 2) { + return readCounterValueBuilder_.getMessage(); + } + return com.authzed.api.v1.ReadCounterValue.getDefaultInstance(); + } + } + /** + *
+     * read_counter_value is the value of the counter at the time of the read.
+     * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + */ + public Builder setReadCounterValue(com.authzed.api.v1.ReadCounterValue value) { + if (readCounterValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + counterResult_ = value; + onChanged(); + } else { + readCounterValueBuilder_.setMessage(value); + } + counterResultCase_ = 2; + return this; + } + /** + *
+     * read_counter_value is the value of the counter at the time of the read.
+     * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + */ + public Builder setReadCounterValue( + com.authzed.api.v1.ReadCounterValue.Builder builderForValue) { + if (readCounterValueBuilder_ == null) { + counterResult_ = builderForValue.build(); + onChanged(); + } else { + readCounterValueBuilder_.setMessage(builderForValue.build()); + } + counterResultCase_ = 2; + return this; + } + /** + *
+     * read_counter_value is the value of the counter at the time of the read.
+     * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + */ + public Builder mergeReadCounterValue(com.authzed.api.v1.ReadCounterValue value) { + if (readCounterValueBuilder_ == null) { + if (counterResultCase_ == 2 && + counterResult_ != com.authzed.api.v1.ReadCounterValue.getDefaultInstance()) { + counterResult_ = com.authzed.api.v1.ReadCounterValue.newBuilder((com.authzed.api.v1.ReadCounterValue) counterResult_) + .mergeFrom(value).buildPartial(); + } else { + counterResult_ = value; + } + onChanged(); + } else { + if (counterResultCase_ == 2) { + readCounterValueBuilder_.mergeFrom(value); + } else { + readCounterValueBuilder_.setMessage(value); + } + } + counterResultCase_ = 2; + return this; + } + /** + *
+     * read_counter_value is the value of the counter at the time of the read.
+     * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + */ + public Builder clearReadCounterValue() { + if (readCounterValueBuilder_ == null) { + if (counterResultCase_ == 2) { + counterResultCase_ = 0; + counterResult_ = null; + onChanged(); + } + } else { + if (counterResultCase_ == 2) { + counterResultCase_ = 0; + counterResult_ = null; + } + readCounterValueBuilder_.clear(); + } + return this; + } + /** + *
+     * read_counter_value is the value of the counter at the time of the read.
+     * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + */ + public com.authzed.api.v1.ReadCounterValue.Builder getReadCounterValueBuilder() { + return getReadCounterValueFieldBuilder().getBuilder(); + } + /** + *
+     * read_counter_value is the value of the counter at the time of the read.
+     * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + */ + @java.lang.Override + public com.authzed.api.v1.ReadCounterValueOrBuilder getReadCounterValueOrBuilder() { + if ((counterResultCase_ == 2) && (readCounterValueBuilder_ != null)) { + return readCounterValueBuilder_.getMessageOrBuilder(); + } else { + if (counterResultCase_ == 2) { + return (com.authzed.api.v1.ReadCounterValue) counterResult_; + } + return com.authzed.api.v1.ReadCounterValue.getDefaultInstance(); + } + } + /** + *
+     * read_counter_value is the value of the counter at the time of the read.
+     * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ReadCounterValue, com.authzed.api.v1.ReadCounterValue.Builder, com.authzed.api.v1.ReadCounterValueOrBuilder> + getReadCounterValueFieldBuilder() { + if (readCounterValueBuilder_ == null) { + if (!(counterResultCase_ == 2)) { + counterResult_ = com.authzed.api.v1.ReadCounterValue.getDefaultInstance(); + } + readCounterValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ReadCounterValue, com.authzed.api.v1.ReadCounterValue.Builder, com.authzed.api.v1.ReadCounterValueOrBuilder>( + (com.authzed.api.v1.ReadCounterValue) counterResult_, + getParentForChildren(), + isClean()); + counterResult_ = null; + } + counterResultCase_ = 2; + onChanged(); + return readCounterValueBuilder_; + } + @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.ExperimentalCountRelationshipsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalCountRelationshipsResponse) + private static final com.authzed.api.v1.ExperimentalCountRelationshipsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalCountRelationshipsResponse(); + } + + public static com.authzed.api.v1.ExperimentalCountRelationshipsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalCountRelationshipsResponse 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.ExperimentalCountRelationshipsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalCountRelationshipsResponseOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalCountRelationshipsResponseOrBuilder.java new file mode 100644 index 00000000..f35c6a52 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalCountRelationshipsResponseOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalCountRelationshipsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalCountRelationshipsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * counter_still_calculating is true if the counter is still calculating the count.
+   * 
+ * + * bool counter_still_calculating = 1 [json_name = "counterStillCalculating"]; + * @return Whether the counterStillCalculating field is set. + */ + boolean hasCounterStillCalculating(); + /** + *
+   * counter_still_calculating is true if the counter is still calculating the count.
+   * 
+ * + * bool counter_still_calculating = 1 [json_name = "counterStillCalculating"]; + * @return The counterStillCalculating. + */ + boolean getCounterStillCalculating(); + + /** + *
+   * read_counter_value is the value of the counter at the time of the read.
+   * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + * @return Whether the readCounterValue field is set. + */ + boolean hasReadCounterValue(); + /** + *
+   * read_counter_value is the value of the counter at the time of the read.
+   * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + * @return The readCounterValue. + */ + com.authzed.api.v1.ReadCounterValue getReadCounterValue(); + /** + *
+   * read_counter_value is the value of the counter at the time of the read.
+   * 
+ * + * .authzed.api.v1.ReadCounterValue read_counter_value = 2 [json_name = "readCounterValue"]; + */ + com.authzed.api.v1.ReadCounterValueOrBuilder getReadCounterValueOrBuilder(); + + public com.authzed.api.v1.ExperimentalCountRelationshipsResponse.CounterResultCase getCounterResultCase(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalDependentRelationsRequest.java b/generated/com/authzed/api/v1/ExperimentalDependentRelationsRequest.java new file mode 100644 index 00000000..06831e12 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalDependentRelationsRequest.java @@ -0,0 +1,861 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalDependentRelationsRequest} + */ +public final class ExperimentalDependentRelationsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalDependentRelationsRequest) + ExperimentalDependentRelationsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalDependentRelationsRequest.newBuilder() to construct. + private ExperimentalDependentRelationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalDependentRelationsRequest() { + definitionName_ = ""; + permissionName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalDependentRelationsRequest(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDependentRelationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDependentRelationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalDependentRelationsRequest.class, com.authzed.api.v1.ExperimentalDependentRelationsRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int DEFINITION_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object definitionName_ = ""; + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The definitionName. + */ + @java.lang.Override + public java.lang.String getDefinitionName() { + java.lang.Object ref = definitionName_; + 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(); + definitionName_ = s; + return s; + } + } + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The bytes for definitionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefinitionNameBytes() { + java.lang.Object ref = definitionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + definitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object permissionName_ = ""; + /** + * string permission_name = 3 [json_name = "permissionName"]; + * @return The permissionName. + */ + @java.lang.Override + public java.lang.String getPermissionName() { + java.lang.Object ref = permissionName_; + 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(); + permissionName_ = s; + return s; + } + } + /** + * string permission_name = 3 [json_name = "permissionName"]; + * @return The bytes for permissionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionNameBytes() { + java.lang.Object ref = permissionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permissionName_ = 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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(definitionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, definitionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permissionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, permissionName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(definitionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, definitionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permissionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, permissionName_); + } + 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.ExperimentalDependentRelationsRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalDependentRelationsRequest other = (com.authzed.api.v1.ExperimentalDependentRelationsRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (!getDefinitionName() + .equals(other.getDefinitionName())) return false; + if (!getPermissionName() + .equals(other.getPermissionName())) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + hash = (37 * hash) + DEFINITION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDefinitionName().hashCode(); + hash = (37 * hash) + PERMISSION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPermissionName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalDependentRelationsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsRequest 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.ExperimentalDependentRelationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsRequest 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.ExperimentalDependentRelationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsRequest 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.ExperimentalDependentRelationsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsRequest 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.ExperimentalDependentRelationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsRequest 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.ExperimentalDependentRelationsRequest 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalDependentRelationsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalDependentRelationsRequest) + com.authzed.api.v1.ExperimentalDependentRelationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDependentRelationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDependentRelationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalDependentRelationsRequest.class, com.authzed.api.v1.ExperimentalDependentRelationsRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalDependentRelationsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + definitionName_ = ""; + permissionName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDependentRelationsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDependentRelationsRequest getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalDependentRelationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDependentRelationsRequest build() { + com.authzed.api.v1.ExperimentalDependentRelationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDependentRelationsRequest buildPartial() { + com.authzed.api.v1.ExperimentalDependentRelationsRequest result = new com.authzed.api.v1.ExperimentalDependentRelationsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalDependentRelationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.definitionName_ = definitionName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permissionName_ = permissionName_; + } + } + + @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.ExperimentalDependentRelationsRequest) { + return mergeFrom((com.authzed.api.v1.ExperimentalDependentRelationsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalDependentRelationsRequest other) { + if (other == com.authzed.api.v1.ExperimentalDependentRelationsRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (!other.getDefinitionName().isEmpty()) { + definitionName_ = other.definitionName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPermissionName().isEmpty()) { + permissionName_ = other.permissionName_; + bitField0_ |= 0x00000004; + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + definitionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + permissionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private java.lang.Object definitionName_ = ""; + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The definitionName. + */ + public java.lang.String getDefinitionName() { + java.lang.Object ref = definitionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + definitionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The bytes for definitionName. + */ + public com.google.protobuf.ByteString + getDefinitionNameBytes() { + java.lang.Object ref = definitionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + definitionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @param value The definitionName to set. + * @return This builder for chaining. + */ + public Builder setDefinitionName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + definitionName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return This builder for chaining. + */ + public Builder clearDefinitionName() { + definitionName_ = getDefaultInstance().getDefinitionName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @param value The bytes for definitionName to set. + * @return This builder for chaining. + */ + public Builder setDefinitionNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + definitionName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object permissionName_ = ""; + /** + * string permission_name = 3 [json_name = "permissionName"]; + * @return The permissionName. + */ + public java.lang.String getPermissionName() { + java.lang.Object ref = permissionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permissionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string permission_name = 3 [json_name = "permissionName"]; + * @return The bytes for permissionName. + */ + public com.google.protobuf.ByteString + getPermissionNameBytes() { + java.lang.Object ref = permissionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permissionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string permission_name = 3 [json_name = "permissionName"]; + * @param value The permissionName to set. + * @return This builder for chaining. + */ + public Builder setPermissionName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permissionName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string permission_name = 3 [json_name = "permissionName"]; + * @return This builder for chaining. + */ + public Builder clearPermissionName() { + permissionName_ = getDefaultInstance().getPermissionName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string permission_name = 3 [json_name = "permissionName"]; + * @param value The bytes for permissionName to set. + * @return This builder for chaining. + */ + public Builder setPermissionNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permissionName_ = value; + bitField0_ |= 0x00000004; + 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.ExperimentalDependentRelationsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalDependentRelationsRequest) + private static final com.authzed.api.v1.ExperimentalDependentRelationsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalDependentRelationsRequest(); + } + + public static com.authzed.api.v1.ExperimentalDependentRelationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalDependentRelationsRequest 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.ExperimentalDependentRelationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalDependentRelationsRequestOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalDependentRelationsRequestOrBuilder.java new file mode 100644 index 00000000..93d82521 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalDependentRelationsRequestOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalDependentRelationsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalDependentRelationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The definitionName. + */ + java.lang.String getDefinitionName(); + /** + * string definition_name = 2 [json_name = "definitionName"]; + * @return The bytes for definitionName. + */ + com.google.protobuf.ByteString + getDefinitionNameBytes(); + + /** + * string permission_name = 3 [json_name = "permissionName"]; + * @return The permissionName. + */ + java.lang.String getPermissionName(); + /** + * string permission_name = 3 [json_name = "permissionName"]; + * @return The bytes for permissionName. + */ + com.google.protobuf.ByteString + getPermissionNameBytes(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalDependentRelationsResponse.java b/generated/com/authzed/api/v1/ExperimentalDependentRelationsResponse.java new file mode 100644 index 00000000..a0853a99 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalDependentRelationsResponse.java @@ -0,0 +1,991 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalDependentRelationsResponse} + */ +public final class ExperimentalDependentRelationsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalDependentRelationsResponse) + ExperimentalDependentRelationsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalDependentRelationsResponse.newBuilder() to construct. + private ExperimentalDependentRelationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalDependentRelationsResponse() { + relations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalDependentRelationsResponse(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDependentRelationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDependentRelationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalDependentRelationsResponse.class, com.authzed.api.v1.ExperimentalDependentRelationsResponse.Builder.class); + } + + public static final int RELATIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List relations_; + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + @java.lang.Override + public java.util.List getRelationsList() { + return relations_; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + @java.lang.Override + public java.util.List + getRelationsOrBuilderList() { + return relations_; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + @java.lang.Override + public int getRelationsCount() { + return relations_.size(); + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationReference getRelations(int index) { + return relations_.get(index); + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpRelationReferenceOrBuilder getRelationsOrBuilder( + int index) { + return relations_.get(index); + } + + public static final int READ_AT_FIELD_NUMBER = 2; + private com.authzed.api.v1.ZedToken readAt_; + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + @java.lang.Override + public boolean hasReadAt() { + return readAt_ != null; + } + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return The readAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getReadAt() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + + 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 < relations_.size(); i++) { + output.writeMessage(1, relations_.get(i)); + } + if (readAt_ != null) { + output.writeMessage(2, getReadAt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < relations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, relations_.get(i)); + } + if (readAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReadAt()); + } + 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.ExperimentalDependentRelationsResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalDependentRelationsResponse other = (com.authzed.api.v1.ExperimentalDependentRelationsResponse) obj; + + if (!getRelationsList() + .equals(other.getRelationsList())) return false; + if (hasReadAt() != other.hasReadAt()) return false; + if (hasReadAt()) { + if (!getReadAt() + .equals(other.getReadAt())) 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 (getRelationsCount() > 0) { + hash = (37 * hash) + RELATIONS_FIELD_NUMBER; + hash = (53 * hash) + getRelationsList().hashCode(); + } + if (hasReadAt()) { + hash = (37 * hash) + READ_AT_FIELD_NUMBER; + hash = (53 * hash) + getReadAt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalDependentRelationsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsResponse 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.ExperimentalDependentRelationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsResponse 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.ExperimentalDependentRelationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsResponse 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.ExperimentalDependentRelationsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsResponse 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.ExperimentalDependentRelationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDependentRelationsResponse 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.ExperimentalDependentRelationsResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalDependentRelationsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalDependentRelationsResponse) + com.authzed.api.v1.ExperimentalDependentRelationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDependentRelationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDependentRelationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalDependentRelationsResponse.class, com.authzed.api.v1.ExperimentalDependentRelationsResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalDependentRelationsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (relationsBuilder_ == null) { + relations_ = java.util.Collections.emptyList(); + } else { + relations_ = null; + relationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDependentRelationsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDependentRelationsResponse getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalDependentRelationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDependentRelationsResponse build() { + com.authzed.api.v1.ExperimentalDependentRelationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDependentRelationsResponse buildPartial() { + com.authzed.api.v1.ExperimentalDependentRelationsResponse result = new com.authzed.api.v1.ExperimentalDependentRelationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.ExperimentalDependentRelationsResponse result) { + if (relationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + relations_ = java.util.Collections.unmodifiableList(relations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.relations_ = relations_; + } else { + result.relations_ = relationsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalDependentRelationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.readAt_ = readAtBuilder_ == null + ? readAt_ + : readAtBuilder_.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.ExperimentalDependentRelationsResponse) { + return mergeFrom((com.authzed.api.v1.ExperimentalDependentRelationsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalDependentRelationsResponse other) { + if (other == com.authzed.api.v1.ExperimentalDependentRelationsResponse.getDefaultInstance()) return this; + if (relationsBuilder_ == null) { + if (!other.relations_.isEmpty()) { + if (relations_.isEmpty()) { + relations_ = other.relations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRelationsIsMutable(); + relations_.addAll(other.relations_); + } + onChanged(); + } + } else { + if (!other.relations_.isEmpty()) { + if (relationsBuilder_.isEmpty()) { + relationsBuilder_.dispose(); + relationsBuilder_ = null; + relations_ = other.relations_; + bitField0_ = (bitField0_ & ~0x00000001); + relationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelationsFieldBuilder() : null; + } else { + relationsBuilder_.addAllMessages(other.relations_); + } + } + } + if (other.hasReadAt()) { + mergeReadAt(other.getReadAt()); + } + 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.ExpRelationReference m = + input.readMessage( + com.authzed.api.v1.ExpRelationReference.parser(), + extensionRegistry); + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + relations_.add(m); + } else { + relationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + getReadAtFieldBuilder().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.util.List relations_ = + java.util.Collections.emptyList(); + private void ensureRelationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + relations_ = new java.util.ArrayList(relations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpRelationReference, com.authzed.api.v1.ExpRelationReference.Builder, com.authzed.api.v1.ExpRelationReferenceOrBuilder> relationsBuilder_; + + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public java.util.List getRelationsList() { + if (relationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(relations_); + } else { + return relationsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public int getRelationsCount() { + if (relationsBuilder_ == null) { + return relations_.size(); + } else { + return relationsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public com.authzed.api.v1.ExpRelationReference getRelations(int index) { + if (relationsBuilder_ == null) { + return relations_.get(index); + } else { + return relationsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public Builder setRelations( + int index, com.authzed.api.v1.ExpRelationReference value) { + if (relationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationsIsMutable(); + relations_.set(index, value); + onChanged(); + } else { + relationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public Builder setRelations( + int index, com.authzed.api.v1.ExpRelationReference.Builder builderForValue) { + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + relations_.set(index, builderForValue.build()); + onChanged(); + } else { + relationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public Builder addRelations(com.authzed.api.v1.ExpRelationReference value) { + if (relationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationsIsMutable(); + relations_.add(value); + onChanged(); + } else { + relationsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public Builder addRelations( + int index, com.authzed.api.v1.ExpRelationReference value) { + if (relationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationsIsMutable(); + relations_.add(index, value); + onChanged(); + } else { + relationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public Builder addRelations( + com.authzed.api.v1.ExpRelationReference.Builder builderForValue) { + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + relations_.add(builderForValue.build()); + onChanged(); + } else { + relationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public Builder addRelations( + int index, com.authzed.api.v1.ExpRelationReference.Builder builderForValue) { + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + relations_.add(index, builderForValue.build()); + onChanged(); + } else { + relationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public Builder addAllRelations( + java.lang.Iterable values) { + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relations_); + onChanged(); + } else { + relationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public Builder clearRelations() { + if (relationsBuilder_ == null) { + relations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + relationsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public Builder removeRelations(int index) { + if (relationsBuilder_ == null) { + ensureRelationsIsMutable(); + relations_.remove(index); + onChanged(); + } else { + relationsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public com.authzed.api.v1.ExpRelationReference.Builder getRelationsBuilder( + int index) { + return getRelationsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public com.authzed.api.v1.ExpRelationReferenceOrBuilder getRelationsOrBuilder( + int index) { + if (relationsBuilder_ == null) { + return relations_.get(index); } else { + return relationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public java.util.List + getRelationsOrBuilderList() { + if (relationsBuilder_ != null) { + return relationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relations_); + } + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public com.authzed.api.v1.ExpRelationReference.Builder addRelationsBuilder() { + return getRelationsFieldBuilder().addBuilder( + com.authzed.api.v1.ExpRelationReference.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public com.authzed.api.v1.ExpRelationReference.Builder addRelationsBuilder( + int index) { + return getRelationsFieldBuilder().addBuilder( + index, com.authzed.api.v1.ExpRelationReference.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + public java.util.List + getRelationsBuilderList() { + return getRelationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpRelationReference, com.authzed.api.v1.ExpRelationReference.Builder, com.authzed.api.v1.ExpRelationReferenceOrBuilder> + getRelationsFieldBuilder() { + if (relationsBuilder_ == null) { + relationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpRelationReference, com.authzed.api.v1.ExpRelationReference.Builder, com.authzed.api.v1.ExpRelationReferenceOrBuilder>( + relations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + relations_ = null; + } + return relationsBuilder_; + } + + private com.authzed.api.v1.ZedToken readAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> readAtBuilder_; + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + public boolean hasReadAt() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return The readAt. + */ + public com.authzed.api.v1.ZedToken getReadAt() { + if (readAtBuilder_ == null) { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } else { + return readAtBuilder_.getMessage(); + } + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder setReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readAt_ = value; + } else { + readAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder setReadAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (readAtBuilder_ == null) { + readAt_ = builderForValue.build(); + } else { + readAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder mergeReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + readAt_ != null && + readAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getReadAtBuilder().mergeFrom(value); + } else { + readAt_ = value; + } + } else { + readAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder clearReadAt() { + bitField0_ = (bitField0_ & ~0x00000002); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getReadAtBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getReadAtFieldBuilder().getBuilder(); + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + if (readAtBuilder_ != null) { + return readAtBuilder_.getMessageOrBuilder(); + } else { + return readAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getReadAtFieldBuilder() { + if (readAtBuilder_ == null) { + readAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getReadAt(), + getParentForChildren(), + isClean()); + readAt_ = null; + } + return readAtBuilder_; + } + @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.ExperimentalDependentRelationsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalDependentRelationsResponse) + private static final com.authzed.api.v1.ExperimentalDependentRelationsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalDependentRelationsResponse(); + } + + public static com.authzed.api.v1.ExperimentalDependentRelationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalDependentRelationsResponse 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.ExperimentalDependentRelationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalDependentRelationsResponseOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalDependentRelationsResponseOrBuilder.java new file mode 100644 index 00000000..105727dc --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalDependentRelationsResponseOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalDependentRelationsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalDependentRelationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + java.util.List + getRelationsList(); + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + com.authzed.api.v1.ExpRelationReference getRelations(int index); + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + int getRelationsCount(); + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + java.util.List + getRelationsOrBuilderList(); + /** + * repeated .authzed.api.v1.ExpRelationReference relations = 1 [json_name = "relations"]; + */ + com.authzed.api.v1.ExpRelationReferenceOrBuilder getRelationsOrBuilder( + int index); + + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + boolean hasReadAt(); + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return The readAt. + */ + com.authzed.api.v1.ZedToken getReadAt(); + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalDiffSchemaRequest.java b/generated/com/authzed/api/v1/ExperimentalDiffSchemaRequest.java new file mode 100644 index 00000000..966d81d7 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalDiffSchemaRequest.java @@ -0,0 +1,725 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalDiffSchemaRequest} + */ +public final class ExperimentalDiffSchemaRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalDiffSchemaRequest) + ExperimentalDiffSchemaRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalDiffSchemaRequest.newBuilder() to construct. + private ExperimentalDiffSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalDiffSchemaRequest() { + comparisonSchema_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalDiffSchemaRequest(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDiffSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDiffSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalDiffSchemaRequest.class, com.authzed.api.v1.ExperimentalDiffSchemaRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int COMPARISON_SCHEMA_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object comparisonSchema_ = ""; + /** + * string comparison_schema = 2 [json_name = "comparisonSchema"]; + * @return The comparisonSchema. + */ + @java.lang.Override + public java.lang.String getComparisonSchema() { + java.lang.Object ref = comparisonSchema_; + 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(); + comparisonSchema_ = s; + return s; + } + } + /** + * string comparison_schema = 2 [json_name = "comparisonSchema"]; + * @return The bytes for comparisonSchema. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getComparisonSchemaBytes() { + java.lang.Object ref = comparisonSchema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comparisonSchema_ = 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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comparisonSchema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comparisonSchema_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comparisonSchema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, comparisonSchema_); + } + 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.ExperimentalDiffSchemaRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalDiffSchemaRequest other = (com.authzed.api.v1.ExperimentalDiffSchemaRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (!getComparisonSchema() + .equals(other.getComparisonSchema())) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + hash = (37 * hash) + COMPARISON_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getComparisonSchema().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalDiffSchemaRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaRequest 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.ExperimentalDiffSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaRequest 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.ExperimentalDiffSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaRequest 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.ExperimentalDiffSchemaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaRequest 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.ExperimentalDiffSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaRequest 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.ExperimentalDiffSchemaRequest 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalDiffSchemaRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalDiffSchemaRequest) + com.authzed.api.v1.ExperimentalDiffSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDiffSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDiffSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalDiffSchemaRequest.class, com.authzed.api.v1.ExperimentalDiffSchemaRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalDiffSchemaRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + comparisonSchema_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDiffSchemaRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDiffSchemaRequest getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalDiffSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDiffSchemaRequest build() { + com.authzed.api.v1.ExperimentalDiffSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDiffSchemaRequest buildPartial() { + com.authzed.api.v1.ExperimentalDiffSchemaRequest result = new com.authzed.api.v1.ExperimentalDiffSchemaRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalDiffSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.comparisonSchema_ = comparisonSchema_; + } + } + + @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.ExperimentalDiffSchemaRequest) { + return mergeFrom((com.authzed.api.v1.ExperimentalDiffSchemaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalDiffSchemaRequest other) { + if (other == com.authzed.api.v1.ExperimentalDiffSchemaRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (!other.getComparisonSchema().isEmpty()) { + comparisonSchema_ = other.comparisonSchema_; + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + comparisonSchema_ = 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.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private java.lang.Object comparisonSchema_ = ""; + /** + * string comparison_schema = 2 [json_name = "comparisonSchema"]; + * @return The comparisonSchema. + */ + public java.lang.String getComparisonSchema() { + java.lang.Object ref = comparisonSchema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comparisonSchema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string comparison_schema = 2 [json_name = "comparisonSchema"]; + * @return The bytes for comparisonSchema. + */ + public com.google.protobuf.ByteString + getComparisonSchemaBytes() { + java.lang.Object ref = comparisonSchema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + comparisonSchema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string comparison_schema = 2 [json_name = "comparisonSchema"]; + * @param value The comparisonSchema to set. + * @return This builder for chaining. + */ + public Builder setComparisonSchema( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + comparisonSchema_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string comparison_schema = 2 [json_name = "comparisonSchema"]; + * @return This builder for chaining. + */ + public Builder clearComparisonSchema() { + comparisonSchema_ = getDefaultInstance().getComparisonSchema(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string comparison_schema = 2 [json_name = "comparisonSchema"]; + * @param value The bytes for comparisonSchema to set. + * @return This builder for chaining. + */ + public Builder setComparisonSchemaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + comparisonSchema_ = 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.ExperimentalDiffSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalDiffSchemaRequest) + private static final com.authzed.api.v1.ExperimentalDiffSchemaRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalDiffSchemaRequest(); + } + + public static com.authzed.api.v1.ExperimentalDiffSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalDiffSchemaRequest 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.ExperimentalDiffSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalDiffSchemaRequestOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalDiffSchemaRequestOrBuilder.java new file mode 100644 index 00000000..9034c9ed --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalDiffSchemaRequestOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalDiffSchemaRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalDiffSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + * string comparison_schema = 2 [json_name = "comparisonSchema"]; + * @return The comparisonSchema. + */ + java.lang.String getComparisonSchema(); + /** + * string comparison_schema = 2 [json_name = "comparisonSchema"]; + * @return The bytes for comparisonSchema. + */ + com.google.protobuf.ByteString + getComparisonSchemaBytes(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalDiffSchemaResponse.java b/generated/com/authzed/api/v1/ExperimentalDiffSchemaResponse.java new file mode 100644 index 00000000..286459bb --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalDiffSchemaResponse.java @@ -0,0 +1,991 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalDiffSchemaResponse} + */ +public final class ExperimentalDiffSchemaResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalDiffSchemaResponse) + ExperimentalDiffSchemaResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalDiffSchemaResponse.newBuilder() to construct. + private ExperimentalDiffSchemaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalDiffSchemaResponse() { + diffs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalDiffSchemaResponse(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDiffSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDiffSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalDiffSchemaResponse.class, com.authzed.api.v1.ExperimentalDiffSchemaResponse.Builder.class); + } + + public static final int DIFFS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List diffs_; + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + @java.lang.Override + public java.util.List getDiffsList() { + return diffs_; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + @java.lang.Override + public java.util.List + getDiffsOrBuilderList() { + return diffs_; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + @java.lang.Override + public int getDiffsCount() { + return diffs_.size(); + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpSchemaDiff getDiffs(int index) { + return diffs_.get(index); + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpSchemaDiffOrBuilder getDiffsOrBuilder( + int index) { + return diffs_.get(index); + } + + public static final int READ_AT_FIELD_NUMBER = 2; + private com.authzed.api.v1.ZedToken readAt_; + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + @java.lang.Override + public boolean hasReadAt() { + return readAt_ != null; + } + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return The readAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getReadAt() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + + 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 < diffs_.size(); i++) { + output.writeMessage(1, diffs_.get(i)); + } + if (readAt_ != null) { + output.writeMessage(2, getReadAt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < diffs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, diffs_.get(i)); + } + if (readAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReadAt()); + } + 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.ExperimentalDiffSchemaResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalDiffSchemaResponse other = (com.authzed.api.v1.ExperimentalDiffSchemaResponse) obj; + + if (!getDiffsList() + .equals(other.getDiffsList())) return false; + if (hasReadAt() != other.hasReadAt()) return false; + if (hasReadAt()) { + if (!getReadAt() + .equals(other.getReadAt())) 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 (getDiffsCount() > 0) { + hash = (37 * hash) + DIFFS_FIELD_NUMBER; + hash = (53 * hash) + getDiffsList().hashCode(); + } + if (hasReadAt()) { + hash = (37 * hash) + READ_AT_FIELD_NUMBER; + hash = (53 * hash) + getReadAt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalDiffSchemaResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaResponse 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.ExperimentalDiffSchemaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaResponse 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.ExperimentalDiffSchemaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaResponse 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.ExperimentalDiffSchemaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaResponse 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.ExperimentalDiffSchemaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalDiffSchemaResponse 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.ExperimentalDiffSchemaResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalDiffSchemaResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalDiffSchemaResponse) + com.authzed.api.v1.ExperimentalDiffSchemaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDiffSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDiffSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalDiffSchemaResponse.class, com.authzed.api.v1.ExperimentalDiffSchemaResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalDiffSchemaResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (diffsBuilder_ == null) { + diffs_ = java.util.Collections.emptyList(); + } else { + diffs_ = null; + diffsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalDiffSchemaResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDiffSchemaResponse getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalDiffSchemaResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDiffSchemaResponse build() { + com.authzed.api.v1.ExperimentalDiffSchemaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalDiffSchemaResponse buildPartial() { + com.authzed.api.v1.ExperimentalDiffSchemaResponse result = new com.authzed.api.v1.ExperimentalDiffSchemaResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.ExperimentalDiffSchemaResponse result) { + if (diffsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + diffs_ = java.util.Collections.unmodifiableList(diffs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.diffs_ = diffs_; + } else { + result.diffs_ = diffsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalDiffSchemaResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.readAt_ = readAtBuilder_ == null + ? readAt_ + : readAtBuilder_.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.ExperimentalDiffSchemaResponse) { + return mergeFrom((com.authzed.api.v1.ExperimentalDiffSchemaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalDiffSchemaResponse other) { + if (other == com.authzed.api.v1.ExperimentalDiffSchemaResponse.getDefaultInstance()) return this; + if (diffsBuilder_ == null) { + if (!other.diffs_.isEmpty()) { + if (diffs_.isEmpty()) { + diffs_ = other.diffs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDiffsIsMutable(); + diffs_.addAll(other.diffs_); + } + onChanged(); + } + } else { + if (!other.diffs_.isEmpty()) { + if (diffsBuilder_.isEmpty()) { + diffsBuilder_.dispose(); + diffsBuilder_ = null; + diffs_ = other.diffs_; + bitField0_ = (bitField0_ & ~0x00000001); + diffsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDiffsFieldBuilder() : null; + } else { + diffsBuilder_.addAllMessages(other.diffs_); + } + } + } + if (other.hasReadAt()) { + mergeReadAt(other.getReadAt()); + } + 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.ExpSchemaDiff m = + input.readMessage( + com.authzed.api.v1.ExpSchemaDiff.parser(), + extensionRegistry); + if (diffsBuilder_ == null) { + ensureDiffsIsMutable(); + diffs_.add(m); + } else { + diffsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + getReadAtFieldBuilder().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.util.List diffs_ = + java.util.Collections.emptyList(); + private void ensureDiffsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + diffs_ = new java.util.ArrayList(diffs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpSchemaDiff, com.authzed.api.v1.ExpSchemaDiff.Builder, com.authzed.api.v1.ExpSchemaDiffOrBuilder> diffsBuilder_; + + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public java.util.List getDiffsList() { + if (diffsBuilder_ == null) { + return java.util.Collections.unmodifiableList(diffs_); + } else { + return diffsBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public int getDiffsCount() { + if (diffsBuilder_ == null) { + return diffs_.size(); + } else { + return diffsBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public com.authzed.api.v1.ExpSchemaDiff getDiffs(int index) { + if (diffsBuilder_ == null) { + return diffs_.get(index); + } else { + return diffsBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public Builder setDiffs( + int index, com.authzed.api.v1.ExpSchemaDiff value) { + if (diffsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiffsIsMutable(); + diffs_.set(index, value); + onChanged(); + } else { + diffsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public Builder setDiffs( + int index, com.authzed.api.v1.ExpSchemaDiff.Builder builderForValue) { + if (diffsBuilder_ == null) { + ensureDiffsIsMutable(); + diffs_.set(index, builderForValue.build()); + onChanged(); + } else { + diffsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public Builder addDiffs(com.authzed.api.v1.ExpSchemaDiff value) { + if (diffsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiffsIsMutable(); + diffs_.add(value); + onChanged(); + } else { + diffsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public Builder addDiffs( + int index, com.authzed.api.v1.ExpSchemaDiff value) { + if (diffsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiffsIsMutable(); + diffs_.add(index, value); + onChanged(); + } else { + diffsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public Builder addDiffs( + com.authzed.api.v1.ExpSchemaDiff.Builder builderForValue) { + if (diffsBuilder_ == null) { + ensureDiffsIsMutable(); + diffs_.add(builderForValue.build()); + onChanged(); + } else { + diffsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public Builder addDiffs( + int index, com.authzed.api.v1.ExpSchemaDiff.Builder builderForValue) { + if (diffsBuilder_ == null) { + ensureDiffsIsMutable(); + diffs_.add(index, builderForValue.build()); + onChanged(); + } else { + diffsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public Builder addAllDiffs( + java.lang.Iterable values) { + if (diffsBuilder_ == null) { + ensureDiffsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, diffs_); + onChanged(); + } else { + diffsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public Builder clearDiffs() { + if (diffsBuilder_ == null) { + diffs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + diffsBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public Builder removeDiffs(int index) { + if (diffsBuilder_ == null) { + ensureDiffsIsMutable(); + diffs_.remove(index); + onChanged(); + } else { + diffsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public com.authzed.api.v1.ExpSchemaDiff.Builder getDiffsBuilder( + int index) { + return getDiffsFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public com.authzed.api.v1.ExpSchemaDiffOrBuilder getDiffsOrBuilder( + int index) { + if (diffsBuilder_ == null) { + return diffs_.get(index); } else { + return diffsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public java.util.List + getDiffsOrBuilderList() { + if (diffsBuilder_ != null) { + return diffsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(diffs_); + } + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public com.authzed.api.v1.ExpSchemaDiff.Builder addDiffsBuilder() { + return getDiffsFieldBuilder().addBuilder( + com.authzed.api.v1.ExpSchemaDiff.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public com.authzed.api.v1.ExpSchemaDiff.Builder addDiffsBuilder( + int index) { + return getDiffsFieldBuilder().addBuilder( + index, com.authzed.api.v1.ExpSchemaDiff.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + public java.util.List + getDiffsBuilderList() { + return getDiffsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpSchemaDiff, com.authzed.api.v1.ExpSchemaDiff.Builder, com.authzed.api.v1.ExpSchemaDiffOrBuilder> + getDiffsFieldBuilder() { + if (diffsBuilder_ == null) { + diffsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpSchemaDiff, com.authzed.api.v1.ExpSchemaDiff.Builder, com.authzed.api.v1.ExpSchemaDiffOrBuilder>( + diffs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + diffs_ = null; + } + return diffsBuilder_; + } + + private com.authzed.api.v1.ZedToken readAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> readAtBuilder_; + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + public boolean hasReadAt() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return The readAt. + */ + public com.authzed.api.v1.ZedToken getReadAt() { + if (readAtBuilder_ == null) { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } else { + return readAtBuilder_.getMessage(); + } + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder setReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readAt_ = value; + } else { + readAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder setReadAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (readAtBuilder_ == null) { + readAt_ = builderForValue.build(); + } else { + readAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder mergeReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + readAt_ != null && + readAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getReadAtBuilder().mergeFrom(value); + } else { + readAt_ = value; + } + } else { + readAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public Builder clearReadAt() { + bitField0_ = (bitField0_ & ~0x00000002); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getReadAtBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getReadAtFieldBuilder().getBuilder(); + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + if (readAtBuilder_ != null) { + return readAtBuilder_.getMessageOrBuilder(); + } else { + return readAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getReadAtFieldBuilder() { + if (readAtBuilder_ == null) { + readAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getReadAt(), + getParentForChildren(), + isClean()); + readAt_ = null; + } + return readAtBuilder_; + } + @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.ExperimentalDiffSchemaResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalDiffSchemaResponse) + private static final com.authzed.api.v1.ExperimentalDiffSchemaResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalDiffSchemaResponse(); + } + + public static com.authzed.api.v1.ExperimentalDiffSchemaResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalDiffSchemaResponse 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.ExperimentalDiffSchemaResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalDiffSchemaResponseOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalDiffSchemaResponseOrBuilder.java new file mode 100644 index 00000000..29acc0b8 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalDiffSchemaResponseOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalDiffSchemaResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalDiffSchemaResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + java.util.List + getDiffsList(); + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + com.authzed.api.v1.ExpSchemaDiff getDiffs(int index); + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + int getDiffsCount(); + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + java.util.List + getDiffsOrBuilderList(); + /** + * repeated .authzed.api.v1.ExpSchemaDiff diffs = 1 [json_name = "diffs"]; + */ + com.authzed.api.v1.ExpSchemaDiffOrBuilder getDiffsOrBuilder( + int index); + + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + boolean hasReadAt(); + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + * @return The readAt. + */ + com.authzed.api.v1.ZedToken getReadAt(); + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalReflectSchemaRequest.java b/generated/com/authzed/api/v1/ExperimentalReflectSchemaRequest.java new file mode 100644 index 00000000..67c7dba1 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalReflectSchemaRequest.java @@ -0,0 +1,1058 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalReflectSchemaRequest} + */ +public final class ExperimentalReflectSchemaRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalReflectSchemaRequest) + ExperimentalReflectSchemaRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalReflectSchemaRequest.newBuilder() to construct. + private ExperimentalReflectSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalReflectSchemaRequest() { + optionalFilters_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalReflectSchemaRequest(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalReflectSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalReflectSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalReflectSchemaRequest.class, com.authzed.api.v1.ExperimentalReflectSchemaRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int OPTIONAL_FILTERS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List optionalFilters_; + /** + *
+   * optional_filters defines optional filters that are applied in
+   * an OR fashion to the schema, before being returned
+   * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + @java.lang.Override + public java.util.List getOptionalFiltersList() { + return optionalFilters_; + } + /** + *
+   * optional_filters defines optional filters that are applied in
+   * an OR fashion to the schema, before being returned
+   * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + @java.lang.Override + public java.util.List + getOptionalFiltersOrBuilderList() { + return optionalFilters_; + } + /** + *
+   * optional_filters defines optional filters that are applied in
+   * an OR fashion to the schema, before being returned
+   * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + @java.lang.Override + public int getOptionalFiltersCount() { + return optionalFilters_.size(); + } + /** + *
+   * optional_filters defines optional filters that are applied in
+   * an OR fashion to the schema, before being returned
+   * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpSchemaFilter getOptionalFilters(int index) { + return optionalFilters_.get(index); + } + /** + *
+   * optional_filters defines optional filters that are applied in
+   * an OR fashion to the schema, before being returned
+   * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpSchemaFilterOrBuilder getOptionalFiltersOrBuilder( + int index) { + return optionalFilters_.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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + for (int i = 0; i < optionalFilters_.size(); i++) { + output.writeMessage(2, optionalFilters_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + for (int i = 0; i < optionalFilters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, optionalFilters_.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.ExperimentalReflectSchemaRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalReflectSchemaRequest other = (com.authzed.api.v1.ExperimentalReflectSchemaRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (!getOptionalFiltersList() + .equals(other.getOptionalFiltersList())) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + if (getOptionalFiltersCount() > 0) { + hash = (37 * hash) + OPTIONAL_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getOptionalFiltersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalReflectSchemaRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaRequest 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.ExperimentalReflectSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaRequest 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.ExperimentalReflectSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaRequest 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.ExperimentalReflectSchemaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaRequest 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.ExperimentalReflectSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaRequest 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.ExperimentalReflectSchemaRequest 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalReflectSchemaRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalReflectSchemaRequest) + com.authzed.api.v1.ExperimentalReflectSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalReflectSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalReflectSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalReflectSchemaRequest.class, com.authzed.api.v1.ExperimentalReflectSchemaRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalReflectSchemaRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + if (optionalFiltersBuilder_ == null) { + optionalFilters_ = java.util.Collections.emptyList(); + } else { + optionalFilters_ = null; + optionalFiltersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalReflectSchemaRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalReflectSchemaRequest getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalReflectSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalReflectSchemaRequest build() { + com.authzed.api.v1.ExperimentalReflectSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalReflectSchemaRequest buildPartial() { + com.authzed.api.v1.ExperimentalReflectSchemaRequest result = new com.authzed.api.v1.ExperimentalReflectSchemaRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.ExperimentalReflectSchemaRequest result) { + if (optionalFiltersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + optionalFilters_ = java.util.Collections.unmodifiableList(optionalFilters_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.optionalFilters_ = optionalFilters_; + } else { + result.optionalFilters_ = optionalFiltersBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalReflectSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.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.ExperimentalReflectSchemaRequest) { + return mergeFrom((com.authzed.api.v1.ExperimentalReflectSchemaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalReflectSchemaRequest other) { + if (other == com.authzed.api.v1.ExperimentalReflectSchemaRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (optionalFiltersBuilder_ == null) { + if (!other.optionalFilters_.isEmpty()) { + if (optionalFilters_.isEmpty()) { + optionalFilters_ = other.optionalFilters_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOptionalFiltersIsMutable(); + optionalFilters_.addAll(other.optionalFilters_); + } + onChanged(); + } + } else { + if (!other.optionalFilters_.isEmpty()) { + if (optionalFiltersBuilder_.isEmpty()) { + optionalFiltersBuilder_.dispose(); + optionalFiltersBuilder_ = null; + optionalFilters_ = other.optionalFilters_; + bitField0_ = (bitField0_ & ~0x00000002); + optionalFiltersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOptionalFiltersFieldBuilder() : null; + } else { + optionalFiltersBuilder_.addAllMessages(other.optionalFilters_); + } + } + } + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.authzed.api.v1.ExpSchemaFilter m = + input.readMessage( + com.authzed.api.v1.ExpSchemaFilter.parser(), + extensionRegistry); + if (optionalFiltersBuilder_ == null) { + ensureOptionalFiltersIsMutable(); + optionalFilters_.add(m); + } else { + optionalFiltersBuilder_.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 com.authzed.api.v1.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private java.util.List optionalFilters_ = + java.util.Collections.emptyList(); + private void ensureOptionalFiltersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + optionalFilters_ = new java.util.ArrayList(optionalFilters_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpSchemaFilter, com.authzed.api.v1.ExpSchemaFilter.Builder, com.authzed.api.v1.ExpSchemaFilterOrBuilder> optionalFiltersBuilder_; + + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public java.util.List getOptionalFiltersList() { + if (optionalFiltersBuilder_ == null) { + return java.util.Collections.unmodifiableList(optionalFilters_); + } else { + return optionalFiltersBuilder_.getMessageList(); + } + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public int getOptionalFiltersCount() { + if (optionalFiltersBuilder_ == null) { + return optionalFilters_.size(); + } else { + return optionalFiltersBuilder_.getCount(); + } + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public com.authzed.api.v1.ExpSchemaFilter getOptionalFilters(int index) { + if (optionalFiltersBuilder_ == null) { + return optionalFilters_.get(index); + } else { + return optionalFiltersBuilder_.getMessage(index); + } + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public Builder setOptionalFilters( + int index, com.authzed.api.v1.ExpSchemaFilter value) { + if (optionalFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalFiltersIsMutable(); + optionalFilters_.set(index, value); + onChanged(); + } else { + optionalFiltersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public Builder setOptionalFilters( + int index, com.authzed.api.v1.ExpSchemaFilter.Builder builderForValue) { + if (optionalFiltersBuilder_ == null) { + ensureOptionalFiltersIsMutable(); + optionalFilters_.set(index, builderForValue.build()); + onChanged(); + } else { + optionalFiltersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public Builder addOptionalFilters(com.authzed.api.v1.ExpSchemaFilter value) { + if (optionalFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalFiltersIsMutable(); + optionalFilters_.add(value); + onChanged(); + } else { + optionalFiltersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public Builder addOptionalFilters( + int index, com.authzed.api.v1.ExpSchemaFilter value) { + if (optionalFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalFiltersIsMutable(); + optionalFilters_.add(index, value); + onChanged(); + } else { + optionalFiltersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public Builder addOptionalFilters( + com.authzed.api.v1.ExpSchemaFilter.Builder builderForValue) { + if (optionalFiltersBuilder_ == null) { + ensureOptionalFiltersIsMutable(); + optionalFilters_.add(builderForValue.build()); + onChanged(); + } else { + optionalFiltersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public Builder addOptionalFilters( + int index, com.authzed.api.v1.ExpSchemaFilter.Builder builderForValue) { + if (optionalFiltersBuilder_ == null) { + ensureOptionalFiltersIsMutable(); + optionalFilters_.add(index, builderForValue.build()); + onChanged(); + } else { + optionalFiltersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public Builder addAllOptionalFilters( + java.lang.Iterable values) { + if (optionalFiltersBuilder_ == null) { + ensureOptionalFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, optionalFilters_); + onChanged(); + } else { + optionalFiltersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public Builder clearOptionalFilters() { + if (optionalFiltersBuilder_ == null) { + optionalFilters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + optionalFiltersBuilder_.clear(); + } + return this; + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public Builder removeOptionalFilters(int index) { + if (optionalFiltersBuilder_ == null) { + ensureOptionalFiltersIsMutable(); + optionalFilters_.remove(index); + onChanged(); + } else { + optionalFiltersBuilder_.remove(index); + } + return this; + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public com.authzed.api.v1.ExpSchemaFilter.Builder getOptionalFiltersBuilder( + int index) { + return getOptionalFiltersFieldBuilder().getBuilder(index); + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public com.authzed.api.v1.ExpSchemaFilterOrBuilder getOptionalFiltersOrBuilder( + int index) { + if (optionalFiltersBuilder_ == null) { + return optionalFilters_.get(index); } else { + return optionalFiltersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public java.util.List + getOptionalFiltersOrBuilderList() { + if (optionalFiltersBuilder_ != null) { + return optionalFiltersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(optionalFilters_); + } + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public com.authzed.api.v1.ExpSchemaFilter.Builder addOptionalFiltersBuilder() { + return getOptionalFiltersFieldBuilder().addBuilder( + com.authzed.api.v1.ExpSchemaFilter.getDefaultInstance()); + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public com.authzed.api.v1.ExpSchemaFilter.Builder addOptionalFiltersBuilder( + int index) { + return getOptionalFiltersFieldBuilder().addBuilder( + index, com.authzed.api.v1.ExpSchemaFilter.getDefaultInstance()); + } + /** + *
+     * optional_filters defines optional filters that are applied in
+     * an OR fashion to the schema, before being returned
+     * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + public java.util.List + getOptionalFiltersBuilderList() { + return getOptionalFiltersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpSchemaFilter, com.authzed.api.v1.ExpSchemaFilter.Builder, com.authzed.api.v1.ExpSchemaFilterOrBuilder> + getOptionalFiltersFieldBuilder() { + if (optionalFiltersBuilder_ == null) { + optionalFiltersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpSchemaFilter, com.authzed.api.v1.ExpSchemaFilter.Builder, com.authzed.api.v1.ExpSchemaFilterOrBuilder>( + optionalFilters_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + optionalFilters_ = null; + } + return optionalFiltersBuilder_; + } + @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.ExperimentalReflectSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalReflectSchemaRequest) + private static final com.authzed.api.v1.ExperimentalReflectSchemaRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalReflectSchemaRequest(); + } + + public static com.authzed.api.v1.ExperimentalReflectSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalReflectSchemaRequest 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.ExperimentalReflectSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalReflectSchemaRequestOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalReflectSchemaRequestOrBuilder.java new file mode 100644 index 00000000..df3cfe73 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalReflectSchemaRequestOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalReflectSchemaRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalReflectSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + *
+   * optional_filters defines optional filters that are applied in
+   * an OR fashion to the schema, before being returned
+   * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + java.util.List + getOptionalFiltersList(); + /** + *
+   * optional_filters defines optional filters that are applied in
+   * an OR fashion to the schema, before being returned
+   * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + com.authzed.api.v1.ExpSchemaFilter getOptionalFilters(int index); + /** + *
+   * optional_filters defines optional filters that are applied in
+   * an OR fashion to the schema, before being returned
+   * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + int getOptionalFiltersCount(); + /** + *
+   * optional_filters defines optional filters that are applied in
+   * an OR fashion to the schema, before being returned
+   * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + java.util.List + getOptionalFiltersOrBuilderList(); + /** + *
+   * optional_filters defines optional filters that are applied in
+   * an OR fashion to the schema, before being returned
+   * 
+ * + * repeated .authzed.api.v1.ExpSchemaFilter optional_filters = 2 [json_name = "optionalFilters"]; + */ + com.authzed.api.v1.ExpSchemaFilterOrBuilder getOptionalFiltersOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/ExperimentalReflectSchemaResponse.java b/generated/com/authzed/api/v1/ExperimentalReflectSchemaResponse.java new file mode 100644 index 00000000..263e01ed --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalReflectSchemaResponse.java @@ -0,0 +1,1525 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalReflectSchemaResponse} + */ +public final class ExperimentalReflectSchemaResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalReflectSchemaResponse) + ExperimentalReflectSchemaResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalReflectSchemaResponse.newBuilder() to construct. + private ExperimentalReflectSchemaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalReflectSchemaResponse() { + definitions_ = java.util.Collections.emptyList(); + caveats_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalReflectSchemaResponse(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalReflectSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalReflectSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalReflectSchemaResponse.class, com.authzed.api.v1.ExperimentalReflectSchemaResponse.Builder.class); + } + + public static final int DEFINITIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List definitions_; + /** + *
+   * definitions are the definitions defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + @java.lang.Override + public java.util.List getDefinitionsList() { + return definitions_; + } + /** + *
+   * definitions are the definitions defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + @java.lang.Override + public java.util.List + getDefinitionsOrBuilderList() { + return definitions_; + } + /** + *
+   * definitions are the definitions defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + @java.lang.Override + public int getDefinitionsCount() { + return definitions_.size(); + } + /** + *
+   * definitions are the definitions defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinition getDefinitions(int index) { + return definitions_.get(index); + } + /** + *
+   * definitions are the definitions defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionsOrBuilder( + int index) { + return definitions_.get(index); + } + + public static final int CAVEATS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List caveats_; + /** + *
+   * caveats are the caveats defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + @java.lang.Override + public java.util.List getCaveatsList() { + return caveats_; + } + /** + *
+   * caveats are the caveats defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + @java.lang.Override + public java.util.List + getCaveatsOrBuilderList() { + return caveats_; + } + /** + *
+   * caveats are the caveats defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + @java.lang.Override + public int getCaveatsCount() { + return caveats_.size(); + } + /** + *
+   * caveats are the caveats defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveat getCaveats(int index) { + return caveats_.get(index); + } + /** + *
+   * caveats are the caveats defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + @java.lang.Override + public com.authzed.api.v1.ExpCaveatOrBuilder getCaveatsOrBuilder( + int index) { + return caveats_.get(index); + } + + public static final int READ_AT_FIELD_NUMBER = 3; + private com.authzed.api.v1.ZedToken readAt_; + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + @java.lang.Override + public boolean hasReadAt() { + return readAt_ != null; + } + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + * @return The readAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getReadAt() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + + 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 < definitions_.size(); i++) { + output.writeMessage(1, definitions_.get(i)); + } + for (int i = 0; i < caveats_.size(); i++) { + output.writeMessage(2, caveats_.get(i)); + } + if (readAt_ != null) { + output.writeMessage(3, getReadAt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < definitions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, definitions_.get(i)); + } + for (int i = 0; i < caveats_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, caveats_.get(i)); + } + if (readAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getReadAt()); + } + 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.ExperimentalReflectSchemaResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalReflectSchemaResponse other = (com.authzed.api.v1.ExperimentalReflectSchemaResponse) obj; + + if (!getDefinitionsList() + .equals(other.getDefinitionsList())) return false; + if (!getCaveatsList() + .equals(other.getCaveatsList())) return false; + if (hasReadAt() != other.hasReadAt()) return false; + if (hasReadAt()) { + if (!getReadAt() + .equals(other.getReadAt())) 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 (getDefinitionsCount() > 0) { + hash = (37 * hash) + DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getDefinitionsList().hashCode(); + } + if (getCaveatsCount() > 0) { + hash = (37 * hash) + CAVEATS_FIELD_NUMBER; + hash = (53 * hash) + getCaveatsList().hashCode(); + } + if (hasReadAt()) { + hash = (37 * hash) + READ_AT_FIELD_NUMBER; + hash = (53 * hash) + getReadAt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalReflectSchemaResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaResponse 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.ExperimentalReflectSchemaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaResponse 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.ExperimentalReflectSchemaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaResponse 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.ExperimentalReflectSchemaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaResponse 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.ExperimentalReflectSchemaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalReflectSchemaResponse 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.ExperimentalReflectSchemaResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalReflectSchemaResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalReflectSchemaResponse) + com.authzed.api.v1.ExperimentalReflectSchemaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalReflectSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalReflectSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalReflectSchemaResponse.class, com.authzed.api.v1.ExperimentalReflectSchemaResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalReflectSchemaResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (definitionsBuilder_ == null) { + definitions_ = java.util.Collections.emptyList(); + } else { + definitions_ = null; + definitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (caveatsBuilder_ == null) { + caveats_ = java.util.Collections.emptyList(); + } else { + caveats_ = null; + caveatsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalReflectSchemaResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalReflectSchemaResponse getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalReflectSchemaResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalReflectSchemaResponse build() { + com.authzed.api.v1.ExperimentalReflectSchemaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalReflectSchemaResponse buildPartial() { + com.authzed.api.v1.ExperimentalReflectSchemaResponse result = new com.authzed.api.v1.ExperimentalReflectSchemaResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.ExperimentalReflectSchemaResponse result) { + if (definitionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + definitions_ = java.util.Collections.unmodifiableList(definitions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.definitions_ = definitions_; + } else { + result.definitions_ = definitionsBuilder_.build(); + } + if (caveatsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + caveats_ = java.util.Collections.unmodifiableList(caveats_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.caveats_ = caveats_; + } else { + result.caveats_ = caveatsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalReflectSchemaResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.readAt_ = readAtBuilder_ == null + ? readAt_ + : readAtBuilder_.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.ExperimentalReflectSchemaResponse) { + return mergeFrom((com.authzed.api.v1.ExperimentalReflectSchemaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalReflectSchemaResponse other) { + if (other == com.authzed.api.v1.ExperimentalReflectSchemaResponse.getDefaultInstance()) return this; + if (definitionsBuilder_ == null) { + if (!other.definitions_.isEmpty()) { + if (definitions_.isEmpty()) { + definitions_ = other.definitions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDefinitionsIsMutable(); + definitions_.addAll(other.definitions_); + } + onChanged(); + } + } else { + if (!other.definitions_.isEmpty()) { + if (definitionsBuilder_.isEmpty()) { + definitionsBuilder_.dispose(); + definitionsBuilder_ = null; + definitions_ = other.definitions_; + bitField0_ = (bitField0_ & ~0x00000001); + definitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDefinitionsFieldBuilder() : null; + } else { + definitionsBuilder_.addAllMessages(other.definitions_); + } + } + } + if (caveatsBuilder_ == null) { + if (!other.caveats_.isEmpty()) { + if (caveats_.isEmpty()) { + caveats_ = other.caveats_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCaveatsIsMutable(); + caveats_.addAll(other.caveats_); + } + onChanged(); + } + } else { + if (!other.caveats_.isEmpty()) { + if (caveatsBuilder_.isEmpty()) { + caveatsBuilder_.dispose(); + caveatsBuilder_ = null; + caveats_ = other.caveats_; + bitField0_ = (bitField0_ & ~0x00000002); + caveatsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCaveatsFieldBuilder() : null; + } else { + caveatsBuilder_.addAllMessages(other.caveats_); + } + } + } + if (other.hasReadAt()) { + mergeReadAt(other.getReadAt()); + } + 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.ExpDefinition m = + input.readMessage( + com.authzed.api.v1.ExpDefinition.parser(), + extensionRegistry); + if (definitionsBuilder_ == null) { + ensureDefinitionsIsMutable(); + definitions_.add(m); + } else { + definitionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.authzed.api.v1.ExpCaveat m = + input.readMessage( + com.authzed.api.v1.ExpCaveat.parser(), + extensionRegistry); + if (caveatsBuilder_ == null) { + ensureCaveatsIsMutable(); + caveats_.add(m); + } else { + caveatsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + input.readMessage( + getReadAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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 definitions_ = + java.util.Collections.emptyList(); + private void ensureDefinitionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + definitions_ = new java.util.ArrayList(definitions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder> definitionsBuilder_; + + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public java.util.List getDefinitionsList() { + if (definitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(definitions_); + } else { + return definitionsBuilder_.getMessageList(); + } + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public int getDefinitionsCount() { + if (definitionsBuilder_ == null) { + return definitions_.size(); + } else { + return definitionsBuilder_.getCount(); + } + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public com.authzed.api.v1.ExpDefinition getDefinitions(int index) { + if (definitionsBuilder_ == null) { + return definitions_.get(index); + } else { + return definitionsBuilder_.getMessage(index); + } + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public Builder setDefinitions( + int index, com.authzed.api.v1.ExpDefinition value) { + if (definitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDefinitionsIsMutable(); + definitions_.set(index, value); + onChanged(); + } else { + definitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public Builder setDefinitions( + int index, com.authzed.api.v1.ExpDefinition.Builder builderForValue) { + if (definitionsBuilder_ == null) { + ensureDefinitionsIsMutable(); + definitions_.set(index, builderForValue.build()); + onChanged(); + } else { + definitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public Builder addDefinitions(com.authzed.api.v1.ExpDefinition value) { + if (definitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDefinitionsIsMutable(); + definitions_.add(value); + onChanged(); + } else { + definitionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public Builder addDefinitions( + int index, com.authzed.api.v1.ExpDefinition value) { + if (definitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDefinitionsIsMutable(); + definitions_.add(index, value); + onChanged(); + } else { + definitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public Builder addDefinitions( + com.authzed.api.v1.ExpDefinition.Builder builderForValue) { + if (definitionsBuilder_ == null) { + ensureDefinitionsIsMutable(); + definitions_.add(builderForValue.build()); + onChanged(); + } else { + definitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public Builder addDefinitions( + int index, com.authzed.api.v1.ExpDefinition.Builder builderForValue) { + if (definitionsBuilder_ == null) { + ensureDefinitionsIsMutable(); + definitions_.add(index, builderForValue.build()); + onChanged(); + } else { + definitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public Builder addAllDefinitions( + java.lang.Iterable values) { + if (definitionsBuilder_ == null) { + ensureDefinitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, definitions_); + onChanged(); + } else { + definitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public Builder clearDefinitions() { + if (definitionsBuilder_ == null) { + definitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + definitionsBuilder_.clear(); + } + return this; + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public Builder removeDefinitions(int index) { + if (definitionsBuilder_ == null) { + ensureDefinitionsIsMutable(); + definitions_.remove(index); + onChanged(); + } else { + definitionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public com.authzed.api.v1.ExpDefinition.Builder getDefinitionsBuilder( + int index) { + return getDefinitionsFieldBuilder().getBuilder(index); + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionsOrBuilder( + int index) { + if (definitionsBuilder_ == null) { + return definitions_.get(index); } else { + return definitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public java.util.List + getDefinitionsOrBuilderList() { + if (definitionsBuilder_ != null) { + return definitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(definitions_); + } + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public com.authzed.api.v1.ExpDefinition.Builder addDefinitionsBuilder() { + return getDefinitionsFieldBuilder().addBuilder( + com.authzed.api.v1.ExpDefinition.getDefaultInstance()); + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public com.authzed.api.v1.ExpDefinition.Builder addDefinitionsBuilder( + int index) { + return getDefinitionsFieldBuilder().addBuilder( + index, com.authzed.api.v1.ExpDefinition.getDefaultInstance()); + } + /** + *
+     * definitions are the definitions defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + public java.util.List + getDefinitionsBuilderList() { + return getDefinitionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder> + getDefinitionsFieldBuilder() { + if (definitionsBuilder_ == null) { + definitionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpDefinition, com.authzed.api.v1.ExpDefinition.Builder, com.authzed.api.v1.ExpDefinitionOrBuilder>( + definitions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + definitions_ = null; + } + return definitionsBuilder_; + } + + private java.util.List caveats_ = + java.util.Collections.emptyList(); + private void ensureCaveatsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + caveats_ = new java.util.ArrayList(caveats_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder> caveatsBuilder_; + + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public java.util.List getCaveatsList() { + if (caveatsBuilder_ == null) { + return java.util.Collections.unmodifiableList(caveats_); + } else { + return caveatsBuilder_.getMessageList(); + } + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public int getCaveatsCount() { + if (caveatsBuilder_ == null) { + return caveats_.size(); + } else { + return caveatsBuilder_.getCount(); + } + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public com.authzed.api.v1.ExpCaveat getCaveats(int index) { + if (caveatsBuilder_ == null) { + return caveats_.get(index); + } else { + return caveatsBuilder_.getMessage(index); + } + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public Builder setCaveats( + int index, com.authzed.api.v1.ExpCaveat value) { + if (caveatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaveatsIsMutable(); + caveats_.set(index, value); + onChanged(); + } else { + caveatsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public Builder setCaveats( + int index, com.authzed.api.v1.ExpCaveat.Builder builderForValue) { + if (caveatsBuilder_ == null) { + ensureCaveatsIsMutable(); + caveats_.set(index, builderForValue.build()); + onChanged(); + } else { + caveatsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public Builder addCaveats(com.authzed.api.v1.ExpCaveat value) { + if (caveatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaveatsIsMutable(); + caveats_.add(value); + onChanged(); + } else { + caveatsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public Builder addCaveats( + int index, com.authzed.api.v1.ExpCaveat value) { + if (caveatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaveatsIsMutable(); + caveats_.add(index, value); + onChanged(); + } else { + caveatsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public Builder addCaveats( + com.authzed.api.v1.ExpCaveat.Builder builderForValue) { + if (caveatsBuilder_ == null) { + ensureCaveatsIsMutable(); + caveats_.add(builderForValue.build()); + onChanged(); + } else { + caveatsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public Builder addCaveats( + int index, com.authzed.api.v1.ExpCaveat.Builder builderForValue) { + if (caveatsBuilder_ == null) { + ensureCaveatsIsMutable(); + caveats_.add(index, builderForValue.build()); + onChanged(); + } else { + caveatsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public Builder addAllCaveats( + java.lang.Iterable values) { + if (caveatsBuilder_ == null) { + ensureCaveatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, caveats_); + onChanged(); + } else { + caveatsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public Builder clearCaveats() { + if (caveatsBuilder_ == null) { + caveats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + caveatsBuilder_.clear(); + } + return this; + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public Builder removeCaveats(int index) { + if (caveatsBuilder_ == null) { + ensureCaveatsIsMutable(); + caveats_.remove(index); + onChanged(); + } else { + caveatsBuilder_.remove(index); + } + return this; + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public com.authzed.api.v1.ExpCaveat.Builder getCaveatsBuilder( + int index) { + return getCaveatsFieldBuilder().getBuilder(index); + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public com.authzed.api.v1.ExpCaveatOrBuilder getCaveatsOrBuilder( + int index) { + if (caveatsBuilder_ == null) { + return caveats_.get(index); } else { + return caveatsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public java.util.List + getCaveatsOrBuilderList() { + if (caveatsBuilder_ != null) { + return caveatsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(caveats_); + } + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public com.authzed.api.v1.ExpCaveat.Builder addCaveatsBuilder() { + return getCaveatsFieldBuilder().addBuilder( + com.authzed.api.v1.ExpCaveat.getDefaultInstance()); + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public com.authzed.api.v1.ExpCaveat.Builder addCaveatsBuilder( + int index) { + return getCaveatsFieldBuilder().addBuilder( + index, com.authzed.api.v1.ExpCaveat.getDefaultInstance()); + } + /** + *
+     * caveats are the caveats defined in the schema.
+     * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + public java.util.List + getCaveatsBuilderList() { + return getCaveatsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder> + getCaveatsFieldBuilder() { + if (caveatsBuilder_ == null) { + caveatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ExpCaveat, com.authzed.api.v1.ExpCaveat.Builder, com.authzed.api.v1.ExpCaveatOrBuilder>( + caveats_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + caveats_ = null; + } + return caveatsBuilder_; + } + + private com.authzed.api.v1.ZedToken readAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> readAtBuilder_; + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + public boolean hasReadAt() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + * @return The readAt. + */ + public com.authzed.api.v1.ZedToken getReadAt() { + if (readAtBuilder_ == null) { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } else { + return readAtBuilder_.getMessage(); + } + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + */ + public Builder setReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readAt_ = value; + } else { + readAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + */ + public Builder setReadAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (readAtBuilder_ == null) { + readAt_ = builderForValue.build(); + } else { + readAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + */ + public Builder mergeReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + readAt_ != null && + readAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getReadAtBuilder().mergeFrom(value); + } else { + readAt_ = value; + } + } else { + readAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + */ + public Builder clearReadAt() { + bitField0_ = (bitField0_ & ~0x00000004); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getReadAtBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getReadAtFieldBuilder().getBuilder(); + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + if (readAtBuilder_ != null) { + return readAtBuilder_.getMessageOrBuilder(); + } else { + return readAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getReadAtFieldBuilder() { + if (readAtBuilder_ == null) { + readAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getReadAt(), + getParentForChildren(), + isClean()); + readAt_ = null; + } + return readAtBuilder_; + } + @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.ExperimentalReflectSchemaResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalReflectSchemaResponse) + private static final com.authzed.api.v1.ExperimentalReflectSchemaResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalReflectSchemaResponse(); + } + + public static com.authzed.api.v1.ExperimentalReflectSchemaResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalReflectSchemaResponse 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.ExperimentalReflectSchemaResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalReflectSchemaResponseOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalReflectSchemaResponseOrBuilder.java new file mode 100644 index 00000000..15236143 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalReflectSchemaResponseOrBuilder.java @@ -0,0 +1,124 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalReflectSchemaResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalReflectSchemaResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * definitions are the definitions defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + java.util.List + getDefinitionsList(); + /** + *
+   * definitions are the definitions defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + com.authzed.api.v1.ExpDefinition getDefinitions(int index); + /** + *
+   * definitions are the definitions defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + int getDefinitionsCount(); + /** + *
+   * definitions are the definitions defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + java.util.List + getDefinitionsOrBuilderList(); + /** + *
+   * definitions are the definitions defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpDefinition definitions = 1 [json_name = "definitions"]; + */ + com.authzed.api.v1.ExpDefinitionOrBuilder getDefinitionsOrBuilder( + int index); + + /** + *
+   * caveats are the caveats defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + java.util.List + getCaveatsList(); + /** + *
+   * caveats are the caveats defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + com.authzed.api.v1.ExpCaveat getCaveats(int index); + /** + *
+   * caveats are the caveats defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + int getCaveatsCount(); + /** + *
+   * caveats are the caveats defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + java.util.List + getCaveatsOrBuilderList(); + /** + *
+   * caveats are the caveats defined in the schema.
+   * 
+ * + * repeated .authzed.api.v1.ExpCaveat caveats = 2 [json_name = "caveats"]; + */ + com.authzed.api.v1.ExpCaveatOrBuilder getCaveatsOrBuilder( + int index); + + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + * @return Whether the readAt field is set. + */ + boolean hasReadAt(); + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + * @return The readAt. + */ + com.authzed.api.v1.ZedToken getReadAt(); + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 3 [json_name = "readAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterRequest.java b/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterRequest.java new file mode 100644 index 00000000..7a2e1f37 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterRequest.java @@ -0,0 +1,813 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest} + */ +public final class ExperimentalRegisterRelationshipCounterRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest) + ExperimentalRegisterRelationshipCounterRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalRegisterRelationshipCounterRequest.newBuilder() to construct. + private ExperimentalRegisterRelationshipCounterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalRegisterRelationshipCounterRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalRegisterRelationshipCounterRequest(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest.class, com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * name is the name of the counter being registered.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + *
+   * name is the name of the counter being registered.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATIONSHIP_FILTER_FIELD_NUMBER = 2; + private com.authzed.api.v1.RelationshipFilter relationshipFilter_; + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be counted.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return Whether the relationshipFilter field is set. + */ + @java.lang.Override + public boolean hasRelationshipFilter() { + return relationshipFilter_ != null; + } + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be counted.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return The relationshipFilter. + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilter getRelationshipFilter() { + return relationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be counted.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilterOrBuilder getRelationshipFilterOrBuilder() { + return relationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (relationshipFilter_ != null) { + output.writeMessage(2, getRelationshipFilter()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (relationshipFilter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRelationshipFilter()); + } + 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.ExperimentalRegisterRelationshipCounterRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest other = (com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasRelationshipFilter() != other.hasRelationshipFilter()) return false; + if (hasRelationshipFilter()) { + if (!getRelationshipFilter() + .equals(other.getRelationshipFilter())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasRelationshipFilter()) { + hash = (37 * hash) + RELATIONSHIP_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipFilter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest 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.ExperimentalRegisterRelationshipCounterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest 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.ExperimentalRegisterRelationshipCounterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest 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.ExperimentalRegisterRelationshipCounterRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest 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.ExperimentalRegisterRelationshipCounterRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest 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.ExperimentalRegisterRelationshipCounterRequest 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest) + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest.class, com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + relationshipFilter_ = null; + if (relationshipFilterBuilder_ != null) { + relationshipFilterBuilder_.dispose(); + relationshipFilterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest build() { + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest buildPartial() { + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest result = new com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relationshipFilter_ = relationshipFilterBuilder_ == null + ? relationshipFilter_ + : relationshipFilterBuilder_.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.ExperimentalRegisterRelationshipCounterRequest) { + return mergeFrom((com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest other) { + if (other == com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasRelationshipFilter()) { + mergeRelationshipFilter(other.getRelationshipFilter()); + } + 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: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getRelationshipFilterFieldBuilder().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 name_ = ""; + /** + *
+     * name is the name of the counter being registered.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * name is the name of the counter being registered.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * name is the name of the counter being registered.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * name is the name of the counter being registered.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * name is the name of the counter being registered.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.authzed.api.v1.RelationshipFilter relationshipFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> relationshipFilterBuilder_; + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be counted.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return Whether the relationshipFilter field is set. + */ + public boolean hasRelationshipFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be counted.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return The relationshipFilter. + */ + public com.authzed.api.v1.RelationshipFilter getRelationshipFilter() { + if (relationshipFilterBuilder_ == null) { + return relationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } else { + return relationshipFilterBuilder_.getMessage(); + } + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be counted.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder setRelationshipFilter(com.authzed.api.v1.RelationshipFilter value) { + if (relationshipFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relationshipFilter_ = value; + } else { + relationshipFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be counted.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder setRelationshipFilter( + com.authzed.api.v1.RelationshipFilter.Builder builderForValue) { + if (relationshipFilterBuilder_ == null) { + relationshipFilter_ = builderForValue.build(); + } else { + relationshipFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be counted.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder mergeRelationshipFilter(com.authzed.api.v1.RelationshipFilter value) { + if (relationshipFilterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + relationshipFilter_ != null && + relationshipFilter_ != com.authzed.api.v1.RelationshipFilter.getDefaultInstance()) { + getRelationshipFilterBuilder().mergeFrom(value); + } else { + relationshipFilter_ = value; + } + } else { + relationshipFilterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be counted.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder clearRelationshipFilter() { + bitField0_ = (bitField0_ & ~0x00000002); + relationshipFilter_ = null; + if (relationshipFilterBuilder_ != null) { + relationshipFilterBuilder_.dispose(); + relationshipFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be counted.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipFilter.Builder getRelationshipFilterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRelationshipFilterFieldBuilder().getBuilder(); + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be counted.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipFilterOrBuilder getRelationshipFilterOrBuilder() { + if (relationshipFilterBuilder_ != null) { + return relationshipFilterBuilder_.getMessageOrBuilder(); + } else { + return relationshipFilter_ == null ? + com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be counted.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> + getRelationshipFilterFieldBuilder() { + if (relationshipFilterBuilder_ == null) { + relationshipFilterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder>( + getRelationshipFilter(), + getParentForChildren(), + isClean()); + relationshipFilter_ = null; + } + return relationshipFilterBuilder_; + } + @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.ExperimentalRegisterRelationshipCounterRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest) + private static final com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest(); + } + + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalRegisterRelationshipCounterRequest 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.ExperimentalRegisterRelationshipCounterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterRequestOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterRequestOrBuilder.java new file mode 100644 index 00000000..be7e020b --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterRequestOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalRegisterRelationshipCounterRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * name is the name of the counter being registered.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * name is the name of the counter being registered.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be counted.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return Whether the relationshipFilter field is set. + */ + boolean hasRelationshipFilter(); + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be counted.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return The relationshipFilter. + */ + com.authzed.api.v1.RelationshipFilter getRelationshipFilter(); + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be counted.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + com.authzed.api.v1.RelationshipFilterOrBuilder getRelationshipFilterOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterResponse.java b/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterResponse.java new file mode 100644 index 00000000..43522b71 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterResponse.java @@ -0,0 +1,401 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse} + */ +public final class ExperimentalRegisterRelationshipCounterResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse) + ExperimentalRegisterRelationshipCounterResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalRegisterRelationshipCounterResponse.newBuilder() to construct. + private ExperimentalRegisterRelationshipCounterResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalRegisterRelationshipCounterResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalRegisterRelationshipCounterResponse(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse.class, com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.ExperimentalRegisterRelationshipCounterResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse other = (com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse 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.ExperimentalRegisterRelationshipCounterResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse 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.ExperimentalRegisterRelationshipCounterResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse 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.ExperimentalRegisterRelationshipCounterResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse 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.ExperimentalRegisterRelationshipCounterResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse 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.ExperimentalRegisterRelationshipCounterResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse) + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse.class, com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse build() { + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse buildPartial() { + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse result = new com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse(this); + onBuilt(); + return result; + } + + @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.ExperimentalRegisterRelationshipCounterResponse) { + return mergeFrom((com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse other) { + if (other == com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse.getDefaultInstance()) return this; + 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; + 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; + } + @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.ExperimentalRegisterRelationshipCounterResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse) + private static final com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse(); + } + + public static com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalRegisterRelationshipCounterResponse 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.ExperimentalRegisterRelationshipCounterResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterResponseOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterResponseOrBuilder.java new file mode 100644 index 00000000..eadcc07f --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalRegisterRelationshipCounterResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalRegisterRelationshipCounterResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/generated/com/authzed/api/v1/ExperimentalServiceGrpc.java b/generated/com/authzed/api/v1/ExperimentalServiceGrpc.java new file mode 100644 index 00000000..8276ecc2 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalServiceGrpc.java @@ -0,0 +1,1137 @@ +package com.authzed.api.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * ExperimentalService exposes a number of APIs that are currently being
+ * prototyped and tested for future inclusion in the stable API.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: authzed/api/v1/experimental_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ExperimentalServiceGrpc { + + private ExperimentalServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "authzed.api.v1.ExperimentalService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getBulkImportRelationshipsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BulkImportRelationships", + requestType = com.authzed.api.v1.BulkImportRelationshipsRequest.class, + responseType = com.authzed.api.v1.BulkImportRelationshipsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING) + public static io.grpc.MethodDescriptor getBulkImportRelationshipsMethod() { + io.grpc.MethodDescriptor getBulkImportRelationshipsMethod; + if ((getBulkImportRelationshipsMethod = ExperimentalServiceGrpc.getBulkImportRelationshipsMethod) == null) { + synchronized (ExperimentalServiceGrpc.class) { + if ((getBulkImportRelationshipsMethod = ExperimentalServiceGrpc.getBulkImportRelationshipsMethod) == null) { + ExperimentalServiceGrpc.getBulkImportRelationshipsMethod = getBulkImportRelationshipsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BulkImportRelationships")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.BulkImportRelationshipsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.BulkImportRelationshipsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentalServiceMethodDescriptorSupplier("BulkImportRelationships")) + .build(); + } + } + } + return getBulkImportRelationshipsMethod; + } + + private static volatile io.grpc.MethodDescriptor getBulkExportRelationshipsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BulkExportRelationships", + requestType = com.authzed.api.v1.BulkExportRelationshipsRequest.class, + responseType = com.authzed.api.v1.BulkExportRelationshipsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getBulkExportRelationshipsMethod() { + io.grpc.MethodDescriptor getBulkExportRelationshipsMethod; + if ((getBulkExportRelationshipsMethod = ExperimentalServiceGrpc.getBulkExportRelationshipsMethod) == null) { + synchronized (ExperimentalServiceGrpc.class) { + if ((getBulkExportRelationshipsMethod = ExperimentalServiceGrpc.getBulkExportRelationshipsMethod) == null) { + ExperimentalServiceGrpc.getBulkExportRelationshipsMethod = getBulkExportRelationshipsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BulkExportRelationships")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.BulkExportRelationshipsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.BulkExportRelationshipsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentalServiceMethodDescriptorSupplier("BulkExportRelationships")) + .build(); + } + } + } + return getBulkExportRelationshipsMethod; + } + + private static volatile io.grpc.MethodDescriptor getBulkCheckPermissionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BulkCheckPermission", + requestType = com.authzed.api.v1.BulkCheckPermissionRequest.class, + responseType = com.authzed.api.v1.BulkCheckPermissionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBulkCheckPermissionMethod() { + io.grpc.MethodDescriptor getBulkCheckPermissionMethod; + if ((getBulkCheckPermissionMethod = ExperimentalServiceGrpc.getBulkCheckPermissionMethod) == null) { + synchronized (ExperimentalServiceGrpc.class) { + if ((getBulkCheckPermissionMethod = ExperimentalServiceGrpc.getBulkCheckPermissionMethod) == null) { + ExperimentalServiceGrpc.getBulkCheckPermissionMethod = getBulkCheckPermissionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BulkCheckPermission")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.BulkCheckPermissionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.BulkCheckPermissionResponse.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentalServiceMethodDescriptorSupplier("BulkCheckPermission")) + .build(); + } + } + } + return getBulkCheckPermissionMethod; + } + + private static volatile io.grpc.MethodDescriptor getExperimentalReflectSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExperimentalReflectSchema", + requestType = com.authzed.api.v1.ExperimentalReflectSchemaRequest.class, + responseType = com.authzed.api.v1.ExperimentalReflectSchemaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExperimentalReflectSchemaMethod() { + io.grpc.MethodDescriptor getExperimentalReflectSchemaMethod; + if ((getExperimentalReflectSchemaMethod = ExperimentalServiceGrpc.getExperimentalReflectSchemaMethod) == null) { + synchronized (ExperimentalServiceGrpc.class) { + if ((getExperimentalReflectSchemaMethod = ExperimentalServiceGrpc.getExperimentalReflectSchemaMethod) == null) { + ExperimentalServiceGrpc.getExperimentalReflectSchemaMethod = getExperimentalReflectSchemaMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExperimentalReflectSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalReflectSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalReflectSchemaResponse.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentalServiceMethodDescriptorSupplier("ExperimentalReflectSchema")) + .build(); + } + } + } + return getExperimentalReflectSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getExperimentalComputablePermissionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExperimentalComputablePermissions", + requestType = com.authzed.api.v1.ExperimentalComputablePermissionsRequest.class, + responseType = com.authzed.api.v1.ExperimentalComputablePermissionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExperimentalComputablePermissionsMethod() { + io.grpc.MethodDescriptor getExperimentalComputablePermissionsMethod; + if ((getExperimentalComputablePermissionsMethod = ExperimentalServiceGrpc.getExperimentalComputablePermissionsMethod) == null) { + synchronized (ExperimentalServiceGrpc.class) { + if ((getExperimentalComputablePermissionsMethod = ExperimentalServiceGrpc.getExperimentalComputablePermissionsMethod) == null) { + ExperimentalServiceGrpc.getExperimentalComputablePermissionsMethod = getExperimentalComputablePermissionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExperimentalComputablePermissions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalComputablePermissionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalComputablePermissionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentalServiceMethodDescriptorSupplier("ExperimentalComputablePermissions")) + .build(); + } + } + } + return getExperimentalComputablePermissionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getExperimentalDependentRelationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExperimentalDependentRelations", + requestType = com.authzed.api.v1.ExperimentalDependentRelationsRequest.class, + responseType = com.authzed.api.v1.ExperimentalDependentRelationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExperimentalDependentRelationsMethod() { + io.grpc.MethodDescriptor getExperimentalDependentRelationsMethod; + if ((getExperimentalDependentRelationsMethod = ExperimentalServiceGrpc.getExperimentalDependentRelationsMethod) == null) { + synchronized (ExperimentalServiceGrpc.class) { + if ((getExperimentalDependentRelationsMethod = ExperimentalServiceGrpc.getExperimentalDependentRelationsMethod) == null) { + ExperimentalServiceGrpc.getExperimentalDependentRelationsMethod = getExperimentalDependentRelationsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExperimentalDependentRelations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalDependentRelationsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalDependentRelationsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentalServiceMethodDescriptorSupplier("ExperimentalDependentRelations")) + .build(); + } + } + } + return getExperimentalDependentRelationsMethod; + } + + private static volatile io.grpc.MethodDescriptor getExperimentalDiffSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExperimentalDiffSchema", + requestType = com.authzed.api.v1.ExperimentalDiffSchemaRequest.class, + responseType = com.authzed.api.v1.ExperimentalDiffSchemaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExperimentalDiffSchemaMethod() { + io.grpc.MethodDescriptor getExperimentalDiffSchemaMethod; + if ((getExperimentalDiffSchemaMethod = ExperimentalServiceGrpc.getExperimentalDiffSchemaMethod) == null) { + synchronized (ExperimentalServiceGrpc.class) { + if ((getExperimentalDiffSchemaMethod = ExperimentalServiceGrpc.getExperimentalDiffSchemaMethod) == null) { + ExperimentalServiceGrpc.getExperimentalDiffSchemaMethod = getExperimentalDiffSchemaMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExperimentalDiffSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalDiffSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalDiffSchemaResponse.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentalServiceMethodDescriptorSupplier("ExperimentalDiffSchema")) + .build(); + } + } + } + return getExperimentalDiffSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getExperimentalRegisterRelationshipCounterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExperimentalRegisterRelationshipCounter", + requestType = com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest.class, + responseType = com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExperimentalRegisterRelationshipCounterMethod() { + io.grpc.MethodDescriptor getExperimentalRegisterRelationshipCounterMethod; + if ((getExperimentalRegisterRelationshipCounterMethod = ExperimentalServiceGrpc.getExperimentalRegisterRelationshipCounterMethod) == null) { + synchronized (ExperimentalServiceGrpc.class) { + if ((getExperimentalRegisterRelationshipCounterMethod = ExperimentalServiceGrpc.getExperimentalRegisterRelationshipCounterMethod) == null) { + ExperimentalServiceGrpc.getExperimentalRegisterRelationshipCounterMethod = getExperimentalRegisterRelationshipCounterMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExperimentalRegisterRelationshipCounter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentalServiceMethodDescriptorSupplier("ExperimentalRegisterRelationshipCounter")) + .build(); + } + } + } + return getExperimentalRegisterRelationshipCounterMethod; + } + + private static volatile io.grpc.MethodDescriptor getExperimentalCountRelationshipsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExperimentalCountRelationships", + requestType = com.authzed.api.v1.ExperimentalCountRelationshipsRequest.class, + responseType = com.authzed.api.v1.ExperimentalCountRelationshipsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExperimentalCountRelationshipsMethod() { + io.grpc.MethodDescriptor getExperimentalCountRelationshipsMethod; + if ((getExperimentalCountRelationshipsMethod = ExperimentalServiceGrpc.getExperimentalCountRelationshipsMethod) == null) { + synchronized (ExperimentalServiceGrpc.class) { + if ((getExperimentalCountRelationshipsMethod = ExperimentalServiceGrpc.getExperimentalCountRelationshipsMethod) == null) { + ExperimentalServiceGrpc.getExperimentalCountRelationshipsMethod = getExperimentalCountRelationshipsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExperimentalCountRelationships")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalCountRelationshipsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalCountRelationshipsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentalServiceMethodDescriptorSupplier("ExperimentalCountRelationships")) + .build(); + } + } + } + return getExperimentalCountRelationshipsMethod; + } + + private static volatile io.grpc.MethodDescriptor getExperimentalUnregisterRelationshipCounterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExperimentalUnregisterRelationshipCounter", + requestType = com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest.class, + responseType = com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExperimentalUnregisterRelationshipCounterMethod() { + io.grpc.MethodDescriptor getExperimentalUnregisterRelationshipCounterMethod; + if ((getExperimentalUnregisterRelationshipCounterMethod = ExperimentalServiceGrpc.getExperimentalUnregisterRelationshipCounterMethod) == null) { + synchronized (ExperimentalServiceGrpc.class) { + if ((getExperimentalUnregisterRelationshipCounterMethod = ExperimentalServiceGrpc.getExperimentalUnregisterRelationshipCounterMethod) == null) { + ExperimentalServiceGrpc.getExperimentalUnregisterRelationshipCounterMethod = getExperimentalUnregisterRelationshipCounterMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExperimentalUnregisterRelationshipCounter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse.getDefaultInstance())) + .setSchemaDescriptor(new ExperimentalServiceMethodDescriptorSupplier("ExperimentalUnregisterRelationshipCounter")) + .build(); + } + } + } + return getExperimentalUnregisterRelationshipCounterMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ExperimentalServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExperimentalServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentalServiceStub(channel, callOptions); + } + }; + return ExperimentalServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ExperimentalServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExperimentalServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentalServiceBlockingStub(channel, callOptions); + } + }; + return ExperimentalServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ExperimentalServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExperimentalServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentalServiceFutureStub(channel, callOptions); + } + }; + return ExperimentalServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   * ExperimentalService exposes a number of APIs that are currently being
+   * prototyped and tested for future inclusion in the stable API.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * BulkImportRelationships is a faster path to writing a large number of
+     * relationships at once. It is both batched and streaming. For maximum
+     * performance, the caller should attempt to write relationships in as close
+     * to relationship sort order as possible: (resource.object_type,
+     * resource.object_id, relation, subject.object.object_type,
+     * subject.object.object_id, subject.optional_relation)
+     * 
+     * EXPERIMENTAL
+     * https://github.com/authzed/spicedb/issues/1303
+     * 
+ */ + default io.grpc.stub.StreamObserver bulkImportRelationships( + io.grpc.stub.StreamObserver responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getBulkImportRelationshipsMethod(), responseObserver); + } + + /** + *
+     * BulkExportRelationships is the fastest path available to exporting
+     * relationships from the server. It is resumable, and will return results
+     * in an order determined by the server.
+     * 
+ */ + default void bulkExportRelationships(com.authzed.api.v1.BulkExportRelationshipsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBulkExportRelationshipsMethod(), responseObserver); + } + + /** + *
+     * NOTE: BulkCheckPermission has been promoted to the stable API as "CheckBulkPermission" and the
+     * API will be removed from experimental in a future release.
+     * 
+ */ + @java.lang.Deprecated + default void bulkCheckPermission(com.authzed.api.v1.BulkCheckPermissionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBulkCheckPermissionMethod(), responseObserver); + } + + /** + *
+     * EXPERIMENTAL: ReflectSchema is an API that allows clients to reflect the schema stored in
+     * SpiceDB. This is useful for clients that need to introspect the schema of a SpiceDB instance.
+     * 
+ */ + default void experimentalReflectSchema(com.authzed.api.v1.ExperimentalReflectSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExperimentalReflectSchemaMethod(), responseObserver); + } + + /** + *
+     * EXPERIMENTAL: ComputablePermissions is an API that allows clients to request the set of
+     * permissions that compute based off a relation. For example, if a schema has a relation
+     * `viewer` and a permission `view` defined as `permission view = viewer + editor`, then the
+     * computable permissions for the relation `viewer` will include `view`.
+     * 
+ */ + default void experimentalComputablePermissions(com.authzed.api.v1.ExperimentalComputablePermissionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExperimentalComputablePermissionsMethod(), responseObserver); + } + + /** + *
+     * EXPERIMENTAL: DependentRelations is an API that allows clients to request the set of
+     * relations and permissions that used to compute a permission, recursively. It is the
+     * inverse of the ComputablePermissions API.
+     * 
+ */ + default void experimentalDependentRelations(com.authzed.api.v1.ExperimentalDependentRelationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExperimentalDependentRelationsMethod(), responseObserver); + } + + /** + *
+     * EXPERIMENTAL: DiffSchema is an API that allows clients to request the difference between the
+     * specified schema and the schema stored in SpiceDB. This is useful for clients that need to
+     * introspect the schema of a SpiceDB instance.
+     * 
+ */ + default void experimentalDiffSchema(com.authzed.api.v1.ExperimentalDiffSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExperimentalDiffSchemaMethod(), responseObserver); + } + + /** + *
+     * EXPERIMENTAL: RegisterRelationshipCounter registers a new filter for counting relationships. A filter must be registered before
+     * a count can be requested.
+     * 
+ */ + default void experimentalRegisterRelationshipCounter(com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExperimentalRegisterRelationshipCounterMethod(), responseObserver); + } + + /** + *
+     * EXPERIMENTAL: CountRelationships returns the count of relationships for *pre-registered* filter.
+     * 
+ */ + default void experimentalCountRelationships(com.authzed.api.v1.ExperimentalCountRelationshipsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExperimentalCountRelationshipsMethod(), responseObserver); + } + + /** + *
+     * EXPERIMENTAL: UnregisterRelationshipCounter unregisters an existing filter for counting relationships.
+     * 
+ */ + default void experimentalUnregisterRelationshipCounter(com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExperimentalUnregisterRelationshipCounterMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service ExperimentalService. + *
+   * ExperimentalService exposes a number of APIs that are currently being
+   * prototyped and tested for future inclusion in the stable API.
+   * 
+ */ + public static abstract class ExperimentalServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return ExperimentalServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service ExperimentalService. + *
+   * ExperimentalService exposes a number of APIs that are currently being
+   * prototyped and tested for future inclusion in the stable API.
+   * 
+ */ + public static final class ExperimentalServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ExperimentalServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExperimentalServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentalServiceStub(channel, callOptions); + } + + /** + *
+     * BulkImportRelationships is a faster path to writing a large number of
+     * relationships at once. It is both batched and streaming. For maximum
+     * performance, the caller should attempt to write relationships in as close
+     * to relationship sort order as possible: (resource.object_type,
+     * resource.object_id, relation, subject.object.object_type,
+     * subject.object.object_id, subject.optional_relation)
+     * 
+     * EXPERIMENTAL
+     * https://github.com/authzed/spicedb/issues/1303
+     * 
+ */ + public io.grpc.stub.StreamObserver bulkImportRelationships( + io.grpc.stub.StreamObserver responseObserver) { + return io.grpc.stub.ClientCalls.asyncClientStreamingCall( + getChannel().newCall(getBulkImportRelationshipsMethod(), getCallOptions()), responseObserver); + } + + /** + *
+     * BulkExportRelationships is the fastest path available to exporting
+     * relationships from the server. It is resumable, and will return results
+     * in an order determined by the server.
+     * 
+ */ + public void bulkExportRelationships(com.authzed.api.v1.BulkExportRelationshipsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getBulkExportRelationshipsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * NOTE: BulkCheckPermission has been promoted to the stable API as "CheckBulkPermission" and the
+     * API will be removed from experimental in a future release.
+     * 
+ */ + @java.lang.Deprecated + public void bulkCheckPermission(com.authzed.api.v1.BulkCheckPermissionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBulkCheckPermissionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * EXPERIMENTAL: ReflectSchema is an API that allows clients to reflect the schema stored in
+     * SpiceDB. This is useful for clients that need to introspect the schema of a SpiceDB instance.
+     * 
+ */ + public void experimentalReflectSchema(com.authzed.api.v1.ExperimentalReflectSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExperimentalReflectSchemaMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * EXPERIMENTAL: ComputablePermissions is an API that allows clients to request the set of
+     * permissions that compute based off a relation. For example, if a schema has a relation
+     * `viewer` and a permission `view` defined as `permission view = viewer + editor`, then the
+     * computable permissions for the relation `viewer` will include `view`.
+     * 
+ */ + public void experimentalComputablePermissions(com.authzed.api.v1.ExperimentalComputablePermissionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExperimentalComputablePermissionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * EXPERIMENTAL: DependentRelations is an API that allows clients to request the set of
+     * relations and permissions that used to compute a permission, recursively. It is the
+     * inverse of the ComputablePermissions API.
+     * 
+ */ + public void experimentalDependentRelations(com.authzed.api.v1.ExperimentalDependentRelationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExperimentalDependentRelationsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * EXPERIMENTAL: DiffSchema is an API that allows clients to request the difference between the
+     * specified schema and the schema stored in SpiceDB. This is useful for clients that need to
+     * introspect the schema of a SpiceDB instance.
+     * 
+ */ + public void experimentalDiffSchema(com.authzed.api.v1.ExperimentalDiffSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExperimentalDiffSchemaMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * EXPERIMENTAL: RegisterRelationshipCounter registers a new filter for counting relationships. A filter must be registered before
+     * a count can be requested.
+     * 
+ */ + public void experimentalRegisterRelationshipCounter(com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExperimentalRegisterRelationshipCounterMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * EXPERIMENTAL: CountRelationships returns the count of relationships for *pre-registered* filter.
+     * 
+ */ + public void experimentalCountRelationships(com.authzed.api.v1.ExperimentalCountRelationshipsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExperimentalCountRelationshipsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * EXPERIMENTAL: UnregisterRelationshipCounter unregisters an existing filter for counting relationships.
+     * 
+ */ + public void experimentalUnregisterRelationshipCounter(com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExperimentalUnregisterRelationshipCounterMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service ExperimentalService. + *
+   * ExperimentalService exposes a number of APIs that are currently being
+   * prototyped and tested for future inclusion in the stable API.
+   * 
+ */ + public static final class ExperimentalServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ExperimentalServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExperimentalServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentalServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * BulkExportRelationships is the fastest path available to exporting
+     * relationships from the server. It is resumable, and will return results
+     * in an order determined by the server.
+     * 
+ */ + public java.util.Iterator bulkExportRelationships( + com.authzed.api.v1.BulkExportRelationshipsRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getBulkExportRelationshipsMethod(), getCallOptions(), request); + } + + /** + *
+     * NOTE: BulkCheckPermission has been promoted to the stable API as "CheckBulkPermission" and the
+     * API will be removed from experimental in a future release.
+     * 
+ */ + @java.lang.Deprecated + public com.authzed.api.v1.BulkCheckPermissionResponse bulkCheckPermission(com.authzed.api.v1.BulkCheckPermissionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBulkCheckPermissionMethod(), getCallOptions(), request); + } + + /** + *
+     * EXPERIMENTAL: ReflectSchema is an API that allows clients to reflect the schema stored in
+     * SpiceDB. This is useful for clients that need to introspect the schema of a SpiceDB instance.
+     * 
+ */ + public com.authzed.api.v1.ExperimentalReflectSchemaResponse experimentalReflectSchema(com.authzed.api.v1.ExperimentalReflectSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExperimentalReflectSchemaMethod(), getCallOptions(), request); + } + + /** + *
+     * EXPERIMENTAL: ComputablePermissions is an API that allows clients to request the set of
+     * permissions that compute based off a relation. For example, if a schema has a relation
+     * `viewer` and a permission `view` defined as `permission view = viewer + editor`, then the
+     * computable permissions for the relation `viewer` will include `view`.
+     * 
+ */ + public com.authzed.api.v1.ExperimentalComputablePermissionsResponse experimentalComputablePermissions(com.authzed.api.v1.ExperimentalComputablePermissionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExperimentalComputablePermissionsMethod(), getCallOptions(), request); + } + + /** + *
+     * EXPERIMENTAL: DependentRelations is an API that allows clients to request the set of
+     * relations and permissions that used to compute a permission, recursively. It is the
+     * inverse of the ComputablePermissions API.
+     * 
+ */ + public com.authzed.api.v1.ExperimentalDependentRelationsResponse experimentalDependentRelations(com.authzed.api.v1.ExperimentalDependentRelationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExperimentalDependentRelationsMethod(), getCallOptions(), request); + } + + /** + *
+     * EXPERIMENTAL: DiffSchema is an API that allows clients to request the difference between the
+     * specified schema and the schema stored in SpiceDB. This is useful for clients that need to
+     * introspect the schema of a SpiceDB instance.
+     * 
+ */ + public com.authzed.api.v1.ExperimentalDiffSchemaResponse experimentalDiffSchema(com.authzed.api.v1.ExperimentalDiffSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExperimentalDiffSchemaMethod(), getCallOptions(), request); + } + + /** + *
+     * EXPERIMENTAL: RegisterRelationshipCounter registers a new filter for counting relationships. A filter must be registered before
+     * a count can be requested.
+     * 
+ */ + public com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse experimentalRegisterRelationshipCounter(com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExperimentalRegisterRelationshipCounterMethod(), getCallOptions(), request); + } + + /** + *
+     * EXPERIMENTAL: CountRelationships returns the count of relationships for *pre-registered* filter.
+     * 
+ */ + public com.authzed.api.v1.ExperimentalCountRelationshipsResponse experimentalCountRelationships(com.authzed.api.v1.ExperimentalCountRelationshipsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExperimentalCountRelationshipsMethod(), getCallOptions(), request); + } + + /** + *
+     * EXPERIMENTAL: UnregisterRelationshipCounter unregisters an existing filter for counting relationships.
+     * 
+ */ + public com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse experimentalUnregisterRelationshipCounter(com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExperimentalUnregisterRelationshipCounterMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service ExperimentalService. + *
+   * ExperimentalService exposes a number of APIs that are currently being
+   * prototyped and tested for future inclusion in the stable API.
+   * 
+ */ + public static final class ExperimentalServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ExperimentalServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExperimentalServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExperimentalServiceFutureStub(channel, callOptions); + } + + /** + *
+     * NOTE: BulkCheckPermission has been promoted to the stable API as "CheckBulkPermission" and the
+     * API will be removed from experimental in a future release.
+     * 
+ */ + @java.lang.Deprecated + public com.google.common.util.concurrent.ListenableFuture bulkCheckPermission( + com.authzed.api.v1.BulkCheckPermissionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBulkCheckPermissionMethod(), getCallOptions()), request); + } + + /** + *
+     * EXPERIMENTAL: ReflectSchema is an API that allows clients to reflect the schema stored in
+     * SpiceDB. This is useful for clients that need to introspect the schema of a SpiceDB instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture experimentalReflectSchema( + com.authzed.api.v1.ExperimentalReflectSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExperimentalReflectSchemaMethod(), getCallOptions()), request); + } + + /** + *
+     * EXPERIMENTAL: ComputablePermissions is an API that allows clients to request the set of
+     * permissions that compute based off a relation. For example, if a schema has a relation
+     * `viewer` and a permission `view` defined as `permission view = viewer + editor`, then the
+     * computable permissions for the relation `viewer` will include `view`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture experimentalComputablePermissions( + com.authzed.api.v1.ExperimentalComputablePermissionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExperimentalComputablePermissionsMethod(), getCallOptions()), request); + } + + /** + *
+     * EXPERIMENTAL: DependentRelations is an API that allows clients to request the set of
+     * relations and permissions that used to compute a permission, recursively. It is the
+     * inverse of the ComputablePermissions API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture experimentalDependentRelations( + com.authzed.api.v1.ExperimentalDependentRelationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExperimentalDependentRelationsMethod(), getCallOptions()), request); + } + + /** + *
+     * EXPERIMENTAL: DiffSchema is an API that allows clients to request the difference between the
+     * specified schema and the schema stored in SpiceDB. This is useful for clients that need to
+     * introspect the schema of a SpiceDB instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture experimentalDiffSchema( + com.authzed.api.v1.ExperimentalDiffSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExperimentalDiffSchemaMethod(), getCallOptions()), request); + } + + /** + *
+     * EXPERIMENTAL: RegisterRelationshipCounter registers a new filter for counting relationships. A filter must be registered before
+     * a count can be requested.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture experimentalRegisterRelationshipCounter( + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExperimentalRegisterRelationshipCounterMethod(), getCallOptions()), request); + } + + /** + *
+     * EXPERIMENTAL: CountRelationships returns the count of relationships for *pre-registered* filter.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture experimentalCountRelationships( + com.authzed.api.v1.ExperimentalCountRelationshipsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExperimentalCountRelationshipsMethod(), getCallOptions()), request); + } + + /** + *
+     * EXPERIMENTAL: UnregisterRelationshipCounter unregisters an existing filter for counting relationships.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture experimentalUnregisterRelationshipCounter( + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExperimentalUnregisterRelationshipCounterMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_BULK_EXPORT_RELATIONSHIPS = 0; + private static final int METHODID_BULK_CHECK_PERMISSION = 1; + private static final int METHODID_EXPERIMENTAL_REFLECT_SCHEMA = 2; + private static final int METHODID_EXPERIMENTAL_COMPUTABLE_PERMISSIONS = 3; + private static final int METHODID_EXPERIMENTAL_DEPENDENT_RELATIONS = 4; + private static final int METHODID_EXPERIMENTAL_DIFF_SCHEMA = 5; + private static final int METHODID_EXPERIMENTAL_REGISTER_RELATIONSHIP_COUNTER = 6; + private static final int METHODID_EXPERIMENTAL_COUNT_RELATIONSHIPS = 7; + private static final int METHODID_EXPERIMENTAL_UNREGISTER_RELATIONSHIP_COUNTER = 8; + private static final int METHODID_BULK_IMPORT_RELATIONSHIPS = 9; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_BULK_EXPORT_RELATIONSHIPS: + serviceImpl.bulkExportRelationships((com.authzed.api.v1.BulkExportRelationshipsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BULK_CHECK_PERMISSION: + serviceImpl.bulkCheckPermission((com.authzed.api.v1.BulkCheckPermissionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPERIMENTAL_REFLECT_SCHEMA: + serviceImpl.experimentalReflectSchema((com.authzed.api.v1.ExperimentalReflectSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPERIMENTAL_COMPUTABLE_PERMISSIONS: + serviceImpl.experimentalComputablePermissions((com.authzed.api.v1.ExperimentalComputablePermissionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPERIMENTAL_DEPENDENT_RELATIONS: + serviceImpl.experimentalDependentRelations((com.authzed.api.v1.ExperimentalDependentRelationsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPERIMENTAL_DIFF_SCHEMA: + serviceImpl.experimentalDiffSchema((com.authzed.api.v1.ExperimentalDiffSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPERIMENTAL_REGISTER_RELATIONSHIP_COUNTER: + serviceImpl.experimentalRegisterRelationshipCounter((com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPERIMENTAL_COUNT_RELATIONSHIPS: + serviceImpl.experimentalCountRelationships((com.authzed.api.v1.ExperimentalCountRelationshipsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPERIMENTAL_UNREGISTER_RELATIONSHIP_COUNTER: + serviceImpl.experimentalUnregisterRelationshipCounter((com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_BULK_IMPORT_RELATIONSHIPS: + return (io.grpc.stub.StreamObserver) serviceImpl.bulkImportRelationships( + (io.grpc.stub.StreamObserver) responseObserver); + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getBulkImportRelationshipsMethod(), + io.grpc.stub.ServerCalls.asyncClientStreamingCall( + new MethodHandlers< + com.authzed.api.v1.BulkImportRelationshipsRequest, + com.authzed.api.v1.BulkImportRelationshipsResponse>( + service, METHODID_BULK_IMPORT_RELATIONSHIPS))) + .addMethod( + getBulkExportRelationshipsMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.authzed.api.v1.BulkExportRelationshipsRequest, + com.authzed.api.v1.BulkExportRelationshipsResponse>( + service, METHODID_BULK_EXPORT_RELATIONSHIPS))) + .addMethod( + getBulkCheckPermissionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.BulkCheckPermissionRequest, + com.authzed.api.v1.BulkCheckPermissionResponse>( + service, METHODID_BULK_CHECK_PERMISSION))) + .addMethod( + getExperimentalReflectSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.ExperimentalReflectSchemaRequest, + com.authzed.api.v1.ExperimentalReflectSchemaResponse>( + service, METHODID_EXPERIMENTAL_REFLECT_SCHEMA))) + .addMethod( + getExperimentalComputablePermissionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.ExperimentalComputablePermissionsRequest, + com.authzed.api.v1.ExperimentalComputablePermissionsResponse>( + service, METHODID_EXPERIMENTAL_COMPUTABLE_PERMISSIONS))) + .addMethod( + getExperimentalDependentRelationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.ExperimentalDependentRelationsRequest, + com.authzed.api.v1.ExperimentalDependentRelationsResponse>( + service, METHODID_EXPERIMENTAL_DEPENDENT_RELATIONS))) + .addMethod( + getExperimentalDiffSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.ExperimentalDiffSchemaRequest, + com.authzed.api.v1.ExperimentalDiffSchemaResponse>( + service, METHODID_EXPERIMENTAL_DIFF_SCHEMA))) + .addMethod( + getExperimentalRegisterRelationshipCounterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest, + com.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse>( + service, METHODID_EXPERIMENTAL_REGISTER_RELATIONSHIP_COUNTER))) + .addMethod( + getExperimentalCountRelationshipsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.ExperimentalCountRelationshipsRequest, + com.authzed.api.v1.ExperimentalCountRelationshipsResponse>( + service, METHODID_EXPERIMENTAL_COUNT_RELATIONSHIPS))) + .addMethod( + getExperimentalUnregisterRelationshipCounterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest, + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse>( + service, METHODID_EXPERIMENTAL_UNREGISTER_RELATIONSHIP_COUNTER))) + .build(); + } + + private static abstract class ExperimentalServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ExperimentalServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ExperimentalService"); + } + } + + private static final class ExperimentalServiceFileDescriptorSupplier + extends ExperimentalServiceBaseDescriptorSupplier { + ExperimentalServiceFileDescriptorSupplier() {} + } + + private static final class ExperimentalServiceMethodDescriptorSupplier + extends ExperimentalServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + ExperimentalServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ExperimentalServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ExperimentalServiceFileDescriptorSupplier()) + .addMethod(getBulkImportRelationshipsMethod()) + .addMethod(getBulkExportRelationshipsMethod()) + .addMethod(getBulkCheckPermissionMethod()) + .addMethod(getExperimentalReflectSchemaMethod()) + .addMethod(getExperimentalComputablePermissionsMethod()) + .addMethod(getExperimentalDependentRelationsMethod()) + .addMethod(getExperimentalDiffSchemaMethod()) + .addMethod(getExperimentalRegisterRelationshipCounterMethod()) + .addMethod(getExperimentalCountRelationshipsMethod()) + .addMethod(getExperimentalUnregisterRelationshipCounterMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/generated/com/authzed/api/v1/ExperimentalServiceOuterClass.java b/generated/com/authzed/api/v1/ExperimentalServiceOuterClass.java new file mode 100644 index 00000000..0db9a827 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalServiceOuterClass.java @@ -0,0 +1,685 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public final class ExperimentalServiceOuterClass { + private ExperimentalServiceOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalCountRelationshipsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalCountRelationshipsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalCountRelationshipsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalCountRelationshipsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ReadCounterValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ReadCounterValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_BulkCheckPermissionRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_BulkCheckPermissionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_BulkCheckPermissionRequestItem_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_BulkCheckPermissionRequestItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_BulkCheckPermissionResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_BulkCheckPermissionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_BulkCheckPermissionPair_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_BulkCheckPermissionPair_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_BulkCheckPermissionResponseItem_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_BulkCheckPermissionResponseItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_BulkImportRelationshipsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_BulkImportRelationshipsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_BulkImportRelationshipsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_BulkImportRelationshipsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_BulkExportRelationshipsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_BulkExportRelationshipsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_BulkExportRelationshipsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_BulkExportRelationshipsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalReflectSchemaRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalReflectSchemaRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalReflectSchemaResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalReflectSchemaResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpSchemaFilter_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpSchemaFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpDefinition_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpDefinition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpCaveat_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpCaveat_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpCaveatParameter_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpCaveatParameter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpRelation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpRelation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpTypeReference_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpTypeReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpPermission_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpPermission_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalComputablePermissionsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalComputablePermissionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpRelationReference_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpRelationReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalComputablePermissionsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalComputablePermissionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalDependentRelationsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalDependentRelationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalDependentRelationsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalDependentRelationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalDiffSchemaRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalDiffSchemaRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExperimentalDiffSchemaResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExperimentalDiffSchemaResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpRelationSubjectTypeChange_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpRelationSubjectTypeChange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpCaveatParameterTypeChange_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpCaveatParameterTypeChange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpSchemaDiff_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpSchemaDiff_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)authzed/api/v1/experimental_service.pr" + + "oto\022\016authzed.api.v1\032\034google/api/annotati" + + "ons.proto\032\027validate/validate.proto\032\034goog" + + "le/protobuf/struct.proto\032\027google/rpc/sta" + + "tus.proto\032\031authzed/api/v1/core.proto\032\'au" + + "thzed/api/v1/permission_service.proto\"\317\001" + + "\n.ExperimentalRegisterRelationshipCounte" + + "rRequest\022>\n\004name\030\001 \001(\tB*\372B\'r%(@2!^([a-z]" + + "[a-z0-9_]{1,62}[a-z0-9])?$R\004name\022]\n\023rela" + + "tionship_filter\030\002 \001(\0132\".authzed.api.v1.R" + + "elationshipFilterB\010\372B\005\212\001\002\020\001R\022relationshi" + + "pFilter\"1\n/ExperimentalRegisterRelations" + + "hipCounterResponse\"g\n%ExperimentalCountR" + + "elationshipsRequest\022>\n\004name\030\001 \001(\tB*\372B\'r%" + + "(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\004n" + + "ame\"\312\001\n&ExperimentalCountRelationshipsRe" + + "sponse\022<\n\031counter_still_calculating\030\001 \001(" + + "\010H\000R\027counterStillCalculating\022P\n\022read_cou" + + "nter_value\030\002 \001(\0132 .authzed.api.v1.ReadCo" + + "unterValueH\000R\020readCounterValueB\020\n\016counte" + + "r_result\"~\n\020ReadCounterValue\022-\n\022relation" + + "ship_count\030\001 \001(\004R\021relationshipCount\022;\n\007r" + + "ead_at\030\002 \001(\0132\030.authzed.api.v1.ZedTokenB\010" + + "\372B\005\212\001\002\020\001R\006readAt\"r\n0ExperimentalUnregist" + + "erRelationshipCounterRequest\022>\n\004name\030\001 \001" + + "(\tB*\372B\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0" + + "-9])?$R\004name\"3\n1ExperimentalUnregisterRe" + + "lationshipCounterResponse\"\262\001\n\032BulkCheckP" + + "ermissionRequest\022=\n\013consistency\030\001 \001(\0132\033." + + "authzed.api.v1.ConsistencyR\013consistency\022" + + "U\n\005items\030\002 \003(\0132..authzed.api.v1.BulkChec" + + "kPermissionRequestItemB\017\030\001\372B\n\222\001\007\"\005\212\001\002\020\001R" + + "\005items\"\266\002\n\036BulkCheckPermissionRequestIte" + + "m\022E\n\010resource\030\001 \001(\0132\037.authzed.api.v1.Obj" + + "ectReferenceB\010\372B\005\212\001\002\020\001R\010resource\022J\n\nperm" + + "ission\030\002 \001(\tB*\372B\'r%(@2!^([a-z][a-z0-9_]{" + + "1,62}[a-z0-9])?$R\npermission\022D\n\007subject\030" + + "\003 \001(\0132 .authzed.api.v1.SubjectReferenceB" + + "\010\372B\005\212\001\002\020\001R\007subject\022;\n\007context\030\004 \001(\0132\027.go" + + "ogle.protobuf.StructB\010\372B\005\212\001\002\020\000R\007context\"" + + "\256\001\n\033BulkCheckPermissionResponse\022A\n\ncheck" + + "ed_at\030\001 \001(\0132\030.authzed.api.v1.ZedTokenB\010\372" + + "B\005\212\001\002\020\000R\tcheckedAt\022L\n\005pairs\030\002 \003(\0132\'.auth" + + "zed.api.v1.BulkCheckPermissionPairB\r\372B\n\222" + + "\001\007\"\005\212\001\002\020\001R\005pairs\"\342\001\n\027BulkCheckPermission" + + "Pair\022H\n\007request\030\001 \001(\0132..authzed.api.v1.B" + + "ulkCheckPermissionRequestItemR\007request\022E" + + "\n\004item\030\002 \001(\0132/.authzed.api.v1.BulkCheckP" + + "ermissionResponseItemH\000R\004item\022*\n\005error\030\003" + + " \001(\0132\022.google.rpc.StatusH\000R\005errorB\n\n\010res" + + "ponse\"\352\001\n\037BulkCheckPermissionResponseIte" + + "m\022j\n\016permissionship\030\001 \001(\01626.authzed.api." + + "v1.CheckPermissionResponse.Permissionshi" + + "pB\n\372B\007\202\001\004\020\001 \000R\016permissionship\022[\n\023partial" + + "_caveat_info\030\002 \001(\0132!.authzed.api.v1.Part" + + "ialCaveatInfoB\010\372B\005\212\001\002\020\000R\021partialCaveatIn" + + "fo\"s\n\036BulkImportRelationshipsRequest\022Q\n\r" + + "relationships\030\001 \003(\0132\034.authzed.api.v1.Rel" + + "ationshipB\r\372B\n\222\001\007\"\005\212\001\002\020\001R\rrelationships\"" + + "@\n\037BulkImportRelationshipsResponse\022\035\n\nnu" + + "m_loaded\030\001 \001(\004R\tnumLoaded\"\266\002\n\036BulkExport" + + "RelationshipsRequest\022=\n\013consistency\030\001 \001(" + + "\0132\033.authzed.api.v1.ConsistencyR\013consiste" + + "ncy\022.\n\016optional_limit\030\002 \001(\rB\007\372B\004*\002(\000R\rop" + + "tionalLimit\022?\n\017optional_cursor\030\003 \001(\0132\026.a" + + "uthzed.api.v1.CursorR\016optionalCursor\022d\n\034" + + "optional_relationship_filter\030\004 \001(\0132\".aut" + + "hzed.api.v1.RelationshipFilterR\032optional" + + "RelationshipFilter\"\255\001\n\037BulkExportRelatio" + + "nshipsResponse\022F\n\023after_result_cursor\030\001 " + + "\001(\0132\026.authzed.api.v1.CursorR\021afterResult" + + "Cursor\022B\n\rrelationships\030\002 \003(\0132\034.authzed." + + "api.v1.RelationshipR\rrelationships\"\255\001\n E" + + "xperimentalReflectSchemaRequest\022=\n\013consi" + + "stency\030\001 \001(\0132\033.authzed.api.v1.Consistenc" + + "yR\013consistency\022J\n\020optional_filters\030\002 \003(\013" + + "2\037.authzed.api.v1.ExpSchemaFilterR\017optio" + + "nalFilters\"\314\001\n!ExperimentalReflectSchema" + + "Response\022?\n\013definitions\030\001 \003(\0132\035.authzed." + + "api.v1.ExpDefinitionR\013definitions\0223\n\007cav" + + "eats\030\002 \003(\0132\031.authzed.api.v1.ExpCaveatR\007c" + + "aveats\0221\n\007read_at\030\003 \001(\0132\030.authzed.api.v1" + + ".ZedTokenR\006readAt\"\241\002\n\017ExpSchemaFilter\022E\n" + + "\037optional_definition_name_filter\030\001 \001(\tR\034" + + "optionalDefinitionNameFilter\022=\n\033optional" + + "_caveat_name_filter\030\002 \001(\tR\030optionalCavea" + + "tNameFilter\022A\n\035optional_relation_name_fi" + + "lter\030\003 \001(\tR\032optionalRelationNameFilter\022E" + + "\n\037optional_permission_name_filter\030\004 \001(\tR" + + "\034optionalPermissionNameFilter\"\271\001\n\rExpDef" + + "inition\022\022\n\004name\030\001 \001(\tR\004name\022\030\n\007comment\030\002" + + " \001(\tR\007comment\0229\n\trelations\030\003 \003(\0132\033.authz" + + "ed.api.v1.ExpRelationR\trelations\022?\n\013perm" + + "issions\030\004 \003(\0132\035.authzed.api.v1.ExpPermis" + + "sionR\013permissions\"\235\001\n\tExpCaveat\022\022\n\004name\030" + + "\001 \001(\tR\004name\022\030\n\007comment\030\002 \001(\tR\007comment\022B\n" + + "\nparameters\030\003 \003(\0132\".authzed.api.v1.ExpCa" + + "veatParameterR\nparameters\022\036\n\nexpression\030" + + "\004 \001(\tR\nexpression\"j\n\022ExpCaveatParameter\022" + + "\022\n\004name\030\001 \001(\tR\004name\022\022\n\004type\030\002 \001(\tR\004type\022" + + ",\n\022parent_caveat_name\030\003 \001(\tR\020parentCavea" + + "tName\"\270\001\n\013ExpRelation\022\022\n\004name\030\001 \001(\tR\004nam" + + "e\022\030\n\007comment\030\002 \001(\tR\007comment\0224\n\026parent_de" + + "finition_name\030\003 \001(\tR\024parentDefinitionNam" + + "e\022E\n\rsubject_types\030\004 \003(\0132 .authzed.api.v" + + "1.ExpTypeReferenceR\014subjectTypes\"\241\002\n\020Exp" + + "TypeReference\0226\n\027subject_definition_name" + + "\030\001 \001(\tR\025subjectDefinitionName\0220\n\024optiona" + + "l_caveat_name\030\002 \001(\tR\022optionalCaveatName\022" + + "0\n\023is_terminal_subject\030\003 \001(\010H\000R\021isTermin" + + "alSubject\0226\n\026optional_relation_name\030\004 \001(" + + "\tH\000R\024optionalRelationName\022.\n\022is_public_w" + + "ildcard\030\005 \001(\010H\000R\020isPublicWildcardB\t\n\007typ" + + "eref\"s\n\rExpPermission\022\022\n\004name\030\001 \001(\tR\004nam" + + "e\022\030\n\007comment\030\002 \001(\tR\007comment\0224\n\026parent_de" + + "finition_name\030\003 \001(\tR\024parentDefinitionNam" + + "e\"\376\001\n(ExperimentalComputablePermissionsR" + + "equest\022=\n\013consistency\030\001 \001(\0132\033.authzed.ap" + + "i.v1.ConsistencyR\013consistency\022\'\n\017definit" + + "ion_name\030\002 \001(\tR\016definitionName\022#\n\rrelati" + + "on_name\030\003 \001(\tR\014relationName\022E\n\037optional_" + + "definition_name_filter\030\004 \001(\tR\034optionalDe" + + "finitionNameFilter\"\211\001\n\024ExpRelationRefere" + + "nce\022\'\n\017definition_name\030\001 \001(\tR\016definition" + + "Name\022#\n\rrelation_name\030\002 \001(\tR\014relationNam" + + "e\022#\n\ris_permission\030\003 \001(\010R\014isPermission\"\246" + + "\001\n)ExperimentalComputablePermissionsResp" + + "onse\022F\n\013permissions\030\001 \003(\0132$.authzed.api." + + "v1.ExpRelationReferenceR\013permissions\0221\n\007" + + "read_at\030\002 \001(\0132\030.authzed.api.v1.ZedTokenR" + + "\006readAt\"\270\001\n%ExperimentalDependentRelatio" + + "nsRequest\022=\n\013consistency\030\001 \001(\0132\033.authzed" + + ".api.v1.ConsistencyR\013consistency\022\'\n\017defi" + + "nition_name\030\002 \001(\tR\016definitionName\022\'\n\017per" + + "mission_name\030\003 \001(\tR\016permissionName\"\237\001\n&E" + + "xperimentalDependentRelationsResponse\022B\n" + + "\trelations\030\001 \003(\0132$.authzed.api.v1.ExpRel" + + "ationReferenceR\trelations\0221\n\007read_at\030\002 \001" + + "(\0132\030.authzed.api.v1.ZedTokenR\006readAt\"\213\001\n" + + "\035ExperimentalDiffSchemaRequest\022=\n\013consis" + + "tency\030\001 \001(\0132\033.authzed.api.v1.Consistency" + + "R\013consistency\022+\n\021comparison_schema\030\002 \001(\t" + + "R\020comparisonSchema\"\210\001\n\036ExperimentalDiffS" + + "chemaResponse\0223\n\005diffs\030\001 \003(\0132\035.authzed.a" + + "pi.v1.ExpSchemaDiffR\005diffs\0221\n\007read_at\030\002 " + + "\001(\0132\030.authzed.api.v1.ZedTokenR\006readAt\"\253\001" + + "\n\034ExpRelationSubjectTypeChange\0227\n\010relati" + + "on\030\001 \001(\0132\033.authzed.api.v1.ExpRelationR\010r" + + "elation\022R\n\024changed_subject_type\030\002 \001(\0132 ." + + "authzed.api.v1.ExpTypeReferenceR\022changed" + + "SubjectType\"\205\001\n\034ExpCaveatParameterTypeCh" + + "ange\022@\n\tparameter\030\001 \001(\0132\".authzed.api.v1" + + ".ExpCaveatParameterR\tparameter\022#\n\rprevio" + + "us_type\030\002 \001(\tR\014previousType\"\240\r\n\rExpSchem" + + "aDiff\022J\n\020definition_added\030\001 \001(\0132\035.authze" + + "d.api.v1.ExpDefinitionH\000R\017definitionAdde" + + "d\022N\n\022definition_removed\030\002 \001(\0132\035.authzed." + + "api.v1.ExpDefinitionH\000R\021definitionRemove" + + "d\022d\n\036definition_doc_comment_changed\030\003 \001(" + + "\0132\035.authzed.api.v1.ExpDefinitionH\000R\033defi" + + "nitionDocCommentChanged\022D\n\016relation_adde" + + "d\030\004 \001(\0132\033.authzed.api.v1.ExpRelationH\000R\r" + + "relationAdded\022H\n\020relation_removed\030\005 \001(\0132" + + "\033.authzed.api.v1.ExpRelationH\000R\017relation" + + "Removed\022^\n\034relation_doc_comment_changed\030" + + "\006 \001(\0132\033.authzed.api.v1.ExpRelationH\000R\031re" + + "lationDocCommentChanged\022m\n\033relation_subj" + + "ect_type_added\030\007 \001(\0132,.authzed.api.v1.Ex" + + "pRelationSubjectTypeChangeH\000R\030relationSu" + + "bjectTypeAdded\022q\n\035relation_subject_type_" + + "removed\030\010 \001(\0132,.authzed.api.v1.ExpRelati" + + "onSubjectTypeChangeH\000R\032relationSubjectTy" + + "peRemoved\022J\n\020permission_added\030\t \001(\0132\035.au" + + "thzed.api.v1.ExpPermissionH\000R\017permission" + + "Added\022N\n\022permission_removed\030\n \001(\0132\035.auth" + + "zed.api.v1.ExpPermissionH\000R\021permissionRe" + + "moved\022d\n\036permission_doc_comment_changed\030" + + "\013 \001(\0132\035.authzed.api.v1.ExpPermissionH\000R\033" + + "permissionDocCommentChanged\022W\n\027permissio" + + "n_expr_changed\030\014 \001(\0132\035.authzed.api.v1.Ex" + + "pPermissionH\000R\025permissionExprChanged\022>\n\014" + + "caveat_added\030\r \001(\0132\031.authzed.api.v1.ExpC" + + "aveatH\000R\013caveatAdded\022B\n\016caveat_removed\030\016" + + " \001(\0132\031.authzed.api.v1.ExpCaveatH\000R\rcavea" + + "tRemoved\022X\n\032caveat_doc_comment_changed\030\017" + + " \001(\0132\031.authzed.api.v1.ExpCaveatH\000R\027cavea" + + "tDocCommentChanged\022K\n\023caveat_expr_change" + + "d\030\020 \001(\0132\031.authzed.api.v1.ExpCaveatH\000R\021ca" + + "veatExprChanged\022Z\n\026caveat_parameter_adde" + + "d\030\021 \001(\0132\".authzed.api.v1.ExpCaveatParame" + + "terH\000R\024caveatParameterAdded\022^\n\030caveat_pa" + + "rameter_removed\030\022 \001(\0132\".authzed.api.v1.E" + + "xpCaveatParameterH\000R\026caveatParameterRemo" + + "ved\022q\n\035caveat_parameter_type_changed\030\023 \001" + + "(\0132,.authzed.api.v1.ExpCaveatParameterTy" + + "peChangeH\000R\032caveatParameterTypeChangedB\006" + + "\n\004diff2\252\017\n\023ExperimentalService\022\262\001\n\027BulkI" + + "mportRelationships\022..authzed.api.v1.Bulk" + + "ImportRelationshipsRequest\032/.authzed.api" + + ".v1.BulkImportRelationshipsResponse\"4\202\323\344" + + "\223\002.:\001*\")/v1/experimental/relationships/b" + + "ulkimport(\001\022\262\001\n\027BulkExportRelationships\022" + + "..authzed.api.v1.BulkExportRelationships" + + "Request\032/.authzed.api.v1.BulkExportRelat" + + "ionshipsResponse\"4\202\323\344\223\002.:\001*\")/v1/experim" + + "ental/relationships/bulkexport0\001\022\256\001\n\023Bul" + + "kCheckPermission\022*.authzed.api.v1.BulkCh" + + "eckPermissionRequest\032+.authzed.api.v1.Bu" + + "lkCheckPermissionResponse\">\210\002\001\202\323\344\223\0025:\001*\"" + + "0/v1/experimental/permissions/bulkcheckp" + + "ermission\022\253\001\n\031ExperimentalReflectSchema\022" + + "0.authzed.api.v1.ExperimentalReflectSche" + + "maRequest\0321.authzed.api.v1.ExperimentalR" + + "eflectSchemaResponse\")\202\323\344\223\002#:\001*\"\036/v1/exp" + + "erimental/reflectschema\022\314\001\n!Experimental" + + "ComputablePermissions\0228.authzed.api.v1.E" + + "xperimentalComputablePermissionsRequest\032" + + "9.authzed.api.v1.ExperimentalComputableP" + + "ermissionsResponse\"2\202\323\344\223\002,:\001*\"\'/v1/exper" + + "imental/permissions/computable\022\302\001\n\036Exper" + + "imentalDependentRelations\0225.authzed.api." + + "v1.ExperimentalDependentRelationsRequest" + + "\0326.authzed.api.v1.ExperimentalDependentR" + + "elationsResponse\"1\202\323\344\223\002+:\001*\"&/v1/experim" + + "ental/permissions/dependent\022\237\001\n\026Experime" + + "ntalDiffSchema\022-.authzed.api.v1.Experime" + + "ntalDiffSchemaRequest\032..authzed.api.v1.E" + + "xperimentalDiffSchemaResponse\"&\202\323\344\223\002 :\001*" + + "\"\033/v1/experimental/diffschema\022\343\001\n\'Experi" + + "mentalRegisterRelationshipCounter\022>.auth" + + "zed.api.v1.ExperimentalRegisterRelations" + + "hipCounterRequest\032?.authzed.api.v1.Exper" + + "imentalRegisterRelationshipCounterRespon" + + "se\"7\202\323\344\223\0021:\001*\",/v1/experimental/register" + + "relationshipcounter\022\277\001\n\036ExperimentalCoun" + + "tRelationships\0225.authzed.api.v1.Experime" + + "ntalCountRelationshipsRequest\0326.authzed." + + "api.v1.ExperimentalCountRelationshipsRes" + + "ponse\".\202\323\344\223\002(:\001*\"#/v1/experimental/count" + + "relationships\022\353\001\n)ExperimentalUnregister" + + "RelationshipCounter\022@.authzed.api.v1.Exp" + + "erimentalUnregisterRelationshipCounterRe" + + "quest\032A.authzed.api.v1.ExperimentalUnreg" + + "isterRelationshipCounterResponse\"9\202\323\344\223\0023" + + ":\001*\"./v1/experimental/unregisterrelation" + + "shipcounterBJ\n\022com.authzed.api.v1P\001Z2git" + + "hub.com/authzed/authzed-go/proto/authzed" + + "/api/v1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + io.envoyproxy.pgv.validate.Validate.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.authzed.api.v1.Core.getDescriptor(), + com.authzed.api.v1.PermissionService.getDescriptor(), + }); + internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterRequest_descriptor, + new java.lang.String[] { "Name", "RelationshipFilter", }); + internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalRegisterRelationshipCounterResponse_descriptor, + new java.lang.String[] { }); + internal_static_authzed_api_v1_ExperimentalCountRelationshipsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authzed_api_v1_ExperimentalCountRelationshipsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalCountRelationshipsRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_authzed_api_v1_ExperimentalCountRelationshipsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_authzed_api_v1_ExperimentalCountRelationshipsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalCountRelationshipsResponse_descriptor, + new java.lang.String[] { "CounterStillCalculating", "ReadCounterValue", "CounterResult", }); + internal_static_authzed_api_v1_ReadCounterValue_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_authzed_api_v1_ReadCounterValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ReadCounterValue_descriptor, + new java.lang.String[] { "RelationshipCount", "ReadAt", }); + internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterResponse_descriptor, + new java.lang.String[] { }); + internal_static_authzed_api_v1_BulkCheckPermissionRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_authzed_api_v1_BulkCheckPermissionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_BulkCheckPermissionRequest_descriptor, + new java.lang.String[] { "Consistency", "Items", }); + internal_static_authzed_api_v1_BulkCheckPermissionRequestItem_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_authzed_api_v1_BulkCheckPermissionRequestItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_BulkCheckPermissionRequestItem_descriptor, + new java.lang.String[] { "Resource", "Permission", "Subject", "Context", }); + internal_static_authzed_api_v1_BulkCheckPermissionResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_authzed_api_v1_BulkCheckPermissionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_BulkCheckPermissionResponse_descriptor, + new java.lang.String[] { "CheckedAt", "Pairs", }); + internal_static_authzed_api_v1_BulkCheckPermissionPair_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_authzed_api_v1_BulkCheckPermissionPair_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_BulkCheckPermissionPair_descriptor, + new java.lang.String[] { "Request", "Item", "Error", "Response", }); + internal_static_authzed_api_v1_BulkCheckPermissionResponseItem_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_authzed_api_v1_BulkCheckPermissionResponseItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_BulkCheckPermissionResponseItem_descriptor, + new java.lang.String[] { "Permissionship", "PartialCaveatInfo", }); + internal_static_authzed_api_v1_BulkImportRelationshipsRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_authzed_api_v1_BulkImportRelationshipsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_BulkImportRelationshipsRequest_descriptor, + new java.lang.String[] { "Relationships", }); + internal_static_authzed_api_v1_BulkImportRelationshipsResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_authzed_api_v1_BulkImportRelationshipsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_BulkImportRelationshipsResponse_descriptor, + new java.lang.String[] { "NumLoaded", }); + internal_static_authzed_api_v1_BulkExportRelationshipsRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_authzed_api_v1_BulkExportRelationshipsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_BulkExportRelationshipsRequest_descriptor, + new java.lang.String[] { "Consistency", "OptionalLimit", "OptionalCursor", "OptionalRelationshipFilter", }); + internal_static_authzed_api_v1_BulkExportRelationshipsResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_authzed_api_v1_BulkExportRelationshipsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_BulkExportRelationshipsResponse_descriptor, + new java.lang.String[] { "AfterResultCursor", "Relationships", }); + internal_static_authzed_api_v1_ExperimentalReflectSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_authzed_api_v1_ExperimentalReflectSchemaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalReflectSchemaRequest_descriptor, + new java.lang.String[] { "Consistency", "OptionalFilters", }); + internal_static_authzed_api_v1_ExperimentalReflectSchemaResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_authzed_api_v1_ExperimentalReflectSchemaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalReflectSchemaResponse_descriptor, + new java.lang.String[] { "Definitions", "Caveats", "ReadAt", }); + internal_static_authzed_api_v1_ExpSchemaFilter_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_authzed_api_v1_ExpSchemaFilter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpSchemaFilter_descriptor, + new java.lang.String[] { "OptionalDefinitionNameFilter", "OptionalCaveatNameFilter", "OptionalRelationNameFilter", "OptionalPermissionNameFilter", }); + internal_static_authzed_api_v1_ExpDefinition_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_authzed_api_v1_ExpDefinition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpDefinition_descriptor, + new java.lang.String[] { "Name", "Comment", "Relations", "Permissions", }); + internal_static_authzed_api_v1_ExpCaveat_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_authzed_api_v1_ExpCaveat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpCaveat_descriptor, + new java.lang.String[] { "Name", "Comment", "Parameters", "Expression", }); + internal_static_authzed_api_v1_ExpCaveatParameter_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_authzed_api_v1_ExpCaveatParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpCaveatParameter_descriptor, + new java.lang.String[] { "Name", "Type", "ParentCaveatName", }); + internal_static_authzed_api_v1_ExpRelation_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_authzed_api_v1_ExpRelation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpRelation_descriptor, + new java.lang.String[] { "Name", "Comment", "ParentDefinitionName", "SubjectTypes", }); + internal_static_authzed_api_v1_ExpTypeReference_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_authzed_api_v1_ExpTypeReference_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpTypeReference_descriptor, + new java.lang.String[] { "SubjectDefinitionName", "OptionalCaveatName", "IsTerminalSubject", "OptionalRelationName", "IsPublicWildcard", "Typeref", }); + internal_static_authzed_api_v1_ExpPermission_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_authzed_api_v1_ExpPermission_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpPermission_descriptor, + new java.lang.String[] { "Name", "Comment", "ParentDefinitionName", }); + internal_static_authzed_api_v1_ExperimentalComputablePermissionsRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_authzed_api_v1_ExperimentalComputablePermissionsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalComputablePermissionsRequest_descriptor, + new java.lang.String[] { "Consistency", "DefinitionName", "RelationName", "OptionalDefinitionNameFilter", }); + internal_static_authzed_api_v1_ExpRelationReference_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_authzed_api_v1_ExpRelationReference_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpRelationReference_descriptor, + new java.lang.String[] { "DefinitionName", "RelationName", "IsPermission", }); + internal_static_authzed_api_v1_ExperimentalComputablePermissionsResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_authzed_api_v1_ExperimentalComputablePermissionsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalComputablePermissionsResponse_descriptor, + new java.lang.String[] { "Permissions", "ReadAt", }); + internal_static_authzed_api_v1_ExperimentalDependentRelationsRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_authzed_api_v1_ExperimentalDependentRelationsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalDependentRelationsRequest_descriptor, + new java.lang.String[] { "Consistency", "DefinitionName", "PermissionName", }); + internal_static_authzed_api_v1_ExperimentalDependentRelationsResponse_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_authzed_api_v1_ExperimentalDependentRelationsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalDependentRelationsResponse_descriptor, + new java.lang.String[] { "Relations", "ReadAt", }); + internal_static_authzed_api_v1_ExperimentalDiffSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_authzed_api_v1_ExperimentalDiffSchemaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalDiffSchemaRequest_descriptor, + new java.lang.String[] { "Consistency", "ComparisonSchema", }); + internal_static_authzed_api_v1_ExperimentalDiffSchemaResponse_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_authzed_api_v1_ExperimentalDiffSchemaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExperimentalDiffSchemaResponse_descriptor, + new java.lang.String[] { "Diffs", "ReadAt", }); + internal_static_authzed_api_v1_ExpRelationSubjectTypeChange_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_authzed_api_v1_ExpRelationSubjectTypeChange_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpRelationSubjectTypeChange_descriptor, + new java.lang.String[] { "Relation", "ChangedSubjectType", }); + internal_static_authzed_api_v1_ExpCaveatParameterTypeChange_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_authzed_api_v1_ExpCaveatParameterTypeChange_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpCaveatParameterTypeChange_descriptor, + new java.lang.String[] { "Parameter", "PreviousType", }); + internal_static_authzed_api_v1_ExpSchemaDiff_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_authzed_api_v1_ExpSchemaDiff_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpSchemaDiff_descriptor, + new java.lang.String[] { "DefinitionAdded", "DefinitionRemoved", "DefinitionDocCommentChanged", "RelationAdded", "RelationRemoved", "RelationDocCommentChanged", "RelationSubjectTypeAdded", "RelationSubjectTypeRemoved", "PermissionAdded", "PermissionRemoved", "PermissionDocCommentChanged", "PermissionExprChanged", "CaveatAdded", "CaveatRemoved", "CaveatDocCommentChanged", "CaveatExprChanged", "CaveatParameterAdded", "CaveatParameterRemoved", "CaveatParameterTypeChanged", "Diff", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(io.envoyproxy.pgv.validate.Validate.rules); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + io.envoyproxy.pgv.validate.Validate.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.authzed.api.v1.Core.getDescriptor(); + com.authzed.api.v1.PermissionService.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterRequest.java b/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterRequest.java new file mode 100644 index 00000000..7bcfae34 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterRequest.java @@ -0,0 +1,572 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest} + */ +public final class ExperimentalUnregisterRelationshipCounterRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest) + ExperimentalUnregisterRelationshipCounterRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalUnregisterRelationshipCounterRequest.newBuilder() to construct. + private ExperimentalUnregisterRelationshipCounterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalUnregisterRelationshipCounterRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalUnregisterRelationshipCounterRequest(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest.class, com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * name is the name of the counter being unregistered.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + *
+   * name is the name of the counter being unregistered.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.ExperimentalUnregisterRelationshipCounterRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest other = (com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest) obj; + + if (!getName() + .equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest 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.ExperimentalUnregisterRelationshipCounterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest 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.ExperimentalUnregisterRelationshipCounterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest 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.ExperimentalUnregisterRelationshipCounterRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest 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.ExperimentalUnregisterRelationshipCounterRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest 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.ExperimentalUnregisterRelationshipCounterRequest 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest) + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest.class, com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest build() { + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest buildPartial() { + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest result = new com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.ExperimentalUnregisterRelationshipCounterRequest) { + return mergeFrom((com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest other) { + if (other == com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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: { + name_ = 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 name_ = ""; + /** + *
+     * name is the name of the counter being unregistered.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * name is the name of the counter being unregistered.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * name is the name of the counter being unregistered.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * name is the name of the counter being unregistered.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * name is the name of the counter being unregistered.
+     * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = 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.ExperimentalUnregisterRelationshipCounterRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest) + private static final com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest(); + } + + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalUnregisterRelationshipCounterRequest 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.ExperimentalUnregisterRelationshipCounterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterRequestOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterRequestOrBuilder.java new file mode 100644 index 00000000..22d77c36 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalUnregisterRelationshipCounterRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * name is the name of the counter being unregistered.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * name is the name of the counter being unregistered.
+   * 
+ * + * string name = 1 [json_name = "name", (.validate.rules) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterResponse.java b/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterResponse.java new file mode 100644 index 00000000..edf7a7cc --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterResponse.java @@ -0,0 +1,401 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse} + */ +public final class ExperimentalUnregisterRelationshipCounterResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse) + ExperimentalUnregisterRelationshipCounterResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExperimentalUnregisterRelationshipCounterResponse.newBuilder() to construct. + private ExperimentalUnregisterRelationshipCounterResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalUnregisterRelationshipCounterResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalUnregisterRelationshipCounterResponse(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse.class, com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.ExperimentalUnregisterRelationshipCounterResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse other = (com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse 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.ExperimentalUnregisterRelationshipCounterResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse 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.ExperimentalUnregisterRelationshipCounterResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse 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.ExperimentalUnregisterRelationshipCounterResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse 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.ExperimentalUnregisterRelationshipCounterResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse 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.ExperimentalUnregisterRelationshipCounterResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse) + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse.class, com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ExperimentalUnregisterRelationshipCounterResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse getDefaultInstanceForType() { + return com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse build() { + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse buildPartial() { + com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse result = new com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse(this); + onBuilt(); + return result; + } + + @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.ExperimentalUnregisterRelationshipCounterResponse) { + return mergeFrom((com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse other) { + if (other == com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse.getDefaultInstance()) return this; + 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; + 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; + } + @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.ExperimentalUnregisterRelationshipCounterResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse) + private static final com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse(); + } + + public static com.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalUnregisterRelationshipCounterResponse 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.ExperimentalUnregisterRelationshipCounterResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterResponseOrBuilder.java b/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterResponseOrBuilder.java new file mode 100644 index 00000000..ab681dc8 --- /dev/null +++ b/generated/com/authzed/api/v1/ExperimentalUnregisterRelationshipCounterResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ExperimentalUnregisterRelationshipCounterResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/generated/com/authzed/api/v1/LookupPermissionship.java b/generated/com/authzed/api/v1/LookupPermissionship.java new file mode 100644 index 00000000..87715246 --- /dev/null +++ b/generated/com/authzed/api/v1/LookupPermissionship.java @@ -0,0 +1,126 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * LookupPermissionship represents whether a Lookup response was partially evaluated or not
+ * 
+ * + * Protobuf enum {@code authzed.api.v1.LookupPermissionship} + */ +public enum LookupPermissionship + implements com.google.protobuf.ProtocolMessageEnum { + /** + * LOOKUP_PERMISSIONSHIP_UNSPECIFIED = 0; + */ + LOOKUP_PERMISSIONSHIP_UNSPECIFIED(0), + /** + * LOOKUP_PERMISSIONSHIP_HAS_PERMISSION = 1; + */ + LOOKUP_PERMISSIONSHIP_HAS_PERMISSION(1), + /** + * LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION = 2; + */ + LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION(2), + UNRECOGNIZED(-1), + ; + + /** + * LOOKUP_PERMISSIONSHIP_UNSPECIFIED = 0; + */ + public static final int LOOKUP_PERMISSIONSHIP_UNSPECIFIED_VALUE = 0; + /** + * LOOKUP_PERMISSIONSHIP_HAS_PERMISSION = 1; + */ + public static final int LOOKUP_PERMISSIONSHIP_HAS_PERMISSION_VALUE = 1; + /** + * LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION = 2; + */ + public static final int LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION_VALUE = 2; + + + 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 LookupPermissionship 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 LookupPermissionship forNumber(int value) { + switch (value) { + case 0: return LOOKUP_PERMISSIONSHIP_UNSPECIFIED; + case 1: return LOOKUP_PERMISSIONSHIP_HAS_PERMISSION; + case 2: return LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LookupPermissionship> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LookupPermissionship findValueByNumber(int number) { + return LookupPermissionship.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.PermissionService.getDescriptor().getEnumTypes().get(0); + } + + private static final LookupPermissionship[] VALUES = values(); + + public static LookupPermissionship 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 LookupPermissionship(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v1.LookupPermissionship) +} + diff --git a/generated/com/authzed/api/v1/LookupResourcesRequest.java b/generated/com/authzed/api/v1/LookupResourcesRequest.java new file mode 100644 index 00000000..41d44e2c --- /dev/null +++ b/generated/com/authzed/api/v1/LookupResourcesRequest.java @@ -0,0 +1,1736 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * LookupResourcesRequest performs a lookup of all resources of a particular
+ * kind on which the subject has the specified permission or the relation in
+ * which the subject exists, streaming back the IDs of those resources.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.LookupResourcesRequest} + */ +public final class LookupResourcesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.LookupResourcesRequest) + LookupResourcesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use LookupResourcesRequest.newBuilder() to construct. + private LookupResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LookupResourcesRequest() { + resourceObjectType_ = ""; + permission_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LookupResourcesRequest(); + } + + @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.PermissionService.internal_static_authzed_api_v1_LookupResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.LookupResourcesRequest.class, com.authzed.api.v1.LookupResourcesRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int RESOURCE_OBJECT_TYPE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceObjectType_ = ""; + /** + *
+   * resource_object_type is the type of resource object for which the IDs will
+   * be returned.
+   * 
+ * + * string resource_object_type = 2 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The resourceObjectType. + */ + @java.lang.Override + public java.lang.String getResourceObjectType() { + java.lang.Object ref = resourceObjectType_; + 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(); + resourceObjectType_ = s; + return s; + } + } + /** + *
+   * resource_object_type is the type of resource object for which the IDs will
+   * be returned.
+   * 
+ * + * string resource_object_type = 2 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The bytes for resourceObjectType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceObjectTypeBytes() { + java.lang.Object ref = resourceObjectType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceObjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object permission_ = ""; + /** + *
+   * permission is the name of the permission or relation for which the subject
+   * must Check.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + *
+   * permission is the name of the permission or relation for which the subject
+   * must Check.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_FIELD_NUMBER = 4; + private com.authzed.api.v1.SubjectReference subject_; + /** + *
+   * subject is the subject with access to the resources.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + @java.lang.Override + public boolean hasSubject() { + return subject_ != null; + } + /** + *
+   * subject is the subject with access to the resources.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReference getSubject() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + /** + *
+   * subject is the subject with access to the resources.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + + public static final int CONTEXT_FIELD_NUMBER = 5; + private com.google.protobuf.Struct context_; + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.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 named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getContextOrBuilder() { + return context_ == null ? com.google.protobuf.Struct.getDefaultInstance() : context_; + } + + public static final int OPTIONAL_LIMIT_FIELD_NUMBER = 6; + private int optionalLimit_ = 0; + /** + *
+   * optional_limit, if non-zero, specifies the limit on the number of resources to return
+   * before the stream is closed on the server side. By default, the stream will continue
+   * resolving resources until exhausted or the stream is closed due to the client or a
+   * network issue.
+   * 
+ * + * uint32 optional_limit = 6 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + @java.lang.Override + public int getOptionalLimit() { + return optionalLimit_; + } + + public static final int OPTIONAL_CURSOR_FIELD_NUMBER = 7; + private com.authzed.api.v1.Cursor optionalCursor_; + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupResourcesResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + @java.lang.Override + public boolean hasOptionalCursor() { + return optionalCursor_ != null; + } + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupResourcesResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + @java.lang.Override + public com.authzed.api.v1.Cursor getOptionalCursor() { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupResourcesResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + */ + @java.lang.Override + public com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder() { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + + 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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceObjectType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceObjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, permission_); + } + if (subject_ != null) { + output.writeMessage(4, getSubject()); + } + if (context_ != null) { + output.writeMessage(5, getContext()); + } + if (optionalLimit_ != 0) { + output.writeUInt32(6, optionalLimit_); + } + if (optionalCursor_ != null) { + output.writeMessage(7, getOptionalCursor()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceObjectType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceObjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, permission_); + } + if (subject_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getSubject()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getContext()); + } + if (optionalLimit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, optionalLimit_); + } + if (optionalCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getOptionalCursor()); + } + 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.LookupResourcesRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.LookupResourcesRequest other = (com.authzed.api.v1.LookupResourcesRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (!getResourceObjectType() + .equals(other.getResourceObjectType())) return false; + if (!getPermission() + .equals(other.getPermission())) return false; + if (hasSubject() != other.hasSubject()) return false; + if (hasSubject()) { + if (!getSubject() + .equals(other.getSubject())) return false; + } + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (getOptionalLimit() + != other.getOptionalLimit()) return false; + if (hasOptionalCursor() != other.hasOptionalCursor()) return false; + if (hasOptionalCursor()) { + if (!getOptionalCursor() + .equals(other.getOptionalCursor())) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + hash = (37 * hash) + RESOURCE_OBJECT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceObjectType().hashCode(); + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + if (hasSubject()) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().hashCode(); + } + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + hash = (37 * hash) + OPTIONAL_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getOptionalLimit(); + if (hasOptionalCursor()) { + hash = (37 * hash) + OPTIONAL_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getOptionalCursor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.LookupResourcesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupResourcesRequest 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.LookupResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupResourcesRequest 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.LookupResourcesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupResourcesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.LookupResourcesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupResourcesRequest 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.LookupResourcesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupResourcesRequest 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.LookupResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupResourcesRequest 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.LookupResourcesRequest 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; + } + /** + *
+   * LookupResourcesRequest performs a lookup of all resources of a particular
+   * kind on which the subject has the specified permission or the relation in
+   * which the subject exists, streaming back the IDs of those resources.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.LookupResourcesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.LookupResourcesRequest) + com.authzed.api.v1.LookupResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.LookupResourcesRequest.class, com.authzed.api.v1.LookupResourcesRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.LookupResourcesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + resourceObjectType_ = ""; + permission_ = ""; + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + optionalLimit_ = 0; + optionalCursor_ = null; + if (optionalCursorBuilder_ != null) { + optionalCursorBuilder_.dispose(); + optionalCursorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupResourcesRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.LookupResourcesRequest getDefaultInstanceForType() { + return com.authzed.api.v1.LookupResourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.LookupResourcesRequest build() { + com.authzed.api.v1.LookupResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.LookupResourcesRequest buildPartial() { + com.authzed.api.v1.LookupResourcesRequest result = new com.authzed.api.v1.LookupResourcesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.LookupResourcesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceObjectType_ = resourceObjectType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permission_ = permission_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.subject_ = subjectBuilder_ == null + ? subject_ + : subjectBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.context_ = contextBuilder_ == null + ? context_ + : contextBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.optionalLimit_ = optionalLimit_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.optionalCursor_ = optionalCursorBuilder_ == null + ? optionalCursor_ + : optionalCursorBuilder_.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.LookupResourcesRequest) { + return mergeFrom((com.authzed.api.v1.LookupResourcesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.LookupResourcesRequest other) { + if (other == com.authzed.api.v1.LookupResourcesRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (!other.getResourceObjectType().isEmpty()) { + resourceObjectType_ = other.resourceObjectType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasSubject()) { + mergeSubject(other.getSubject()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (other.getOptionalLimit() != 0) { + setOptionalLimit(other.getOptionalLimit()); + } + if (other.hasOptionalCursor()) { + mergeOptionalCursor(other.getOptionalCursor()); + } + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + resourceObjectType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + permission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getSubjectFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getContextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + optionalLimit_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + input.readMessage( + getOptionalCursorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private java.lang.Object resourceObjectType_ = ""; + /** + *
+     * resource_object_type is the type of resource object for which the IDs will
+     * be returned.
+     * 
+ * + * string resource_object_type = 2 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The resourceObjectType. + */ + public java.lang.String getResourceObjectType() { + java.lang.Object ref = resourceObjectType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceObjectType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * resource_object_type is the type of resource object for which the IDs will
+     * be returned.
+     * 
+ * + * string resource_object_type = 2 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The bytes for resourceObjectType. + */ + public com.google.protobuf.ByteString + getResourceObjectTypeBytes() { + java.lang.Object ref = resourceObjectType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceObjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * resource_object_type is the type of resource object for which the IDs will
+     * be returned.
+     * 
+ * + * string resource_object_type = 2 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @param value The resourceObjectType to set. + * @return This builder for chaining. + */ + public Builder setResourceObjectType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceObjectType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource_object_type is the type of resource object for which the IDs will
+     * be returned.
+     * 
+ * + * string resource_object_type = 2 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearResourceObjectType() { + resourceObjectType_ = getDefaultInstance().getResourceObjectType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * resource_object_type is the type of resource object for which the IDs will
+     * be returned.
+     * 
+ * + * string resource_object_type = 2 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @param value The bytes for resourceObjectType to set. + * @return This builder for chaining. + */ + public Builder setResourceObjectTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceObjectType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object permission_ = ""; + /** + *
+     * permission is the name of the permission or relation for which the subject
+     * must Check.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * permission is the name of the permission or relation for which the subject
+     * must Check.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * permission is the name of the permission or relation for which the subject
+     * must Check.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * permission is the name of the permission or relation for which the subject
+     * must Check.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermission() { + permission_ = getDefaultInstance().getPermission(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * permission is the name of the permission or relation for which the subject
+     * must Check.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.authzed.api.v1.SubjectReference subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> subjectBuilder_; + /** + *
+     * subject is the subject with access to the resources.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + public boolean hasSubject() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * subject is the subject with access to the resources.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + public com.authzed.api.v1.SubjectReference getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } else { + return subjectBuilder_.getMessage(); + } + } + /** + *
+     * subject is the subject with access to the resources.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subject_ = value; + } else { + subjectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject is the subject with access to the resources.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject( + com.authzed.api.v1.SubjectReference.Builder builderForValue) { + if (subjectBuilder_ == null) { + subject_ = builderForValue.build(); + } else { + subjectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject is the subject with access to the resources.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder mergeSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + subject_ != null && + subject_ != com.authzed.api.v1.SubjectReference.getDefaultInstance()) { + getSubjectBuilder().mergeFrom(value); + } else { + subject_ = value; + } + } else { + subjectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject is the subject with access to the resources.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder clearSubject() { + bitField0_ = (bitField0_ & ~0x00000008); + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * subject is the subject with access to the resources.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReference.Builder getSubjectBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubjectFieldBuilder().getBuilder(); + } + /** + *
+     * subject is the subject with access to the resources.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null ? + com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + } + /** + *
+     * subject is the subject with access to the resources.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder>( + getSubject(), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + 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 named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.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 named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.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_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder setContext( + com.google.protobuf.Struct.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder mergeContext(com.google.protobuf.Struct value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + context_ != null && + context_ != com.google.protobuf.Struct.getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000010); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + public com.google.protobuf.Struct.Builder getContextBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.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 named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.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_; + } + + private int optionalLimit_ ; + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of resources to return
+     * before the stream is closed on the server side. By default, the stream will continue
+     * resolving resources until exhausted or the stream is closed due to the client or a
+     * network issue.
+     * 
+ * + * uint32 optional_limit = 6 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + @java.lang.Override + public int getOptionalLimit() { + return optionalLimit_; + } + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of resources to return
+     * before the stream is closed on the server side. By default, the stream will continue
+     * resolving resources until exhausted or the stream is closed due to the client or a
+     * network issue.
+     * 
+ * + * uint32 optional_limit = 6 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @param value The optionalLimit to set. + * @return This builder for chaining. + */ + public Builder setOptionalLimit(int value) { + + optionalLimit_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of resources to return
+     * before the stream is closed on the server side. By default, the stream will continue
+     * resolving resources until exhausted or the stream is closed due to the client or a
+     * network issue.
+     * 
+ * + * uint32 optional_limit = 6 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalLimit() { + bitField0_ = (bitField0_ & ~0x00000020); + optionalLimit_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.Cursor optionalCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> optionalCursorBuilder_; + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupResourcesResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + public boolean hasOptionalCursor() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupResourcesResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + public com.authzed.api.v1.Cursor getOptionalCursor() { + if (optionalCursorBuilder_ == null) { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } else { + return optionalCursorBuilder_.getMessage(); + } + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupResourcesResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + */ + public Builder setOptionalCursor(com.authzed.api.v1.Cursor value) { + if (optionalCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalCursor_ = value; + } else { + optionalCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupResourcesResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + */ + public Builder setOptionalCursor( + com.authzed.api.v1.Cursor.Builder builderForValue) { + if (optionalCursorBuilder_ == null) { + optionalCursor_ = builderForValue.build(); + } else { + optionalCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupResourcesResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + */ + public Builder mergeOptionalCursor(com.authzed.api.v1.Cursor value) { + if (optionalCursorBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + optionalCursor_ != null && + optionalCursor_ != com.authzed.api.v1.Cursor.getDefaultInstance()) { + getOptionalCursorBuilder().mergeFrom(value); + } else { + optionalCursor_ = value; + } + } else { + optionalCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupResourcesResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + */ + public Builder clearOptionalCursor() { + bitField0_ = (bitField0_ & ~0x00000040); + optionalCursor_ = null; + if (optionalCursorBuilder_ != null) { + optionalCursorBuilder_.dispose(); + optionalCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupResourcesResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + */ + public com.authzed.api.v1.Cursor.Builder getOptionalCursorBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getOptionalCursorFieldBuilder().getBuilder(); + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupResourcesResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + */ + public com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder() { + if (optionalCursorBuilder_ != null) { + return optionalCursorBuilder_.getMessageOrBuilder(); + } else { + return optionalCursor_ == null ? + com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupResourcesResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> + getOptionalCursorFieldBuilder() { + if (optionalCursorBuilder_ == null) { + optionalCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder>( + getOptionalCursor(), + getParentForChildren(), + isClean()); + optionalCursor_ = null; + } + return optionalCursorBuilder_; + } + @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.LookupResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.LookupResourcesRequest) + private static final com.authzed.api.v1.LookupResourcesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.LookupResourcesRequest(); + } + + public static com.authzed.api.v1.LookupResourcesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupResourcesRequest 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.LookupResourcesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/LookupResourcesRequestOrBuilder.java b/generated/com/authzed/api/v1/LookupResourcesRequestOrBuilder.java new file mode 100644 index 00000000..8373c51b --- /dev/null +++ b/generated/com/authzed/api/v1/LookupResourcesRequestOrBuilder.java @@ -0,0 +1,165 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface LookupResourcesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.LookupResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + *
+   * resource_object_type is the type of resource object for which the IDs will
+   * be returned.
+   * 
+ * + * string resource_object_type = 2 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The resourceObjectType. + */ + java.lang.String getResourceObjectType(); + /** + *
+   * resource_object_type is the type of resource object for which the IDs will
+   * be returned.
+   * 
+ * + * string resource_object_type = 2 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The bytes for resourceObjectType. + */ + com.google.protobuf.ByteString + getResourceObjectTypeBytes(); + + /** + *
+   * permission is the name of the permission or relation for which the subject
+   * must Check.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + java.lang.String getPermission(); + /** + *
+   * permission is the name of the permission or relation for which the subject
+   * must Check.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + *
+   * subject is the subject with access to the resources.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return Whether the subject field is set. + */ + boolean hasSubject(); + /** + *
+   * subject is the subject with access to the resources.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + com.authzed.api.v1.SubjectReference getSubject(); + /** + *
+   * subject is the subject with access to the resources.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 4 [json_name = "subject", (.validate.rules) = { ... } + */ + com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder(); + + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + * @return The context. + */ + com.google.protobuf.Struct getContext(); + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 5 [json_name = "context", (.validate.rules) = { ... } + */ + com.google.protobuf.StructOrBuilder getContextOrBuilder(); + + /** + *
+   * optional_limit, if non-zero, specifies the limit on the number of resources to return
+   * before the stream is closed on the server side. By default, the stream will continue
+   * resolving resources until exhausted or the stream is closed due to the client or a
+   * network issue.
+   * 
+ * + * uint32 optional_limit = 6 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + int getOptionalLimit(); + + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupResourcesResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + boolean hasOptionalCursor(); + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupResourcesResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + com.authzed.api.v1.Cursor getOptionalCursor(); + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupResourcesResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 7 [json_name = "optionalCursor"]; + */ + com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/LookupResourcesResponse.java b/generated/com/authzed/api/v1/LookupResourcesResponse.java new file mode 100644 index 00000000..7b9bd816 --- /dev/null +++ b/generated/com/authzed/api/v1/LookupResourcesResponse.java @@ -0,0 +1,1403 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * LookupResourcesResponse contains a single matching resource object ID for the
+ * requested object type, permission, and subject.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.LookupResourcesResponse} + */ +public final class LookupResourcesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.LookupResourcesResponse) + LookupResourcesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use LookupResourcesResponse.newBuilder() to construct. + private LookupResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LookupResourcesResponse() { + resourceObjectId_ = ""; + permissionship_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LookupResourcesResponse(); + } + + @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.PermissionService.internal_static_authzed_api_v1_LookupResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.LookupResourcesResponse.class, com.authzed.api.v1.LookupResourcesResponse.Builder.class); + } + + public static final int LOOKED_UP_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken lookedUpAt_; + /** + *
+   * looked_up_at is the ZedToken at which the resource was found.
+   * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return Whether the lookedUpAt field is set. + */ + @java.lang.Override + public boolean hasLookedUpAt() { + return lookedUpAt_ != null; + } + /** + *
+   * looked_up_at is the ZedToken at which the resource was found.
+   * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return The lookedUpAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getLookedUpAt() { + return lookedUpAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : lookedUpAt_; + } + /** + *
+   * looked_up_at is the ZedToken at which the resource was found.
+   * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getLookedUpAtOrBuilder() { + return lookedUpAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : lookedUpAt_; + } + + public static final int RESOURCE_OBJECT_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceObjectId_ = ""; + /** + *
+   * resource_object_id is the object ID of the found resource.
+   * 
+ * + * string resource_object_id = 2 [json_name = "resourceObjectId"]; + * @return The resourceObjectId. + */ + @java.lang.Override + public java.lang.String getResourceObjectId() { + java.lang.Object ref = resourceObjectId_; + 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(); + resourceObjectId_ = s; + return s; + } + } + /** + *
+   * resource_object_id is the object ID of the found resource.
+   * 
+ * + * string resource_object_id = 2 [json_name = "resourceObjectId"]; + * @return The bytes for resourceObjectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceObjectIdBytes() { + java.lang.Object ref = resourceObjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceObjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSIONSHIP_FIELD_NUMBER = 3; + private int permissionship_ = 0; + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 3 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 3 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + @java.lang.Override public com.authzed.api.v1.LookupPermissionship getPermissionship() { + com.authzed.api.v1.LookupPermissionship result = com.authzed.api.v1.LookupPermissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.LookupPermissionship.UNRECOGNIZED : result; + } + + public static final int PARTIAL_CAVEAT_INFO_FIELD_NUMBER = 4; + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + @java.lang.Override + public boolean hasPartialCaveatInfo() { + return partialCaveatInfo_ != null; + } + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + + public static final int AFTER_RESULT_CURSOR_FIELD_NUMBER = 5; + private com.authzed.api.v1.Cursor afterResultCursor_; + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + @java.lang.Override + public boolean hasAfterResultCursor() { + return afterResultCursor_ != null; + } + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + @java.lang.Override + public com.authzed.api.v1.Cursor getAfterResultCursor() { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + */ + @java.lang.Override + public com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder() { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + + 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 (lookedUpAt_ != null) { + output.writeMessage(1, getLookedUpAt()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceObjectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceObjectId_); + } + if (permissionship_ != com.authzed.api.v1.LookupPermissionship.LOOKUP_PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + output.writeEnum(3, permissionship_); + } + if (partialCaveatInfo_ != null) { + output.writeMessage(4, getPartialCaveatInfo()); + } + if (afterResultCursor_ != null) { + output.writeMessage(5, getAfterResultCursor()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lookedUpAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLookedUpAt()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceObjectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceObjectId_); + } + if (permissionship_ != com.authzed.api.v1.LookupPermissionship.LOOKUP_PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, permissionship_); + } + if (partialCaveatInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPartialCaveatInfo()); + } + if (afterResultCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getAfterResultCursor()); + } + 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.LookupResourcesResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.LookupResourcesResponse other = (com.authzed.api.v1.LookupResourcesResponse) obj; + + if (hasLookedUpAt() != other.hasLookedUpAt()) return false; + if (hasLookedUpAt()) { + if (!getLookedUpAt() + .equals(other.getLookedUpAt())) return false; + } + if (!getResourceObjectId() + .equals(other.getResourceObjectId())) return false; + if (permissionship_ != other.permissionship_) return false; + if (hasPartialCaveatInfo() != other.hasPartialCaveatInfo()) return false; + if (hasPartialCaveatInfo()) { + if (!getPartialCaveatInfo() + .equals(other.getPartialCaveatInfo())) return false; + } + if (hasAfterResultCursor() != other.hasAfterResultCursor()) return false; + if (hasAfterResultCursor()) { + if (!getAfterResultCursor() + .equals(other.getAfterResultCursor())) 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 (hasLookedUpAt()) { + hash = (37 * hash) + LOOKED_UP_AT_FIELD_NUMBER; + hash = (53 * hash) + getLookedUpAt().hashCode(); + } + hash = (37 * hash) + RESOURCE_OBJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getResourceObjectId().hashCode(); + hash = (37 * hash) + PERMISSIONSHIP_FIELD_NUMBER; + hash = (53 * hash) + permissionship_; + if (hasPartialCaveatInfo()) { + hash = (37 * hash) + PARTIAL_CAVEAT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPartialCaveatInfo().hashCode(); + } + if (hasAfterResultCursor()) { + hash = (37 * hash) + AFTER_RESULT_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getAfterResultCursor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.LookupResourcesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupResourcesResponse 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.LookupResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupResourcesResponse 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.LookupResourcesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupResourcesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.LookupResourcesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupResourcesResponse 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.LookupResourcesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupResourcesResponse 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.LookupResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupResourcesResponse 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.LookupResourcesResponse 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; + } + /** + *
+   * LookupResourcesResponse contains a single matching resource object ID for the
+   * requested object type, permission, and subject.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.LookupResourcesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.LookupResourcesResponse) + com.authzed.api.v1.LookupResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.LookupResourcesResponse.class, com.authzed.api.v1.LookupResourcesResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.LookupResourcesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lookedUpAt_ = null; + if (lookedUpAtBuilder_ != null) { + lookedUpAtBuilder_.dispose(); + lookedUpAtBuilder_ = null; + } + resourceObjectId_ = ""; + permissionship_ = 0; + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + afterResultCursor_ = null; + if (afterResultCursorBuilder_ != null) { + afterResultCursorBuilder_.dispose(); + afterResultCursorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupResourcesResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.LookupResourcesResponse getDefaultInstanceForType() { + return com.authzed.api.v1.LookupResourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.LookupResourcesResponse build() { + com.authzed.api.v1.LookupResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.LookupResourcesResponse buildPartial() { + com.authzed.api.v1.LookupResourcesResponse result = new com.authzed.api.v1.LookupResourcesResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.LookupResourcesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lookedUpAt_ = lookedUpAtBuilder_ == null + ? lookedUpAt_ + : lookedUpAtBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceObjectId_ = resourceObjectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permissionship_ = permissionship_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.partialCaveatInfo_ = partialCaveatInfoBuilder_ == null + ? partialCaveatInfo_ + : partialCaveatInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.afterResultCursor_ = afterResultCursorBuilder_ == null + ? afterResultCursor_ + : afterResultCursorBuilder_.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.LookupResourcesResponse) { + return mergeFrom((com.authzed.api.v1.LookupResourcesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.LookupResourcesResponse other) { + if (other == com.authzed.api.v1.LookupResourcesResponse.getDefaultInstance()) return this; + if (other.hasLookedUpAt()) { + mergeLookedUpAt(other.getLookedUpAt()); + } + if (!other.getResourceObjectId().isEmpty()) { + resourceObjectId_ = other.resourceObjectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.permissionship_ != 0) { + setPermissionshipValue(other.getPermissionshipValue()); + } + if (other.hasPartialCaveatInfo()) { + mergePartialCaveatInfo(other.getPartialCaveatInfo()); + } + if (other.hasAfterResultCursor()) { + mergeAfterResultCursor(other.getAfterResultCursor()); + } + 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( + getLookedUpAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + resourceObjectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + permissionship_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + input.readMessage( + getPartialCaveatInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getAfterResultCursorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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.ZedToken lookedUpAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> lookedUpAtBuilder_; + /** + *
+     * looked_up_at is the ZedToken at which the resource was found.
+     * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return Whether the lookedUpAt field is set. + */ + public boolean hasLookedUpAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * looked_up_at is the ZedToken at which the resource was found.
+     * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return The lookedUpAt. + */ + public com.authzed.api.v1.ZedToken getLookedUpAt() { + if (lookedUpAtBuilder_ == null) { + return lookedUpAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : lookedUpAt_; + } else { + return lookedUpAtBuilder_.getMessage(); + } + } + /** + *
+     * looked_up_at is the ZedToken at which the resource was found.
+     * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public Builder setLookedUpAt(com.authzed.api.v1.ZedToken value) { + if (lookedUpAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lookedUpAt_ = value; + } else { + lookedUpAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * looked_up_at is the ZedToken at which the resource was found.
+     * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public Builder setLookedUpAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (lookedUpAtBuilder_ == null) { + lookedUpAt_ = builderForValue.build(); + } else { + lookedUpAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * looked_up_at is the ZedToken at which the resource was found.
+     * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public Builder mergeLookedUpAt(com.authzed.api.v1.ZedToken value) { + if (lookedUpAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + lookedUpAt_ != null && + lookedUpAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getLookedUpAtBuilder().mergeFrom(value); + } else { + lookedUpAt_ = value; + } + } else { + lookedUpAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * looked_up_at is the ZedToken at which the resource was found.
+     * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public Builder clearLookedUpAt() { + bitField0_ = (bitField0_ & ~0x00000001); + lookedUpAt_ = null; + if (lookedUpAtBuilder_ != null) { + lookedUpAtBuilder_.dispose(); + lookedUpAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * looked_up_at is the ZedToken at which the resource was found.
+     * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getLookedUpAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLookedUpAtFieldBuilder().getBuilder(); + } + /** + *
+     * looked_up_at is the ZedToken at which the resource was found.
+     * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getLookedUpAtOrBuilder() { + if (lookedUpAtBuilder_ != null) { + return lookedUpAtBuilder_.getMessageOrBuilder(); + } else { + return lookedUpAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : lookedUpAt_; + } + } + /** + *
+     * looked_up_at is the ZedToken at which the resource was found.
+     * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getLookedUpAtFieldBuilder() { + if (lookedUpAtBuilder_ == null) { + lookedUpAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getLookedUpAt(), + getParentForChildren(), + isClean()); + lookedUpAt_ = null; + } + return lookedUpAtBuilder_; + } + + private java.lang.Object resourceObjectId_ = ""; + /** + *
+     * resource_object_id is the object ID of the found resource.
+     * 
+ * + * string resource_object_id = 2 [json_name = "resourceObjectId"]; + * @return The resourceObjectId. + */ + public java.lang.String getResourceObjectId() { + java.lang.Object ref = resourceObjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceObjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * resource_object_id is the object ID of the found resource.
+     * 
+ * + * string resource_object_id = 2 [json_name = "resourceObjectId"]; + * @return The bytes for resourceObjectId. + */ + public com.google.protobuf.ByteString + getResourceObjectIdBytes() { + java.lang.Object ref = resourceObjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceObjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * resource_object_id is the object ID of the found resource.
+     * 
+ * + * string resource_object_id = 2 [json_name = "resourceObjectId"]; + * @param value The resourceObjectId to set. + * @return This builder for chaining. + */ + public Builder setResourceObjectId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceObjectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource_object_id is the object ID of the found resource.
+     * 
+ * + * string resource_object_id = 2 [json_name = "resourceObjectId"]; + * @return This builder for chaining. + */ + public Builder clearResourceObjectId() { + resourceObjectId_ = getDefaultInstance().getResourceObjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * resource_object_id is the object ID of the found resource.
+     * 
+ * + * string resource_object_id = 2 [json_name = "resourceObjectId"]; + * @param value The bytes for resourceObjectId to set. + * @return This builder for chaining. + */ + public Builder setResourceObjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceObjectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int permissionship_ = 0; + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 3 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 3 [json_name = "permissionship", (.validate.rules) = { ... } + * @param value The enum numeric value on the wire for permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionshipValue(int value) { + permissionship_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 3 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + @java.lang.Override + public com.authzed.api.v1.LookupPermissionship getPermissionship() { + com.authzed.api.v1.LookupPermissionship result = com.authzed.api.v1.LookupPermissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.LookupPermissionship.UNRECOGNIZED : result; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 3 [json_name = "permissionship", (.validate.rules) = { ... } + * @param value The permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionship(com.authzed.api.v1.LookupPermissionship value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + permissionship_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 3 [json_name = "permissionship", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermissionship() { + bitField0_ = (bitField0_ & ~0x00000004); + permissionship_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> partialCaveatInfoBuilder_; + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + public boolean hasPartialCaveatInfo() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + if (partialCaveatInfoBuilder_ == null) { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } else { + return partialCaveatInfoBuilder_.getMessage(); + } + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder setPartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partialCaveatInfo_ = value; + } else { + partialCaveatInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder setPartialCaveatInfo( + com.authzed.api.v1.PartialCaveatInfo.Builder builderForValue) { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfo_ = builderForValue.build(); + } else { + partialCaveatInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder mergePartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + partialCaveatInfo_ != null && + partialCaveatInfo_ != com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance()) { + getPartialCaveatInfoBuilder().mergeFrom(value); + } else { + partialCaveatInfo_ = value; + } + } else { + partialCaveatInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder clearPartialCaveatInfo() { + bitField0_ = (bitField0_ & ~0x00000008); + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PartialCaveatInfo.Builder getPartialCaveatInfoBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPartialCaveatInfoFieldBuilder().getBuilder(); + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + if (partialCaveatInfoBuilder_ != null) { + return partialCaveatInfoBuilder_.getMessageOrBuilder(); + } else { + return partialCaveatInfo_ == null ? + com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> + getPartialCaveatInfoFieldBuilder() { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder>( + getPartialCaveatInfo(), + getParentForChildren(), + isClean()); + partialCaveatInfo_ = null; + } + return partialCaveatInfoBuilder_; + } + + private com.authzed.api.v1.Cursor afterResultCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> afterResultCursorBuilder_; + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + public boolean hasAfterResultCursor() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + public com.authzed.api.v1.Cursor getAfterResultCursor() { + if (afterResultCursorBuilder_ == null) { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } else { + return afterResultCursorBuilder_.getMessage(); + } + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + */ + public Builder setAfterResultCursor(com.authzed.api.v1.Cursor value) { + if (afterResultCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + afterResultCursor_ = value; + } else { + afterResultCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + */ + public Builder setAfterResultCursor( + com.authzed.api.v1.Cursor.Builder builderForValue) { + if (afterResultCursorBuilder_ == null) { + afterResultCursor_ = builderForValue.build(); + } else { + afterResultCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + */ + public Builder mergeAfterResultCursor(com.authzed.api.v1.Cursor value) { + if (afterResultCursorBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + afterResultCursor_ != null && + afterResultCursor_ != com.authzed.api.v1.Cursor.getDefaultInstance()) { + getAfterResultCursorBuilder().mergeFrom(value); + } else { + afterResultCursor_ = value; + } + } else { + afterResultCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + */ + public Builder clearAfterResultCursor() { + bitField0_ = (bitField0_ & ~0x00000010); + afterResultCursor_ = null; + if (afterResultCursorBuilder_ != null) { + afterResultCursorBuilder_.dispose(); + afterResultCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + */ + public com.authzed.api.v1.Cursor.Builder getAfterResultCursorBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getAfterResultCursorFieldBuilder().getBuilder(); + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + */ + public com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder() { + if (afterResultCursorBuilder_ != null) { + return afterResultCursorBuilder_.getMessageOrBuilder(); + } else { + return afterResultCursor_ == null ? + com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> + getAfterResultCursorFieldBuilder() { + if (afterResultCursorBuilder_ == null) { + afterResultCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder>( + getAfterResultCursor(), + getParentForChildren(), + isClean()); + afterResultCursor_ = null; + } + return afterResultCursorBuilder_; + } + @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.LookupResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.LookupResourcesResponse) + private static final com.authzed.api.v1.LookupResourcesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.LookupResourcesResponse(); + } + + public static com.authzed.api.v1.LookupResourcesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupResourcesResponse 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.LookupResourcesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/LookupResourcesResponseOrBuilder.java b/generated/com/authzed/api/v1/LookupResourcesResponseOrBuilder.java new file mode 100644 index 00000000..d07675b8 --- /dev/null +++ b/generated/com/authzed/api/v1/LookupResourcesResponseOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface LookupResourcesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.LookupResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * looked_up_at is the ZedToken at which the resource was found.
+   * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return Whether the lookedUpAt field is set. + */ + boolean hasLookedUpAt(); + /** + *
+   * looked_up_at is the ZedToken at which the resource was found.
+   * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return The lookedUpAt. + */ + com.authzed.api.v1.ZedToken getLookedUpAt(); + /** + *
+   * looked_up_at is the ZedToken at which the resource was found.
+   * 
+ * + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getLookedUpAtOrBuilder(); + + /** + *
+   * resource_object_id is the object ID of the found resource.
+   * 
+ * + * string resource_object_id = 2 [json_name = "resourceObjectId"]; + * @return The resourceObjectId. + */ + java.lang.String getResourceObjectId(); + /** + *
+   * resource_object_id is the object ID of the found resource.
+   * 
+ * + * string resource_object_id = 2 [json_name = "resourceObjectId"]; + * @return The bytes for resourceObjectId. + */ + com.google.protobuf.ByteString + getResourceObjectIdBytes(); + + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 3 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + int getPermissionshipValue(); + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 3 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + com.authzed.api.v1.LookupPermissionship getPermissionship(); + + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + boolean hasPartialCaveatInfo(); + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo(); + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 4 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder(); + + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + boolean hasAfterResultCursor(); + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + com.authzed.api.v1.Cursor getAfterResultCursor(); + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 5 [json_name = "afterResultCursor"]; + */ + com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/LookupSubjectsRequest.java b/generated/com/authzed/api/v1/LookupSubjectsRequest.java new file mode 100644 index 00000000..ce6ac777 --- /dev/null +++ b/generated/com/authzed/api/v1/LookupSubjectsRequest.java @@ -0,0 +1,2218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * LookupSubjectsRequest performs a lookup of all subjects of a particular
+ * kind for which the subject has the specified permission or the relation in
+ * which the subject exists, streaming back the IDs of those subjects.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.LookupSubjectsRequest} + */ +public final class LookupSubjectsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.LookupSubjectsRequest) + LookupSubjectsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use LookupSubjectsRequest.newBuilder() to construct. + private LookupSubjectsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LookupSubjectsRequest() { + permission_ = ""; + subjectObjectType_ = ""; + optionalSubjectRelation_ = ""; + wildcardOption_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LookupSubjectsRequest(); + } + + @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.PermissionService.internal_static_authzed_api_v1_LookupSubjectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupSubjectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.LookupSubjectsRequest.class, com.authzed.api.v1.LookupSubjectsRequest.Builder.class); + } + + /** + * Protobuf enum {@code authzed.api.v1.LookupSubjectsRequest.WildcardOption} + */ + public enum WildcardOption + implements com.google.protobuf.ProtocolMessageEnum { + /** + * WILDCARD_OPTION_UNSPECIFIED = 0; + */ + WILDCARD_OPTION_UNSPECIFIED(0), + /** + * WILDCARD_OPTION_INCLUDE_WILDCARDS = 1; + */ + WILDCARD_OPTION_INCLUDE_WILDCARDS(1), + /** + * WILDCARD_OPTION_EXCLUDE_WILDCARDS = 2; + */ + WILDCARD_OPTION_EXCLUDE_WILDCARDS(2), + UNRECOGNIZED(-1), + ; + + /** + * WILDCARD_OPTION_UNSPECIFIED = 0; + */ + public static final int WILDCARD_OPTION_UNSPECIFIED_VALUE = 0; + /** + * WILDCARD_OPTION_INCLUDE_WILDCARDS = 1; + */ + public static final int WILDCARD_OPTION_INCLUDE_WILDCARDS_VALUE = 1; + /** + * WILDCARD_OPTION_EXCLUDE_WILDCARDS = 2; + */ + public static final int WILDCARD_OPTION_EXCLUDE_WILDCARDS_VALUE = 2; + + + 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 WildcardOption 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 WildcardOption forNumber(int value) { + switch (value) { + case 0: return WILDCARD_OPTION_UNSPECIFIED; + case 1: return WILDCARD_OPTION_INCLUDE_WILDCARDS; + case 2: return WILDCARD_OPTION_EXCLUDE_WILDCARDS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WildcardOption> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WildcardOption findValueByNumber(int number) { + return WildcardOption.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.LookupSubjectsRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final WildcardOption[] VALUES = values(); + + public static WildcardOption 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 WildcardOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v1.LookupSubjectsRequest.WildcardOption) + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int RESOURCE_FIELD_NUMBER = 2; + private com.authzed.api.v1.ObjectReference resource_; + /** + *
+   * resource is the resource for which all matching subjects for the permission
+   * or relation will be returned.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+   * resource is the resource for which all matching subjects for the permission
+   * or relation will be returned.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getResource() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + /** + *
+   * resource is the resource for which all matching subjects for the permission
+   * or relation will be returned.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + + public static final int PERMISSION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object permission_ = ""; + /** + *
+   * permission is the name of the permission (or relation) for which to find
+   * the subjects.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + *
+   * permission is the name of the permission (or relation) for which to find
+   * the subjects.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_OBJECT_TYPE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object subjectObjectType_ = ""; + /** + *
+   * subject_object_type is the type of subject object for which the IDs will
+   * be returned.
+   * 
+ * + * string subject_object_type = 4 [json_name = "subjectObjectType", (.validate.rules) = { ... } + * @return The subjectObjectType. + */ + @java.lang.Override + public java.lang.String getSubjectObjectType() { + java.lang.Object ref = subjectObjectType_; + 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(); + subjectObjectType_ = s; + return s; + } + } + /** + *
+   * subject_object_type is the type of subject object for which the IDs will
+   * be returned.
+   * 
+ * + * string subject_object_type = 4 [json_name = "subjectObjectType", (.validate.rules) = { ... } + * @return The bytes for subjectObjectType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectObjectTypeBytes() { + java.lang.Object ref = subjectObjectType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectObjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_SUBJECT_RELATION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalSubjectRelation_ = ""; + /** + *
+   * optional_subject_relation is the optional relation for the subject.
+   * 
+ * + * string optional_subject_relation = 5 [json_name = "optionalSubjectRelation", (.validate.rules) = { ... } + * @return The optionalSubjectRelation. + */ + @java.lang.Override + public java.lang.String getOptionalSubjectRelation() { + java.lang.Object ref = optionalSubjectRelation_; + 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(); + optionalSubjectRelation_ = s; + return s; + } + } + /** + *
+   * optional_subject_relation is the optional relation for the subject.
+   * 
+ * + * string optional_subject_relation = 5 [json_name = "optionalSubjectRelation", (.validate.rules) = { ... } + * @return The bytes for optionalSubjectRelation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalSubjectRelationBytes() { + java.lang.Object ref = optionalSubjectRelation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalSubjectRelation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTEXT_FIELD_NUMBER = 6; + private com.google.protobuf.Struct context_; + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.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 named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getContextOrBuilder() { + return context_ == null ? com.google.protobuf.Struct.getDefaultInstance() : context_; + } + + public static final int OPTIONAL_CONCRETE_LIMIT_FIELD_NUMBER = 7; + private int optionalConcreteLimit_ = 0; + /** + *
+   * optional_concrete_limit, if non-zero, specifies the limit on the number of
+   * *concrete* (non-wildcard) subjects to return before the stream is closed on the
+   * server side. With the default value of zero, the stream will continue resolving
+   * concrete subjects until exhausted or the stream is closed due to the client or
+   * a network issue.
+   * NOTE: Wildcard subjects ("*") have special treatment when cursors and limits are used. Because
+   * wildcards can apply to *any* concrete subjects, if a wildcard subject is found within the dataset,
+   * a wildcard subject can be returned for *all* LookupSubjects calls, regardless of the cursor or
+   * limit.
+   * For example, if wildcards are requested, a wildcard subject exists, there is a specified limit
+   * of 10 concrete subjects, and at least 10 concrete subjects exist, the API will return 11 subjects
+   * in total: the 10 concrete + the wildcard
+   * Furthermore, if a wildcard has a set of exclusions generated by the dataset,
+   * the exclusions *will respect the cursor* and only a *partial* set of exclusions will be returned
+   * for each invocation of the API.
+   * ***IT IS UP TO THE CALLER IN THIS CASE TO COMBINE THE EXCLUSIONS IF DESIRED***
+   * 
+ * + * uint32 optional_concrete_limit = 7 [json_name = "optionalConcreteLimit", (.validate.rules) = { ... } + * @return The optionalConcreteLimit. + */ + @java.lang.Override + public int getOptionalConcreteLimit() { + return optionalConcreteLimit_; + } + + public static final int OPTIONAL_CURSOR_FIELD_NUMBER = 8; + private com.authzed.api.v1.Cursor optionalCursor_; + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupSubjectsResponse object.
+   * NOTE: See above for notes about how cursors interact with wildcard subjects.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + @java.lang.Override + public boolean hasOptionalCursor() { + return optionalCursor_ != null; + } + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupSubjectsResponse object.
+   * NOTE: See above for notes about how cursors interact with wildcard subjects.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + @java.lang.Override + public com.authzed.api.v1.Cursor getOptionalCursor() { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupSubjectsResponse object.
+   * NOTE: See above for notes about how cursors interact with wildcard subjects.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + */ + @java.lang.Override + public com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder() { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + + public static final int WILDCARD_OPTION_FIELD_NUMBER = 9; + private int wildcardOption_ = 0; + /** + *
+   * wildcard_option specifies whether wildcards should be returned by LookupSubjects.
+   * For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
+   * 
+ * + * .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9 [json_name = "wildcardOption"]; + * @return The enum numeric value on the wire for wildcardOption. + */ + @java.lang.Override public int getWildcardOptionValue() { + return wildcardOption_; + } + /** + *
+   * wildcard_option specifies whether wildcards should be returned by LookupSubjects.
+   * For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
+   * 
+ * + * .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9 [json_name = "wildcardOption"]; + * @return The wildcardOption. + */ + @java.lang.Override public com.authzed.api.v1.LookupSubjectsRequest.WildcardOption getWildcardOption() { + com.authzed.api.v1.LookupSubjectsRequest.WildcardOption result = com.authzed.api.v1.LookupSubjectsRequest.WildcardOption.forNumber(wildcardOption_); + return result == null ? com.authzed.api.v1.LookupSubjectsRequest.WildcardOption.UNRECOGNIZED : result; + } + + 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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + if (resource_ != null) { + output.writeMessage(2, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, permission_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectObjectType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subjectObjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalSubjectRelation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, optionalSubjectRelation_); + } + if (context_ != null) { + output.writeMessage(6, getContext()); + } + if (optionalConcreteLimit_ != 0) { + output.writeUInt32(7, optionalConcreteLimit_); + } + if (optionalCursor_ != null) { + output.writeMessage(8, getOptionalCursor()); + } + if (wildcardOption_ != com.authzed.api.v1.LookupSubjectsRequest.WildcardOption.WILDCARD_OPTION_UNSPECIFIED.getNumber()) { + output.writeEnum(9, wildcardOption_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, permission_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectObjectType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, subjectObjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalSubjectRelation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, optionalSubjectRelation_); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getContext()); + } + if (optionalConcreteLimit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, optionalConcreteLimit_); + } + if (optionalCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getOptionalCursor()); + } + if (wildcardOption_ != com.authzed.api.v1.LookupSubjectsRequest.WildcardOption.WILDCARD_OPTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, wildcardOption_); + } + 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.LookupSubjectsRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.LookupSubjectsRequest other = (com.authzed.api.v1.LookupSubjectsRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (!getPermission() + .equals(other.getPermission())) return false; + if (!getSubjectObjectType() + .equals(other.getSubjectObjectType())) return false; + if (!getOptionalSubjectRelation() + .equals(other.getOptionalSubjectRelation())) return false; + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (getOptionalConcreteLimit() + != other.getOptionalConcreteLimit()) return false; + if (hasOptionalCursor() != other.hasOptionalCursor()) return false; + if (hasOptionalCursor()) { + if (!getOptionalCursor() + .equals(other.getOptionalCursor())) return false; + } + if (wildcardOption_ != other.wildcardOption_) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + hash = (37 * hash) + SUBJECT_OBJECT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getSubjectObjectType().hashCode(); + hash = (37 * hash) + OPTIONAL_SUBJECT_RELATION_FIELD_NUMBER; + hash = (53 * hash) + getOptionalSubjectRelation().hashCode(); + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + hash = (37 * hash) + OPTIONAL_CONCRETE_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getOptionalConcreteLimit(); + if (hasOptionalCursor()) { + hash = (37 * hash) + OPTIONAL_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getOptionalCursor().hashCode(); + } + hash = (37 * hash) + WILDCARD_OPTION_FIELD_NUMBER; + hash = (53 * hash) + wildcardOption_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.LookupSubjectsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupSubjectsRequest 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.LookupSubjectsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupSubjectsRequest 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.LookupSubjectsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupSubjectsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.LookupSubjectsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupSubjectsRequest 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.LookupSubjectsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupSubjectsRequest 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.LookupSubjectsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupSubjectsRequest 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.LookupSubjectsRequest 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; + } + /** + *
+   * LookupSubjectsRequest performs a lookup of all subjects of a particular
+   * kind for which the subject has the specified permission or the relation in
+   * which the subject exists, streaming back the IDs of those subjects.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.LookupSubjectsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.LookupSubjectsRequest) + com.authzed.api.v1.LookupSubjectsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupSubjectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupSubjectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.LookupSubjectsRequest.class, com.authzed.api.v1.LookupSubjectsRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.LookupSubjectsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + permission_ = ""; + subjectObjectType_ = ""; + optionalSubjectRelation_ = ""; + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + optionalConcreteLimit_ = 0; + optionalCursor_ = null; + if (optionalCursorBuilder_ != null) { + optionalCursorBuilder_.dispose(); + optionalCursorBuilder_ = null; + } + wildcardOption_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupSubjectsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.LookupSubjectsRequest getDefaultInstanceForType() { + return com.authzed.api.v1.LookupSubjectsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.LookupSubjectsRequest build() { + com.authzed.api.v1.LookupSubjectsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.LookupSubjectsRequest buildPartial() { + com.authzed.api.v1.LookupSubjectsRequest result = new com.authzed.api.v1.LookupSubjectsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.LookupSubjectsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resource_ = resourceBuilder_ == null + ? resource_ + : resourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permission_ = permission_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.subjectObjectType_ = subjectObjectType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.optionalSubjectRelation_ = optionalSubjectRelation_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.context_ = contextBuilder_ == null + ? context_ + : contextBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.optionalConcreteLimit_ = optionalConcreteLimit_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.optionalCursor_ = optionalCursorBuilder_ == null + ? optionalCursor_ + : optionalCursorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.wildcardOption_ = wildcardOption_; + } + } + + @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.LookupSubjectsRequest) { + return mergeFrom((com.authzed.api.v1.LookupSubjectsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.LookupSubjectsRequest other) { + if (other == com.authzed.api.v1.LookupSubjectsRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getSubjectObjectType().isEmpty()) { + subjectObjectType_ = other.subjectObjectType_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOptionalSubjectRelation().isEmpty()) { + optionalSubjectRelation_ = other.optionalSubjectRelation_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (other.getOptionalConcreteLimit() != 0) { + setOptionalConcreteLimit(other.getOptionalConcreteLimit()); + } + if (other.hasOptionalCursor()) { + mergeOptionalCursor(other.getOptionalCursor()); + } + if (other.wildcardOption_ != 0) { + setWildcardOptionValue(other.getWildcardOptionValue()); + } + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getResourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + permission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + subjectObjectType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + optionalSubjectRelation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getContextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + optionalConcreteLimit_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + input.readMessage( + getOptionalCursorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: { + wildcardOption_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + 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.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private com.authzed.api.v1.ObjectReference resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> resourceBuilder_; + /** + *
+     * resource is the resource for which all matching subjects for the permission
+     * or relation will be returned.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * resource is the resource for which all matching subjects for the permission
+     * or relation will be returned.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + public com.authzed.api.v1.ObjectReference getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+     * resource is the resource for which all matching subjects for the permission
+     * or relation will be returned.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + } else { + resourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource for which all matching subjects for the permission
+     * or relation will be returned.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource( + com.authzed.api.v1.ObjectReference.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource for which all matching subjects for the permission
+     * or relation will be returned.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder mergeResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + resource_ != null && + resource_ != com.authzed.api.v1.ObjectReference.getDefaultInstance()) { + getResourceBuilder().mergeFrom(value); + } else { + resource_ = value; + } + } else { + resourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * resource is the resource for which all matching subjects for the permission
+     * or relation will be returned.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder clearResource() { + bitField0_ = (bitField0_ & ~0x00000002); + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * resource is the resource for which all matching subjects for the permission
+     * or relation will be returned.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReference.Builder getResourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+     * resource is the resource for which all matching subjects for the permission
+     * or relation will be returned.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + } + /** + *
+     * resource is the resource for which all matching subjects for the permission
+     * or relation will be returned.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private java.lang.Object permission_ = ""; + /** + *
+     * permission is the name of the permission (or relation) for which to find
+     * the subjects.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * permission is the name of the permission (or relation) for which to find
+     * the subjects.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * permission is the name of the permission (or relation) for which to find
+     * the subjects.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * permission is the name of the permission (or relation) for which to find
+     * the subjects.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermission() { + permission_ = getDefaultInstance().getPermission(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * permission is the name of the permission (or relation) for which to find
+     * the subjects.
+     * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object subjectObjectType_ = ""; + /** + *
+     * subject_object_type is the type of subject object for which the IDs will
+     * be returned.
+     * 
+ * + * string subject_object_type = 4 [json_name = "subjectObjectType", (.validate.rules) = { ... } + * @return The subjectObjectType. + */ + public java.lang.String getSubjectObjectType() { + java.lang.Object ref = subjectObjectType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectObjectType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * subject_object_type is the type of subject object for which the IDs will
+     * be returned.
+     * 
+ * + * string subject_object_type = 4 [json_name = "subjectObjectType", (.validate.rules) = { ... } + * @return The bytes for subjectObjectType. + */ + public com.google.protobuf.ByteString + getSubjectObjectTypeBytes() { + java.lang.Object ref = subjectObjectType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectObjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * subject_object_type is the type of subject object for which the IDs will
+     * be returned.
+     * 
+ * + * string subject_object_type = 4 [json_name = "subjectObjectType", (.validate.rules) = { ... } + * @param value The subjectObjectType to set. + * @return This builder for chaining. + */ + public Builder setSubjectObjectType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subjectObjectType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * subject_object_type is the type of subject object for which the IDs will
+     * be returned.
+     * 
+ * + * string subject_object_type = 4 [json_name = "subjectObjectType", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearSubjectObjectType() { + subjectObjectType_ = getDefaultInstance().getSubjectObjectType(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * subject_object_type is the type of subject object for which the IDs will
+     * be returned.
+     * 
+ * + * string subject_object_type = 4 [json_name = "subjectObjectType", (.validate.rules) = { ... } + * @param value The bytes for subjectObjectType to set. + * @return This builder for chaining. + */ + public Builder setSubjectObjectTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subjectObjectType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object optionalSubjectRelation_ = ""; + /** + *
+     * optional_subject_relation is the optional relation for the subject.
+     * 
+ * + * string optional_subject_relation = 5 [json_name = "optionalSubjectRelation", (.validate.rules) = { ... } + * @return The optionalSubjectRelation. + */ + public java.lang.String getOptionalSubjectRelation() { + java.lang.Object ref = optionalSubjectRelation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalSubjectRelation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_subject_relation is the optional relation for the subject.
+     * 
+ * + * string optional_subject_relation = 5 [json_name = "optionalSubjectRelation", (.validate.rules) = { ... } + * @return The bytes for optionalSubjectRelation. + */ + public com.google.protobuf.ByteString + getOptionalSubjectRelationBytes() { + java.lang.Object ref = optionalSubjectRelation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalSubjectRelation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_subject_relation is the optional relation for the subject.
+     * 
+ * + * string optional_subject_relation = 5 [json_name = "optionalSubjectRelation", (.validate.rules) = { ... } + * @param value The optionalSubjectRelation to set. + * @return This builder for chaining. + */ + public Builder setOptionalSubjectRelation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalSubjectRelation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * optional_subject_relation is the optional relation for the subject.
+     * 
+ * + * string optional_subject_relation = 5 [json_name = "optionalSubjectRelation", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalSubjectRelation() { + optionalSubjectRelation_ = getDefaultInstance().getOptionalSubjectRelation(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * optional_subject_relation is the optional relation for the subject.
+     * 
+ * + * string optional_subject_relation = 5 [json_name = "optionalSubjectRelation", (.validate.rules) = { ... } + * @param value The bytes for optionalSubjectRelation to set. + * @return This builder for chaining. + */ + public Builder setOptionalSubjectRelationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalSubjectRelation_ = value; + bitField0_ |= 0x00000010; + 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 named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.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 named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.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_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder setContext( + com.google.protobuf.Struct.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder mergeContext(com.google.protobuf.Struct value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + context_ != null && + context_ != com.google.protobuf.Struct.getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.validate.rules) = { ... } + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000020); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.validate.rules) = { ... } + */ + public com.google.protobuf.Struct.Builder getContextBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * context consists of named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.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 named values that are injected into the caveat evaluation context
+     * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.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_; + } + + private int optionalConcreteLimit_ ; + /** + *
+     * optional_concrete_limit, if non-zero, specifies the limit on the number of
+     * *concrete* (non-wildcard) subjects to return before the stream is closed on the
+     * server side. With the default value of zero, the stream will continue resolving
+     * concrete subjects until exhausted or the stream is closed due to the client or
+     * a network issue.
+     * NOTE: Wildcard subjects ("*") have special treatment when cursors and limits are used. Because
+     * wildcards can apply to *any* concrete subjects, if a wildcard subject is found within the dataset,
+     * a wildcard subject can be returned for *all* LookupSubjects calls, regardless of the cursor or
+     * limit.
+     * For example, if wildcards are requested, a wildcard subject exists, there is a specified limit
+     * of 10 concrete subjects, and at least 10 concrete subjects exist, the API will return 11 subjects
+     * in total: the 10 concrete + the wildcard
+     * Furthermore, if a wildcard has a set of exclusions generated by the dataset,
+     * the exclusions *will respect the cursor* and only a *partial* set of exclusions will be returned
+     * for each invocation of the API.
+     * ***IT IS UP TO THE CALLER IN THIS CASE TO COMBINE THE EXCLUSIONS IF DESIRED***
+     * 
+ * + * uint32 optional_concrete_limit = 7 [json_name = "optionalConcreteLimit", (.validate.rules) = { ... } + * @return The optionalConcreteLimit. + */ + @java.lang.Override + public int getOptionalConcreteLimit() { + return optionalConcreteLimit_; + } + /** + *
+     * optional_concrete_limit, if non-zero, specifies the limit on the number of
+     * *concrete* (non-wildcard) subjects to return before the stream is closed on the
+     * server side. With the default value of zero, the stream will continue resolving
+     * concrete subjects until exhausted or the stream is closed due to the client or
+     * a network issue.
+     * NOTE: Wildcard subjects ("*") have special treatment when cursors and limits are used. Because
+     * wildcards can apply to *any* concrete subjects, if a wildcard subject is found within the dataset,
+     * a wildcard subject can be returned for *all* LookupSubjects calls, regardless of the cursor or
+     * limit.
+     * For example, if wildcards are requested, a wildcard subject exists, there is a specified limit
+     * of 10 concrete subjects, and at least 10 concrete subjects exist, the API will return 11 subjects
+     * in total: the 10 concrete + the wildcard
+     * Furthermore, if a wildcard has a set of exclusions generated by the dataset,
+     * the exclusions *will respect the cursor* and only a *partial* set of exclusions will be returned
+     * for each invocation of the API.
+     * ***IT IS UP TO THE CALLER IN THIS CASE TO COMBINE THE EXCLUSIONS IF DESIRED***
+     * 
+ * + * uint32 optional_concrete_limit = 7 [json_name = "optionalConcreteLimit", (.validate.rules) = { ... } + * @param value The optionalConcreteLimit to set. + * @return This builder for chaining. + */ + public Builder setOptionalConcreteLimit(int value) { + + optionalConcreteLimit_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * optional_concrete_limit, if non-zero, specifies the limit on the number of
+     * *concrete* (non-wildcard) subjects to return before the stream is closed on the
+     * server side. With the default value of zero, the stream will continue resolving
+     * concrete subjects until exhausted or the stream is closed due to the client or
+     * a network issue.
+     * NOTE: Wildcard subjects ("*") have special treatment when cursors and limits are used. Because
+     * wildcards can apply to *any* concrete subjects, if a wildcard subject is found within the dataset,
+     * a wildcard subject can be returned for *all* LookupSubjects calls, regardless of the cursor or
+     * limit.
+     * For example, if wildcards are requested, a wildcard subject exists, there is a specified limit
+     * of 10 concrete subjects, and at least 10 concrete subjects exist, the API will return 11 subjects
+     * in total: the 10 concrete + the wildcard
+     * Furthermore, if a wildcard has a set of exclusions generated by the dataset,
+     * the exclusions *will respect the cursor* and only a *partial* set of exclusions will be returned
+     * for each invocation of the API.
+     * ***IT IS UP TO THE CALLER IN THIS CASE TO COMBINE THE EXCLUSIONS IF DESIRED***
+     * 
+ * + * uint32 optional_concrete_limit = 7 [json_name = "optionalConcreteLimit", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalConcreteLimit() { + bitField0_ = (bitField0_ & ~0x00000040); + optionalConcreteLimit_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.Cursor optionalCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> optionalCursorBuilder_; + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupSubjectsResponse object.
+     * NOTE: See above for notes about how cursors interact with wildcard subjects.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + public boolean hasOptionalCursor() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupSubjectsResponse object.
+     * NOTE: See above for notes about how cursors interact with wildcard subjects.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + public com.authzed.api.v1.Cursor getOptionalCursor() { + if (optionalCursorBuilder_ == null) { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } else { + return optionalCursorBuilder_.getMessage(); + } + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupSubjectsResponse object.
+     * NOTE: See above for notes about how cursors interact with wildcard subjects.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + */ + public Builder setOptionalCursor(com.authzed.api.v1.Cursor value) { + if (optionalCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalCursor_ = value; + } else { + optionalCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupSubjectsResponse object.
+     * NOTE: See above for notes about how cursors interact with wildcard subjects.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + */ + public Builder setOptionalCursor( + com.authzed.api.v1.Cursor.Builder builderForValue) { + if (optionalCursorBuilder_ == null) { + optionalCursor_ = builderForValue.build(); + } else { + optionalCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupSubjectsResponse object.
+     * NOTE: See above for notes about how cursors interact with wildcard subjects.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + */ + public Builder mergeOptionalCursor(com.authzed.api.v1.Cursor value) { + if (optionalCursorBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + optionalCursor_ != null && + optionalCursor_ != com.authzed.api.v1.Cursor.getDefaultInstance()) { + getOptionalCursorBuilder().mergeFrom(value); + } else { + optionalCursor_ = value; + } + } else { + optionalCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupSubjectsResponse object.
+     * NOTE: See above for notes about how cursors interact with wildcard subjects.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + */ + public Builder clearOptionalCursor() { + bitField0_ = (bitField0_ & ~0x00000080); + optionalCursor_ = null; + if (optionalCursorBuilder_ != null) { + optionalCursorBuilder_.dispose(); + optionalCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupSubjectsResponse object.
+     * NOTE: See above for notes about how cursors interact with wildcard subjects.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + */ + public com.authzed.api.v1.Cursor.Builder getOptionalCursorBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getOptionalCursorFieldBuilder().getBuilder(); + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupSubjectsResponse object.
+     * NOTE: See above for notes about how cursors interact with wildcard subjects.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + */ + public com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder() { + if (optionalCursorBuilder_ != null) { + return optionalCursorBuilder_.getMessageOrBuilder(); + } else { + return optionalCursor_ == null ? + com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the LookupSubjectsResponse object.
+     * NOTE: See above for notes about how cursors interact with wildcard subjects.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> + getOptionalCursorFieldBuilder() { + if (optionalCursorBuilder_ == null) { + optionalCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder>( + getOptionalCursor(), + getParentForChildren(), + isClean()); + optionalCursor_ = null; + } + return optionalCursorBuilder_; + } + + private int wildcardOption_ = 0; + /** + *
+     * wildcard_option specifies whether wildcards should be returned by LookupSubjects.
+     * For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
+     * 
+ * + * .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9 [json_name = "wildcardOption"]; + * @return The enum numeric value on the wire for wildcardOption. + */ + @java.lang.Override public int getWildcardOptionValue() { + return wildcardOption_; + } + /** + *
+     * wildcard_option specifies whether wildcards should be returned by LookupSubjects.
+     * For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
+     * 
+ * + * .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9 [json_name = "wildcardOption"]; + * @param value The enum numeric value on the wire for wildcardOption to set. + * @return This builder for chaining. + */ + public Builder setWildcardOptionValue(int value) { + wildcardOption_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * wildcard_option specifies whether wildcards should be returned by LookupSubjects.
+     * For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
+     * 
+ * + * .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9 [json_name = "wildcardOption"]; + * @return The wildcardOption. + */ + @java.lang.Override + public com.authzed.api.v1.LookupSubjectsRequest.WildcardOption getWildcardOption() { + com.authzed.api.v1.LookupSubjectsRequest.WildcardOption result = com.authzed.api.v1.LookupSubjectsRequest.WildcardOption.forNumber(wildcardOption_); + return result == null ? com.authzed.api.v1.LookupSubjectsRequest.WildcardOption.UNRECOGNIZED : result; + } + /** + *
+     * wildcard_option specifies whether wildcards should be returned by LookupSubjects.
+     * For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
+     * 
+ * + * .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9 [json_name = "wildcardOption"]; + * @param value The wildcardOption to set. + * @return This builder for chaining. + */ + public Builder setWildcardOption(com.authzed.api.v1.LookupSubjectsRequest.WildcardOption value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + wildcardOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * wildcard_option specifies whether wildcards should be returned by LookupSubjects.
+     * For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
+     * 
+ * + * .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9 [json_name = "wildcardOption"]; + * @return This builder for chaining. + */ + public Builder clearWildcardOption() { + bitField0_ = (bitField0_ & ~0x00000100); + wildcardOption_ = 0; + 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.LookupSubjectsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.LookupSubjectsRequest) + private static final com.authzed.api.v1.LookupSubjectsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.LookupSubjectsRequest(); + } + + public static com.authzed.api.v1.LookupSubjectsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupSubjectsRequest 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.LookupSubjectsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/LookupSubjectsRequestOrBuilder.java b/generated/com/authzed/api/v1/LookupSubjectsRequestOrBuilder.java new file mode 100644 index 00000000..3599a1dc --- /dev/null +++ b/generated/com/authzed/api/v1/LookupSubjectsRequestOrBuilder.java @@ -0,0 +1,224 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface LookupSubjectsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.LookupSubjectsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + *
+   * resource is the resource for which all matching subjects for the permission
+   * or relation will be returned.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+   * resource is the resource for which all matching subjects for the permission
+   * or relation will be returned.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + com.authzed.api.v1.ObjectReference getResource(); + /** + *
+   * resource is the resource for which all matching subjects for the permission
+   * or relation will be returned.
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder(); + + /** + *
+   * permission is the name of the permission (or relation) for which to find
+   * the subjects.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + java.lang.String getPermission(); + /** + *
+   * permission is the name of the permission (or relation) for which to find
+   * the subjects.
+   * 
+ * + * string permission = 3 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + *
+   * subject_object_type is the type of subject object for which the IDs will
+   * be returned.
+   * 
+ * + * string subject_object_type = 4 [json_name = "subjectObjectType", (.validate.rules) = { ... } + * @return The subjectObjectType. + */ + java.lang.String getSubjectObjectType(); + /** + *
+   * subject_object_type is the type of subject object for which the IDs will
+   * be returned.
+   * 
+ * + * string subject_object_type = 4 [json_name = "subjectObjectType", (.validate.rules) = { ... } + * @return The bytes for subjectObjectType. + */ + com.google.protobuf.ByteString + getSubjectObjectTypeBytes(); + + /** + *
+   * optional_subject_relation is the optional relation for the subject.
+   * 
+ * + * string optional_subject_relation = 5 [json_name = "optionalSubjectRelation", (.validate.rules) = { ... } + * @return The optionalSubjectRelation. + */ + java.lang.String getOptionalSubjectRelation(); + /** + *
+   * optional_subject_relation is the optional relation for the subject.
+   * 
+ * + * string optional_subject_relation = 5 [json_name = "optionalSubjectRelation", (.validate.rules) = { ... } + * @return The bytes for optionalSubjectRelation. + */ + com.google.protobuf.ByteString + getOptionalSubjectRelationBytes(); + + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.validate.rules) = { ... } + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.validate.rules) = { ... } + * @return The context. + */ + com.google.protobuf.Struct getContext(); + /** + *
+   * context consists of named values that are injected into the caveat evaluation context
+   * 
+ * + * .google.protobuf.Struct context = 6 [json_name = "context", (.validate.rules) = { ... } + */ + com.google.protobuf.StructOrBuilder getContextOrBuilder(); + + /** + *
+   * optional_concrete_limit, if non-zero, specifies the limit on the number of
+   * *concrete* (non-wildcard) subjects to return before the stream is closed on the
+   * server side. With the default value of zero, the stream will continue resolving
+   * concrete subjects until exhausted or the stream is closed due to the client or
+   * a network issue.
+   * NOTE: Wildcard subjects ("*") have special treatment when cursors and limits are used. Because
+   * wildcards can apply to *any* concrete subjects, if a wildcard subject is found within the dataset,
+   * a wildcard subject can be returned for *all* LookupSubjects calls, regardless of the cursor or
+   * limit.
+   * For example, if wildcards are requested, a wildcard subject exists, there is a specified limit
+   * of 10 concrete subjects, and at least 10 concrete subjects exist, the API will return 11 subjects
+   * in total: the 10 concrete + the wildcard
+   * Furthermore, if a wildcard has a set of exclusions generated by the dataset,
+   * the exclusions *will respect the cursor* and only a *partial* set of exclusions will be returned
+   * for each invocation of the API.
+   * ***IT IS UP TO THE CALLER IN THIS CASE TO COMBINE THE EXCLUSIONS IF DESIRED***
+   * 
+ * + * uint32 optional_concrete_limit = 7 [json_name = "optionalConcreteLimit", (.validate.rules) = { ... } + * @return The optionalConcreteLimit. + */ + int getOptionalConcreteLimit(); + + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupSubjectsResponse object.
+   * NOTE: See above for notes about how cursors interact with wildcard subjects.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + boolean hasOptionalCursor(); + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupSubjectsResponse object.
+   * NOTE: See above for notes about how cursors interact with wildcard subjects.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + com.authzed.api.v1.Cursor getOptionalCursor(); + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the LookupSubjectsResponse object.
+   * NOTE: See above for notes about how cursors interact with wildcard subjects.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 8 [json_name = "optionalCursor"]; + */ + com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder(); + + /** + *
+   * wildcard_option specifies whether wildcards should be returned by LookupSubjects.
+   * For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
+   * 
+ * + * .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9 [json_name = "wildcardOption"]; + * @return The enum numeric value on the wire for wildcardOption. + */ + int getWildcardOptionValue(); + /** + *
+   * wildcard_option specifies whether wildcards should be returned by LookupSubjects.
+   * For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
+   * 
+ * + * .authzed.api.v1.LookupSubjectsRequest.WildcardOption wildcard_option = 9 [json_name = "wildcardOption"]; + * @return The wildcardOption. + */ + com.authzed.api.v1.LookupSubjectsRequest.WildcardOption getWildcardOption(); +} diff --git a/generated/com/authzed/api/v1/LookupSubjectsResponse.java b/generated/com/authzed/api/v1/LookupSubjectsResponse.java new file mode 100644 index 00000000..c20a4146 --- /dev/null +++ b/generated/com/authzed/api/v1/LookupSubjectsResponse.java @@ -0,0 +1,2443 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * LookupSubjectsResponse contains a single matching subject object ID for the
+ * requested subject object type on the permission or relation.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.LookupSubjectsResponse} + */ +public final class LookupSubjectsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.LookupSubjectsResponse) + LookupSubjectsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use LookupSubjectsResponse.newBuilder() to construct. + private LookupSubjectsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LookupSubjectsResponse() { + subjectObjectId_ = ""; + excludedSubjectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + permissionship_ = 0; + excludedSubjects_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LookupSubjectsResponse(); + } + + @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.PermissionService.internal_static_authzed_api_v1_LookupSubjectsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupSubjectsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.LookupSubjectsResponse.class, com.authzed.api.v1.LookupSubjectsResponse.Builder.class); + } + + public static final int LOOKED_UP_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken lookedUpAt_; + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return Whether the lookedUpAt field is set. + */ + @java.lang.Override + public boolean hasLookedUpAt() { + return lookedUpAt_ != null; + } + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return The lookedUpAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getLookedUpAt() { + return lookedUpAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : lookedUpAt_; + } + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getLookedUpAtOrBuilder() { + return lookedUpAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : lookedUpAt_; + } + + public static final int SUBJECT_OBJECT_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object subjectObjectId_ = ""; + /** + *
+   * subject_object_id is the Object ID of the subject found. May be a `*` if
+   * a wildcard was found.
+   * deprecated: use `subject`
+   * 
+ * + * string subject_object_id = 2 [json_name = "subjectObjectId", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.subject_object_id is deprecated. + * See authzed/api/v1/permission_service.proto;l=590 + * @return The subjectObjectId. + */ + @java.lang.Override + @java.lang.Deprecated public java.lang.String getSubjectObjectId() { + java.lang.Object ref = subjectObjectId_; + 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(); + subjectObjectId_ = s; + return s; + } + } + /** + *
+   * subject_object_id is the Object ID of the subject found. May be a `*` if
+   * a wildcard was found.
+   * deprecated: use `subject`
+   * 
+ * + * string subject_object_id = 2 [json_name = "subjectObjectId", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.subject_object_id is deprecated. + * See authzed/api/v1/permission_service.proto;l=590 + * @return The bytes for subjectObjectId. + */ + @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString + getSubjectObjectIdBytes() { + java.lang.Object ref = subjectObjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectObjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXCLUDED_SUBJECT_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList excludedSubjectIds_; + /** + *
+   * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+   * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * deprecated: use `excluded_subjects`
+   * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @return A list containing the excludedSubjectIds. + */ + @java.lang.Deprecated public com.google.protobuf.ProtocolStringList + getExcludedSubjectIdsList() { + return excludedSubjectIds_; + } + /** + *
+   * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+   * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * deprecated: use `excluded_subjects`
+   * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @return The count of excludedSubjectIds. + */ + @java.lang.Deprecated public int getExcludedSubjectIdsCount() { + return excludedSubjectIds_.size(); + } + /** + *
+   * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+   * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * deprecated: use `excluded_subjects`
+   * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @param index The index of the element to return. + * @return The excludedSubjectIds at the given index. + */ + @java.lang.Deprecated public java.lang.String getExcludedSubjectIds(int index) { + return excludedSubjectIds_.get(index); + } + /** + *
+   * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+   * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * deprecated: use `excluded_subjects`
+   * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @param index The index of the value to return. + * @return The bytes of the excludedSubjectIds at the given index. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getExcludedSubjectIdsBytes(int index) { + return excludedSubjectIds_.getByteString(index); + } + + public static final int PERMISSIONSHIP_FIELD_NUMBER = 4; + private int permissionship_ = 0; + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * deprecated: use `subject.permissionship`
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 4 [json_name = "permissionship", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.permissionship is deprecated. + * See authzed/api/v1/permission_service.proto;l=600 + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override @java.lang.Deprecated public int getPermissionshipValue() { + return permissionship_; + } + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * deprecated: use `subject.permissionship`
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 4 [json_name = "permissionship", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.permissionship is deprecated. + * See authzed/api/v1/permission_service.proto;l=600 + * @return The permissionship. + */ + @java.lang.Override @java.lang.Deprecated public com.authzed.api.v1.LookupPermissionship getPermissionship() { + com.authzed.api.v1.LookupPermissionship result = com.authzed.api.v1.LookupPermissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.LookupPermissionship.UNRECOGNIZED : result; + } + + public static final int PARTIAL_CAVEAT_INFO_FIELD_NUMBER = 5; + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * deprecated: use `subject.partial_caveat_info`
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.partial_caveat_info is deprecated. + * See authzed/api/v1/permission_service.proto;l=604 + * @return Whether the partialCaveatInfo field is set. + */ + @java.lang.Override + @java.lang.Deprecated public boolean hasPartialCaveatInfo() { + return partialCaveatInfo_ != null; + } + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * deprecated: use `subject.partial_caveat_info`
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.partial_caveat_info is deprecated. + * See authzed/api/v1/permission_service.proto;l=604 + * @return The partialCaveatInfo. + */ + @java.lang.Override + @java.lang.Deprecated public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * deprecated: use `subject.partial_caveat_info`
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Override + @java.lang.Deprecated public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + + public static final int SUBJECT_FIELD_NUMBER = 6; + private com.authzed.api.v1.ResolvedSubject subject_; + /** + *
+   * subject is the subject found, along with its permissionship.
+   * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + * @return Whether the subject field is set. + */ + @java.lang.Override + public boolean hasSubject() { + return subject_ != null; + } + /** + *
+   * subject is the subject found, along with its permissionship.
+   * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + * @return The subject. + */ + @java.lang.Override + public com.authzed.api.v1.ResolvedSubject getSubject() { + return subject_ == null ? com.authzed.api.v1.ResolvedSubject.getDefaultInstance() : subject_; + } + /** + *
+   * subject is the subject found, along with its permissionship.
+   * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + */ + @java.lang.Override + public com.authzed.api.v1.ResolvedSubjectOrBuilder getSubjectOrBuilder() { + return subject_ == null ? com.authzed.api.v1.ResolvedSubject.getDefaultInstance() : subject_; + } + + public static final int EXCLUDED_SUBJECTS_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private java.util.List excludedSubjects_; + /** + *
+   * excluded_subjects are the subjects excluded. This list
+   * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + @java.lang.Override + public java.util.List getExcludedSubjectsList() { + return excludedSubjects_; + } + /** + *
+   * excluded_subjects are the subjects excluded. This list
+   * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + @java.lang.Override + public java.util.List + getExcludedSubjectsOrBuilderList() { + return excludedSubjects_; + } + /** + *
+   * excluded_subjects are the subjects excluded. This list
+   * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + @java.lang.Override + public int getExcludedSubjectsCount() { + return excludedSubjects_.size(); + } + /** + *
+   * excluded_subjects are the subjects excluded. This list
+   * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + @java.lang.Override + public com.authzed.api.v1.ResolvedSubject getExcludedSubjects(int index) { + return excludedSubjects_.get(index); + } + /** + *
+   * excluded_subjects are the subjects excluded. This list
+   * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + @java.lang.Override + public com.authzed.api.v1.ResolvedSubjectOrBuilder getExcludedSubjectsOrBuilder( + int index) { + return excludedSubjects_.get(index); + } + + public static final int AFTER_RESULT_CURSOR_FIELD_NUMBER = 8; + private com.authzed.api.v1.Cursor afterResultCursor_; + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + @java.lang.Override + public boolean hasAfterResultCursor() { + return afterResultCursor_ != null; + } + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + @java.lang.Override + public com.authzed.api.v1.Cursor getAfterResultCursor() { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + */ + @java.lang.Override + public com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder() { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + + 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 (lookedUpAt_ != null) { + output.writeMessage(1, getLookedUpAt()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectObjectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subjectObjectId_); + } + for (int i = 0; i < excludedSubjectIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, excludedSubjectIds_.getRaw(i)); + } + if (permissionship_ != com.authzed.api.v1.LookupPermissionship.LOOKUP_PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + output.writeEnum(4, permissionship_); + } + if (partialCaveatInfo_ != null) { + output.writeMessage(5, getPartialCaveatInfo()); + } + if (subject_ != null) { + output.writeMessage(6, getSubject()); + } + for (int i = 0; i < excludedSubjects_.size(); i++) { + output.writeMessage(7, excludedSubjects_.get(i)); + } + if (afterResultCursor_ != null) { + output.writeMessage(8, getAfterResultCursor()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lookedUpAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLookedUpAt()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectObjectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subjectObjectId_); + } + { + int dataSize = 0; + for (int i = 0; i < excludedSubjectIds_.size(); i++) { + dataSize += computeStringSizeNoTag(excludedSubjectIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludedSubjectIdsList().size(); + } + if (permissionship_ != com.authzed.api.v1.LookupPermissionship.LOOKUP_PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, permissionship_); + } + if (partialCaveatInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getPartialCaveatInfo()); + } + if (subject_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getSubject()); + } + for (int i = 0; i < excludedSubjects_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, excludedSubjects_.get(i)); + } + if (afterResultCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getAfterResultCursor()); + } + 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.LookupSubjectsResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.LookupSubjectsResponse other = (com.authzed.api.v1.LookupSubjectsResponse) obj; + + if (hasLookedUpAt() != other.hasLookedUpAt()) return false; + if (hasLookedUpAt()) { + if (!getLookedUpAt() + .equals(other.getLookedUpAt())) return false; + } + if (!getSubjectObjectId() + .equals(other.getSubjectObjectId())) return false; + if (!getExcludedSubjectIdsList() + .equals(other.getExcludedSubjectIdsList())) return false; + if (permissionship_ != other.permissionship_) return false; + if (hasPartialCaveatInfo() != other.hasPartialCaveatInfo()) return false; + if (hasPartialCaveatInfo()) { + if (!getPartialCaveatInfo() + .equals(other.getPartialCaveatInfo())) return false; + } + if (hasSubject() != other.hasSubject()) return false; + if (hasSubject()) { + if (!getSubject() + .equals(other.getSubject())) return false; + } + if (!getExcludedSubjectsList() + .equals(other.getExcludedSubjectsList())) return false; + if (hasAfterResultCursor() != other.hasAfterResultCursor()) return false; + if (hasAfterResultCursor()) { + if (!getAfterResultCursor() + .equals(other.getAfterResultCursor())) 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 (hasLookedUpAt()) { + hash = (37 * hash) + LOOKED_UP_AT_FIELD_NUMBER; + hash = (53 * hash) + getLookedUpAt().hashCode(); + } + hash = (37 * hash) + SUBJECT_OBJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubjectObjectId().hashCode(); + if (getExcludedSubjectIdsCount() > 0) { + hash = (37 * hash) + EXCLUDED_SUBJECT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getExcludedSubjectIdsList().hashCode(); + } + hash = (37 * hash) + PERMISSIONSHIP_FIELD_NUMBER; + hash = (53 * hash) + permissionship_; + if (hasPartialCaveatInfo()) { + hash = (37 * hash) + PARTIAL_CAVEAT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPartialCaveatInfo().hashCode(); + } + if (hasSubject()) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().hashCode(); + } + if (getExcludedSubjectsCount() > 0) { + hash = (37 * hash) + EXCLUDED_SUBJECTS_FIELD_NUMBER; + hash = (53 * hash) + getExcludedSubjectsList().hashCode(); + } + if (hasAfterResultCursor()) { + hash = (37 * hash) + AFTER_RESULT_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getAfterResultCursor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.LookupSubjectsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupSubjectsResponse 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.LookupSubjectsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupSubjectsResponse 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.LookupSubjectsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.LookupSubjectsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.LookupSubjectsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupSubjectsResponse 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.LookupSubjectsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupSubjectsResponse 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.LookupSubjectsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.LookupSubjectsResponse 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.LookupSubjectsResponse 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; + } + /** + *
+   * LookupSubjectsResponse contains a single matching subject object ID for the
+   * requested subject object type on the permission or relation.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.LookupSubjectsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.LookupSubjectsResponse) + com.authzed.api.v1.LookupSubjectsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupSubjectsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupSubjectsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.LookupSubjectsResponse.class, com.authzed.api.v1.LookupSubjectsResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.LookupSubjectsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lookedUpAt_ = null; + if (lookedUpAtBuilder_ != null) { + lookedUpAtBuilder_.dispose(); + lookedUpAtBuilder_ = null; + } + subjectObjectId_ = ""; + excludedSubjectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + permissionship_ = 0; + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + if (excludedSubjectsBuilder_ == null) { + excludedSubjects_ = java.util.Collections.emptyList(); + } else { + excludedSubjects_ = null; + excludedSubjectsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + afterResultCursor_ = null; + if (afterResultCursorBuilder_ != null) { + afterResultCursorBuilder_.dispose(); + afterResultCursorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_LookupSubjectsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.LookupSubjectsResponse getDefaultInstanceForType() { + return com.authzed.api.v1.LookupSubjectsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.LookupSubjectsResponse build() { + com.authzed.api.v1.LookupSubjectsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.LookupSubjectsResponse buildPartial() { + com.authzed.api.v1.LookupSubjectsResponse result = new com.authzed.api.v1.LookupSubjectsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.LookupSubjectsResponse result) { + if (((bitField0_ & 0x00000004) != 0)) { + excludedSubjectIds_ = excludedSubjectIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.excludedSubjectIds_ = excludedSubjectIds_; + if (excludedSubjectsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + excludedSubjects_ = java.util.Collections.unmodifiableList(excludedSubjects_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.excludedSubjects_ = excludedSubjects_; + } else { + result.excludedSubjects_ = excludedSubjectsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.LookupSubjectsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lookedUpAt_ = lookedUpAtBuilder_ == null + ? lookedUpAt_ + : lookedUpAtBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subjectObjectId_ = subjectObjectId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.permissionship_ = permissionship_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.partialCaveatInfo_ = partialCaveatInfoBuilder_ == null + ? partialCaveatInfo_ + : partialCaveatInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.subject_ = subjectBuilder_ == null + ? subject_ + : subjectBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.afterResultCursor_ = afterResultCursorBuilder_ == null + ? afterResultCursor_ + : afterResultCursorBuilder_.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.LookupSubjectsResponse) { + return mergeFrom((com.authzed.api.v1.LookupSubjectsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.LookupSubjectsResponse other) { + if (other == com.authzed.api.v1.LookupSubjectsResponse.getDefaultInstance()) return this; + if (other.hasLookedUpAt()) { + mergeLookedUpAt(other.getLookedUpAt()); + } + if (!other.getSubjectObjectId().isEmpty()) { + subjectObjectId_ = other.subjectObjectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.excludedSubjectIds_.isEmpty()) { + if (excludedSubjectIds_.isEmpty()) { + excludedSubjectIds_ = other.excludedSubjectIds_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureExcludedSubjectIdsIsMutable(); + excludedSubjectIds_.addAll(other.excludedSubjectIds_); + } + onChanged(); + } + if (other.permissionship_ != 0) { + setPermissionshipValue(other.getPermissionshipValue()); + } + if (other.hasPartialCaveatInfo()) { + mergePartialCaveatInfo(other.getPartialCaveatInfo()); + } + if (other.hasSubject()) { + mergeSubject(other.getSubject()); + } + if (excludedSubjectsBuilder_ == null) { + if (!other.excludedSubjects_.isEmpty()) { + if (excludedSubjects_.isEmpty()) { + excludedSubjects_ = other.excludedSubjects_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureExcludedSubjectsIsMutable(); + excludedSubjects_.addAll(other.excludedSubjects_); + } + onChanged(); + } + } else { + if (!other.excludedSubjects_.isEmpty()) { + if (excludedSubjectsBuilder_.isEmpty()) { + excludedSubjectsBuilder_.dispose(); + excludedSubjectsBuilder_ = null; + excludedSubjects_ = other.excludedSubjects_; + bitField0_ = (bitField0_ & ~0x00000040); + excludedSubjectsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getExcludedSubjectsFieldBuilder() : null; + } else { + excludedSubjectsBuilder_.addAllMessages(other.excludedSubjects_); + } + } + } + if (other.hasAfterResultCursor()) { + mergeAfterResultCursor(other.getAfterResultCursor()); + } + 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( + getLookedUpAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + subjectObjectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludedSubjectIdsIsMutable(); + excludedSubjectIds_.add(s); + break; + } // case 26 + case 32: { + permissionship_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getPartialCaveatInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getSubjectFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + com.authzed.api.v1.ResolvedSubject m = + input.readMessage( + com.authzed.api.v1.ResolvedSubject.parser(), + extensionRegistry); + if (excludedSubjectsBuilder_ == null) { + ensureExcludedSubjectsIsMutable(); + excludedSubjects_.add(m); + } else { + excludedSubjectsBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: { + input.readMessage( + getAfterResultCursorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + 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.ZedToken lookedUpAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> lookedUpAtBuilder_; + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return Whether the lookedUpAt field is set. + */ + public boolean hasLookedUpAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return The lookedUpAt. + */ + public com.authzed.api.v1.ZedToken getLookedUpAt() { + if (lookedUpAtBuilder_ == null) { + return lookedUpAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : lookedUpAt_; + } else { + return lookedUpAtBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public Builder setLookedUpAt(com.authzed.api.v1.ZedToken value) { + if (lookedUpAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lookedUpAt_ = value; + } else { + lookedUpAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public Builder setLookedUpAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (lookedUpAtBuilder_ == null) { + lookedUpAt_ = builderForValue.build(); + } else { + lookedUpAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public Builder mergeLookedUpAt(com.authzed.api.v1.ZedToken value) { + if (lookedUpAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + lookedUpAt_ != null && + lookedUpAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getLookedUpAtBuilder().mergeFrom(value); + } else { + lookedUpAt_ = value; + } + } else { + lookedUpAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public Builder clearLookedUpAt() { + bitField0_ = (bitField0_ & ~0x00000001); + lookedUpAt_ = null; + if (lookedUpAtBuilder_ != null) { + lookedUpAtBuilder_.dispose(); + lookedUpAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getLookedUpAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLookedUpAtFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getLookedUpAtOrBuilder() { + if (lookedUpAtBuilder_ != null) { + return lookedUpAtBuilder_.getMessageOrBuilder(); + } else { + return lookedUpAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : lookedUpAt_; + } + } + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getLookedUpAtFieldBuilder() { + if (lookedUpAtBuilder_ == null) { + lookedUpAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getLookedUpAt(), + getParentForChildren(), + isClean()); + lookedUpAt_ = null; + } + return lookedUpAtBuilder_; + } + + private java.lang.Object subjectObjectId_ = ""; + /** + *
+     * subject_object_id is the Object ID of the subject found. May be a `*` if
+     * a wildcard was found.
+     * deprecated: use `subject`
+     * 
+ * + * string subject_object_id = 2 [json_name = "subjectObjectId", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.subject_object_id is deprecated. + * See authzed/api/v1/permission_service.proto;l=590 + * @return The subjectObjectId. + */ + @java.lang.Deprecated public java.lang.String getSubjectObjectId() { + java.lang.Object ref = subjectObjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectObjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * subject_object_id is the Object ID of the subject found. May be a `*` if
+     * a wildcard was found.
+     * deprecated: use `subject`
+     * 
+ * + * string subject_object_id = 2 [json_name = "subjectObjectId", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.subject_object_id is deprecated. + * See authzed/api/v1/permission_service.proto;l=590 + * @return The bytes for subjectObjectId. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getSubjectObjectIdBytes() { + java.lang.Object ref = subjectObjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectObjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * subject_object_id is the Object ID of the subject found. May be a `*` if
+     * a wildcard was found.
+     * deprecated: use `subject`
+     * 
+ * + * string subject_object_id = 2 [json_name = "subjectObjectId", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.subject_object_id is deprecated. + * See authzed/api/v1/permission_service.proto;l=590 + * @param value The subjectObjectId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setSubjectObjectId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subjectObjectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * subject_object_id is the Object ID of the subject found. May be a `*` if
+     * a wildcard was found.
+     * deprecated: use `subject`
+     * 
+ * + * string subject_object_id = 2 [json_name = "subjectObjectId", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.subject_object_id is deprecated. + * See authzed/api/v1/permission_service.proto;l=590 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearSubjectObjectId() { + subjectObjectId_ = getDefaultInstance().getSubjectObjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * subject_object_id is the Object ID of the subject found. May be a `*` if
+     * a wildcard was found.
+     * deprecated: use `subject`
+     * 
+ * + * string subject_object_id = 2 [json_name = "subjectObjectId", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.subject_object_id is deprecated. + * See authzed/api/v1/permission_service.proto;l=590 + * @param value The bytes for subjectObjectId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setSubjectObjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subjectObjectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList excludedSubjectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureExcludedSubjectIdsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + excludedSubjectIds_ = new com.google.protobuf.LazyStringArrayList(excludedSubjectIds_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+     * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * deprecated: use `excluded_subjects`
+     * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @return A list containing the excludedSubjectIds. + */ + @java.lang.Deprecated public com.google.protobuf.ProtocolStringList + getExcludedSubjectIdsList() { + return excludedSubjectIds_.getUnmodifiableView(); + } + /** + *
+     * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+     * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * deprecated: use `excluded_subjects`
+     * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @return The count of excludedSubjectIds. + */ + @java.lang.Deprecated public int getExcludedSubjectIdsCount() { + return excludedSubjectIds_.size(); + } + /** + *
+     * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+     * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * deprecated: use `excluded_subjects`
+     * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @param index The index of the element to return. + * @return The excludedSubjectIds at the given index. + */ + @java.lang.Deprecated public java.lang.String getExcludedSubjectIds(int index) { + return excludedSubjectIds_.get(index); + } + /** + *
+     * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+     * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * deprecated: use `excluded_subjects`
+     * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @param index The index of the value to return. + * @return The bytes of the excludedSubjectIds at the given index. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getExcludedSubjectIdsBytes(int index) { + return excludedSubjectIds_.getByteString(index); + } + /** + *
+     * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+     * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * deprecated: use `excluded_subjects`
+     * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @param index The index to set the value at. + * @param value The excludedSubjectIds to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setExcludedSubjectIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureExcludedSubjectIdsIsMutable(); + excludedSubjectIds_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+     * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * deprecated: use `excluded_subjects`
+     * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @param value The excludedSubjectIds to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder addExcludedSubjectIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureExcludedSubjectIdsIsMutable(); + excludedSubjectIds_.add(value); + onChanged(); + return this; + } + /** + *
+     * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+     * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * deprecated: use `excluded_subjects`
+     * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @param values The excludedSubjectIds to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder addAllExcludedSubjectIds( + java.lang.Iterable values) { + ensureExcludedSubjectIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, excludedSubjectIds_); + onChanged(); + return this; + } + /** + *
+     * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+     * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * deprecated: use `excluded_subjects`
+     * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearExcludedSubjectIds() { + excludedSubjectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+     * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * deprecated: use `excluded_subjects`
+     * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @param value The bytes of the excludedSubjectIds to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder addExcludedSubjectIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureExcludedSubjectIdsIsMutable(); + excludedSubjectIds_.add(value); + onChanged(); + return this; + } + + private int permissionship_ = 0; + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * deprecated: use `subject.permissionship`
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 4 [json_name = "permissionship", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.permissionship is deprecated. + * See authzed/api/v1/permission_service.proto;l=600 + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override @java.lang.Deprecated public int getPermissionshipValue() { + return permissionship_; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * deprecated: use `subject.permissionship`
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 4 [json_name = "permissionship", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.permissionship is deprecated. + * See authzed/api/v1/permission_service.proto;l=600 + * @param value The enum numeric value on the wire for permissionship to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setPermissionshipValue(int value) { + permissionship_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * deprecated: use `subject.permissionship`
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 4 [json_name = "permissionship", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.permissionship is deprecated. + * See authzed/api/v1/permission_service.proto;l=600 + * @return The permissionship. + */ + @java.lang.Override + @java.lang.Deprecated public com.authzed.api.v1.LookupPermissionship getPermissionship() { + com.authzed.api.v1.LookupPermissionship result = com.authzed.api.v1.LookupPermissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.LookupPermissionship.UNRECOGNIZED : result; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * deprecated: use `subject.permissionship`
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 4 [json_name = "permissionship", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.permissionship is deprecated. + * See authzed/api/v1/permission_service.proto;l=600 + * @param value The permissionship to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setPermissionship(com.authzed.api.v1.LookupPermissionship value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + permissionship_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * deprecated: use `subject.permissionship`
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 4 [json_name = "permissionship", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.permissionship is deprecated. + * See authzed/api/v1/permission_service.proto;l=600 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearPermissionship() { + bitField0_ = (bitField0_ & ~0x00000008); + permissionship_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> partialCaveatInfoBuilder_; + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * deprecated: use `subject.partial_caveat_info`
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.partial_caveat_info is deprecated. + * See authzed/api/v1/permission_service.proto;l=604 + * @return Whether the partialCaveatInfo field is set. + */ + @java.lang.Deprecated public boolean hasPartialCaveatInfo() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * deprecated: use `subject.partial_caveat_info`
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.partial_caveat_info is deprecated. + * See authzed/api/v1/permission_service.proto;l=604 + * @return The partialCaveatInfo. + */ + @java.lang.Deprecated public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + if (partialCaveatInfoBuilder_ == null) { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } else { + return partialCaveatInfoBuilder_.getMessage(); + } + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * deprecated: use `subject.partial_caveat_info`
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder setPartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partialCaveatInfo_ = value; + } else { + partialCaveatInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * deprecated: use `subject.partial_caveat_info`
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder setPartialCaveatInfo( + com.authzed.api.v1.PartialCaveatInfo.Builder builderForValue) { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfo_ = builderForValue.build(); + } else { + partialCaveatInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * deprecated: use `subject.partial_caveat_info`
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder mergePartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + partialCaveatInfo_ != null && + partialCaveatInfo_ != com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance()) { + getPartialCaveatInfoBuilder().mergeFrom(value); + } else { + partialCaveatInfo_ = value; + } + } else { + partialCaveatInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * deprecated: use `subject.partial_caveat_info`
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public Builder clearPartialCaveatInfo() { + bitField0_ = (bitField0_ & ~0x00000010); + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * deprecated: use `subject.partial_caveat_info`
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public com.authzed.api.v1.PartialCaveatInfo.Builder getPartialCaveatInfoBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getPartialCaveatInfoFieldBuilder().getBuilder(); + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * deprecated: use `subject.partial_caveat_info`
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + if (partialCaveatInfoBuilder_ != null) { + return partialCaveatInfoBuilder_.getMessageOrBuilder(); + } else { + return partialCaveatInfo_ == null ? + com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * deprecated: use `subject.partial_caveat_info`
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> + getPartialCaveatInfoFieldBuilder() { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder>( + getPartialCaveatInfo(), + getParentForChildren(), + isClean()); + partialCaveatInfo_ = null; + } + return partialCaveatInfoBuilder_; + } + + private com.authzed.api.v1.ResolvedSubject subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ResolvedSubject, com.authzed.api.v1.ResolvedSubject.Builder, com.authzed.api.v1.ResolvedSubjectOrBuilder> subjectBuilder_; + /** + *
+     * subject is the subject found, along with its permissionship.
+     * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + * @return Whether the subject field is set. + */ + public boolean hasSubject() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * subject is the subject found, along with its permissionship.
+     * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + * @return The subject. + */ + public com.authzed.api.v1.ResolvedSubject getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null ? com.authzed.api.v1.ResolvedSubject.getDefaultInstance() : subject_; + } else { + return subjectBuilder_.getMessage(); + } + } + /** + *
+     * subject is the subject found, along with its permissionship.
+     * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + */ + public Builder setSubject(com.authzed.api.v1.ResolvedSubject value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subject_ = value; + } else { + subjectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * subject is the subject found, along with its permissionship.
+     * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + */ + public Builder setSubject( + com.authzed.api.v1.ResolvedSubject.Builder builderForValue) { + if (subjectBuilder_ == null) { + subject_ = builderForValue.build(); + } else { + subjectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * subject is the subject found, along with its permissionship.
+     * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + */ + public Builder mergeSubject(com.authzed.api.v1.ResolvedSubject value) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + subject_ != null && + subject_ != com.authzed.api.v1.ResolvedSubject.getDefaultInstance()) { + getSubjectBuilder().mergeFrom(value); + } else { + subject_ = value; + } + } else { + subjectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * subject is the subject found, along with its permissionship.
+     * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + */ + public Builder clearSubject() { + bitField0_ = (bitField0_ & ~0x00000020); + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * subject is the subject found, along with its permissionship.
+     * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + */ + public com.authzed.api.v1.ResolvedSubject.Builder getSubjectBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getSubjectFieldBuilder().getBuilder(); + } + /** + *
+     * subject is the subject found, along with its permissionship.
+     * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + */ + public com.authzed.api.v1.ResolvedSubjectOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null ? + com.authzed.api.v1.ResolvedSubject.getDefaultInstance() : subject_; + } + } + /** + *
+     * subject is the subject found, along with its permissionship.
+     * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ResolvedSubject, com.authzed.api.v1.ResolvedSubject.Builder, com.authzed.api.v1.ResolvedSubjectOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ResolvedSubject, com.authzed.api.v1.ResolvedSubject.Builder, com.authzed.api.v1.ResolvedSubjectOrBuilder>( + getSubject(), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + private java.util.List excludedSubjects_ = + java.util.Collections.emptyList(); + private void ensureExcludedSubjectsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + excludedSubjects_ = new java.util.ArrayList(excludedSubjects_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ResolvedSubject, com.authzed.api.v1.ResolvedSubject.Builder, com.authzed.api.v1.ResolvedSubjectOrBuilder> excludedSubjectsBuilder_; + + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public java.util.List getExcludedSubjectsList() { + if (excludedSubjectsBuilder_ == null) { + return java.util.Collections.unmodifiableList(excludedSubjects_); + } else { + return excludedSubjectsBuilder_.getMessageList(); + } + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public int getExcludedSubjectsCount() { + if (excludedSubjectsBuilder_ == null) { + return excludedSubjects_.size(); + } else { + return excludedSubjectsBuilder_.getCount(); + } + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public com.authzed.api.v1.ResolvedSubject getExcludedSubjects(int index) { + if (excludedSubjectsBuilder_ == null) { + return excludedSubjects_.get(index); + } else { + return excludedSubjectsBuilder_.getMessage(index); + } + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public Builder setExcludedSubjects( + int index, com.authzed.api.v1.ResolvedSubject value) { + if (excludedSubjectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedSubjectsIsMutable(); + excludedSubjects_.set(index, value); + onChanged(); + } else { + excludedSubjectsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public Builder setExcludedSubjects( + int index, com.authzed.api.v1.ResolvedSubject.Builder builderForValue) { + if (excludedSubjectsBuilder_ == null) { + ensureExcludedSubjectsIsMutable(); + excludedSubjects_.set(index, builderForValue.build()); + onChanged(); + } else { + excludedSubjectsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public Builder addExcludedSubjects(com.authzed.api.v1.ResolvedSubject value) { + if (excludedSubjectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedSubjectsIsMutable(); + excludedSubjects_.add(value); + onChanged(); + } else { + excludedSubjectsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public Builder addExcludedSubjects( + int index, com.authzed.api.v1.ResolvedSubject value) { + if (excludedSubjectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedSubjectsIsMutable(); + excludedSubjects_.add(index, value); + onChanged(); + } else { + excludedSubjectsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public Builder addExcludedSubjects( + com.authzed.api.v1.ResolvedSubject.Builder builderForValue) { + if (excludedSubjectsBuilder_ == null) { + ensureExcludedSubjectsIsMutable(); + excludedSubjects_.add(builderForValue.build()); + onChanged(); + } else { + excludedSubjectsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public Builder addExcludedSubjects( + int index, com.authzed.api.v1.ResolvedSubject.Builder builderForValue) { + if (excludedSubjectsBuilder_ == null) { + ensureExcludedSubjectsIsMutable(); + excludedSubjects_.add(index, builderForValue.build()); + onChanged(); + } else { + excludedSubjectsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public Builder addAllExcludedSubjects( + java.lang.Iterable values) { + if (excludedSubjectsBuilder_ == null) { + ensureExcludedSubjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, excludedSubjects_); + onChanged(); + } else { + excludedSubjectsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public Builder clearExcludedSubjects() { + if (excludedSubjectsBuilder_ == null) { + excludedSubjects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + excludedSubjectsBuilder_.clear(); + } + return this; + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public Builder removeExcludedSubjects(int index) { + if (excludedSubjectsBuilder_ == null) { + ensureExcludedSubjectsIsMutable(); + excludedSubjects_.remove(index); + onChanged(); + } else { + excludedSubjectsBuilder_.remove(index); + } + return this; + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public com.authzed.api.v1.ResolvedSubject.Builder getExcludedSubjectsBuilder( + int index) { + return getExcludedSubjectsFieldBuilder().getBuilder(index); + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public com.authzed.api.v1.ResolvedSubjectOrBuilder getExcludedSubjectsOrBuilder( + int index) { + if (excludedSubjectsBuilder_ == null) { + return excludedSubjects_.get(index); } else { + return excludedSubjectsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public java.util.List + getExcludedSubjectsOrBuilderList() { + if (excludedSubjectsBuilder_ != null) { + return excludedSubjectsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(excludedSubjects_); + } + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public com.authzed.api.v1.ResolvedSubject.Builder addExcludedSubjectsBuilder() { + return getExcludedSubjectsFieldBuilder().addBuilder( + com.authzed.api.v1.ResolvedSubject.getDefaultInstance()); + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public com.authzed.api.v1.ResolvedSubject.Builder addExcludedSubjectsBuilder( + int index) { + return getExcludedSubjectsFieldBuilder().addBuilder( + index, com.authzed.api.v1.ResolvedSubject.getDefaultInstance()); + } + /** + *
+     * excluded_subjects are the subjects excluded. This list
+     * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+     * will only be populated if exclusions exist from the wildcard.
+     * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + public java.util.List + getExcludedSubjectsBuilderList() { + return getExcludedSubjectsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ResolvedSubject, com.authzed.api.v1.ResolvedSubject.Builder, com.authzed.api.v1.ResolvedSubjectOrBuilder> + getExcludedSubjectsFieldBuilder() { + if (excludedSubjectsBuilder_ == null) { + excludedSubjectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.ResolvedSubject, com.authzed.api.v1.ResolvedSubject.Builder, com.authzed.api.v1.ResolvedSubjectOrBuilder>( + excludedSubjects_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + excludedSubjects_ = null; + } + return excludedSubjectsBuilder_; + } + + private com.authzed.api.v1.Cursor afterResultCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> afterResultCursorBuilder_; + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + public boolean hasAfterResultCursor() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + public com.authzed.api.v1.Cursor getAfterResultCursor() { + if (afterResultCursorBuilder_ == null) { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } else { + return afterResultCursorBuilder_.getMessage(); + } + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + */ + public Builder setAfterResultCursor(com.authzed.api.v1.Cursor value) { + if (afterResultCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + afterResultCursor_ = value; + } else { + afterResultCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + */ + public Builder setAfterResultCursor( + com.authzed.api.v1.Cursor.Builder builderForValue) { + if (afterResultCursorBuilder_ == null) { + afterResultCursor_ = builderForValue.build(); + } else { + afterResultCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + */ + public Builder mergeAfterResultCursor(com.authzed.api.v1.Cursor value) { + if (afterResultCursorBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + afterResultCursor_ != null && + afterResultCursor_ != com.authzed.api.v1.Cursor.getDefaultInstance()) { + getAfterResultCursorBuilder().mergeFrom(value); + } else { + afterResultCursor_ = value; + } + } else { + afterResultCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + */ + public Builder clearAfterResultCursor() { + bitField0_ = (bitField0_ & ~0x00000080); + afterResultCursor_ = null; + if (afterResultCursorBuilder_ != null) { + afterResultCursorBuilder_.dispose(); + afterResultCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + */ + public com.authzed.api.v1.Cursor.Builder getAfterResultCursorBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getAfterResultCursorFieldBuilder().getBuilder(); + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + */ + public com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder() { + if (afterResultCursorBuilder_ != null) { + return afterResultCursorBuilder_.getMessageOrBuilder(); + } else { + return afterResultCursor_ == null ? + com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> + getAfterResultCursorFieldBuilder() { + if (afterResultCursorBuilder_ == null) { + afterResultCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder>( + getAfterResultCursor(), + getParentForChildren(), + isClean()); + afterResultCursor_ = null; + } + return afterResultCursorBuilder_; + } + @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.LookupSubjectsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.LookupSubjectsResponse) + private static final com.authzed.api.v1.LookupSubjectsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.LookupSubjectsResponse(); + } + + public static com.authzed.api.v1.LookupSubjectsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupSubjectsResponse 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.LookupSubjectsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/LookupSubjectsResponseOrBuilder.java b/generated/com/authzed/api/v1/LookupSubjectsResponseOrBuilder.java new file mode 100644 index 00000000..329b1154 --- /dev/null +++ b/generated/com/authzed/api/v1/LookupSubjectsResponseOrBuilder.java @@ -0,0 +1,283 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface LookupSubjectsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.LookupSubjectsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return Whether the lookedUpAt field is set. + */ + boolean hasLookedUpAt(); + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + * @return The lookedUpAt. + */ + com.authzed.api.v1.ZedToken getLookedUpAt(); + /** + * .authzed.api.v1.ZedToken looked_up_at = 1 [json_name = "lookedUpAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getLookedUpAtOrBuilder(); + + /** + *
+   * subject_object_id is the Object ID of the subject found. May be a `*` if
+   * a wildcard was found.
+   * deprecated: use `subject`
+   * 
+ * + * string subject_object_id = 2 [json_name = "subjectObjectId", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.subject_object_id is deprecated. + * See authzed/api/v1/permission_service.proto;l=590 + * @return The subjectObjectId. + */ + @java.lang.Deprecated java.lang.String getSubjectObjectId(); + /** + *
+   * subject_object_id is the Object ID of the subject found. May be a `*` if
+   * a wildcard was found.
+   * deprecated: use `subject`
+   * 
+ * + * string subject_object_id = 2 [json_name = "subjectObjectId", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.subject_object_id is deprecated. + * See authzed/api/v1/permission_service.proto;l=590 + * @return The bytes for subjectObjectId. + */ + @java.lang.Deprecated com.google.protobuf.ByteString + getSubjectObjectIdBytes(); + + /** + *
+   * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+   * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * deprecated: use `excluded_subjects`
+   * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @return A list containing the excludedSubjectIds. + */ + @java.lang.Deprecated java.util.List + getExcludedSubjectIdsList(); + /** + *
+   * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+   * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * deprecated: use `excluded_subjects`
+   * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @return The count of excludedSubjectIds. + */ + @java.lang.Deprecated int getExcludedSubjectIdsCount(); + /** + *
+   * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+   * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * deprecated: use `excluded_subjects`
+   * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @param index The index of the element to return. + * @return The excludedSubjectIds at the given index. + */ + @java.lang.Deprecated java.lang.String getExcludedSubjectIds(int index); + /** + *
+   * excluded_subject_ids are the Object IDs of the subjects excluded. This list
+   * will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * deprecated: use `excluded_subjects`
+   * 
+ * + * repeated string excluded_subject_ids = 3 [json_name = "excludedSubjectIds", deprecated = true]; + * @deprecated authzed.api.v1.LookupSubjectsResponse.excluded_subject_ids is deprecated. + * See authzed/api/v1/permission_service.proto;l=596 + * @param index The index of the value to return. + * @return The bytes of the excludedSubjectIds at the given index. + */ + @java.lang.Deprecated com.google.protobuf.ByteString + getExcludedSubjectIdsBytes(int index); + + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * deprecated: use `subject.permissionship`
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 4 [json_name = "permissionship", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.permissionship is deprecated. + * See authzed/api/v1/permission_service.proto;l=600 + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Deprecated int getPermissionshipValue(); + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * deprecated: use `subject.permissionship`
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 4 [json_name = "permissionship", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.permissionship is deprecated. + * See authzed/api/v1/permission_service.proto;l=600 + * @return The permissionship. + */ + @java.lang.Deprecated com.authzed.api.v1.LookupPermissionship getPermissionship(); + + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * deprecated: use `subject.partial_caveat_info`
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.partial_caveat_info is deprecated. + * See authzed/api/v1/permission_service.proto;l=604 + * @return Whether the partialCaveatInfo field is set. + */ + @java.lang.Deprecated boolean hasPartialCaveatInfo(); + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * deprecated: use `subject.partial_caveat_info`
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + * @deprecated authzed.api.v1.LookupSubjectsResponse.partial_caveat_info is deprecated. + * See authzed/api/v1/permission_service.proto;l=604 + * @return The partialCaveatInfo. + */ + @java.lang.Deprecated com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo(); + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * deprecated: use `subject.partial_caveat_info`
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 5 [json_name = "partialCaveatInfo", deprecated = true, (.validate.rules) = { ... } + */ + @java.lang.Deprecated com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder(); + + /** + *
+   * subject is the subject found, along with its permissionship.
+   * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + * @return Whether the subject field is set. + */ + boolean hasSubject(); + /** + *
+   * subject is the subject found, along with its permissionship.
+   * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + * @return The subject. + */ + com.authzed.api.v1.ResolvedSubject getSubject(); + /** + *
+   * subject is the subject found, along with its permissionship.
+   * 
+ * + * .authzed.api.v1.ResolvedSubject subject = 6 [json_name = "subject"]; + */ + com.authzed.api.v1.ResolvedSubjectOrBuilder getSubjectOrBuilder(); + + /** + *
+   * excluded_subjects are the subjects excluded. This list
+   * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + java.util.List + getExcludedSubjectsList(); + /** + *
+   * excluded_subjects are the subjects excluded. This list
+   * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + com.authzed.api.v1.ResolvedSubject getExcludedSubjects(int index); + /** + *
+   * excluded_subjects are the subjects excluded. This list
+   * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + int getExcludedSubjectsCount(); + /** + *
+   * excluded_subjects are the subjects excluded. This list
+   * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + java.util.List + getExcludedSubjectsOrBuilderList(); + /** + *
+   * excluded_subjects are the subjects excluded. This list
+   * will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+   * will only be populated if exclusions exist from the wildcard.
+   * 
+ * + * repeated .authzed.api.v1.ResolvedSubject excluded_subjects = 7 [json_name = "excludedSubjects"]; + */ + com.authzed.api.v1.ResolvedSubjectOrBuilder getExcludedSubjectsOrBuilder( + int index); + + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + boolean hasAfterResultCursor(); + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + com.authzed.api.v1.Cursor getAfterResultCursor(); + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 8 [json_name = "afterResultCursor"]; + */ + com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ObjectReference.java b/generated/com/authzed/api/v1/ObjectReference.java new file mode 100644 index 00000000..4bf246bb --- /dev/null +++ b/generated/com/authzed/api/v1/ObjectReference.java @@ -0,0 +1,688 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * ObjectReference is used to refer to a specific object in the system.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ObjectReference} + */ +public 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.ObjectReference.class, com.authzed.api.v1.ObjectReference.Builder.class); + } + + public static final int OBJECT_TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object objectType_ = ""; + /** + * string object_type = 1 [json_name = "objectType", (.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 [json_name = "objectType", (.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 [json_name = "objectId", (.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 [json_name = "objectId", (.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.ObjectReference)) { + return super.equals(obj); + } + com.authzed.api.v1.ObjectReference other = (com.authzed.api.v1.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.ObjectReference parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.ObjectReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.ObjectReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.ObjectReference parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.ObjectReference parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.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.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.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.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.ObjectReference.class, com.authzed.api.v1.ObjectReference.Builder.class); + } + + // Construct using com.authzed.api.v1.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.ObjectReference getDefaultInstanceForType() { + return com.authzed.api.v1.ObjectReference.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ObjectReference build() { + com.authzed.api.v1.ObjectReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ObjectReference buildPartial() { + com.authzed.api.v1.ObjectReference result = new com.authzed.api.v1.ObjectReference(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.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.ObjectReference) { + return mergeFrom((com.authzed.api.v1.ObjectReference)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ObjectReference other) { + if (other == com.authzed.api.v1.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 [json_name = "objectType", (.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 [json_name = "objectType", (.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 [json_name = "objectType", (.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 [json_name = "objectType", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearObjectType() { + objectType_ = getDefaultInstance().getObjectType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string object_type = 1 [json_name = "objectType", (.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 [json_name = "objectId", (.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 [json_name = "objectId", (.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 [json_name = "objectId", (.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 [json_name = "objectId", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearObjectId() { + objectId_ = getDefaultInstance().getObjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string object_id = 2 [json_name = "objectId", (.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.ObjectReference DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ObjectReference(); + } + + public static com.authzed.api.v1.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.ObjectReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ObjectReferenceOrBuilder.java b/generated/com/authzed/api/v1/ObjectReferenceOrBuilder.java new file mode 100644 index 00000000..626168eb --- /dev/null +++ b/generated/com/authzed/api/v1/ObjectReferenceOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +public interface ObjectReferenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ObjectReference) + com.google.protobuf.MessageOrBuilder { + + /** + * string object_type = 1 [json_name = "objectType", (.validate.rules) = { ... } + * @return The objectType. + */ + java.lang.String getObjectType(); + /** + * string object_type = 1 [json_name = "objectType", (.validate.rules) = { ... } + * @return The bytes for objectType. + */ + com.google.protobuf.ByteString + getObjectTypeBytes(); + + /** + * string object_id = 2 [json_name = "objectId", (.validate.rules) = { ... } + * @return The objectId. + */ + java.lang.String getObjectId(); + /** + * string object_id = 2 [json_name = "objectId", (.validate.rules) = { ... } + * @return The bytes for objectId. + */ + com.google.protobuf.ByteString + getObjectIdBytes(); +} diff --git a/generated/com/authzed/api/v1/Openapi.java b/generated/com/authzed/api/v1/Openapi.java new file mode 100644 index 00000000..e4871bcf --- /dev/null +++ b/generated/com/authzed/api/v1/Openapi.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/openapi.proto + +package com.authzed.api.v1; + +public final class Openapi { + private Openapi() {} + 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 static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034authzed/api/v1/openapi.proto\022\016authzed." + + "api.v1\032.protoc-gen-openapiv2/options/ann" + + "otations.protoB\202\003\n\022com.authzed.api.v1P\001Z" + + "2github.com/authzed/authzed-go/proto/aut" + + "hzed/api/v1\222A\264\002\022\234\001\n\007Authzed\"D\n\rAuthzed, " + + "Inc.\022\036https://github.com/authzed/api\032\023su" + + "pport@authzed.com*F\n\022Apache 2.0 License\022" + + "0https://github.com/authzed/api/blob/mai" + + "n/LICENSE2\0031.0*\003\001\002\0042\020application/json:\020a" + + "pplication/jsonZ#\n!\n\nApiKeyAuth\022\023\010\002\032\rAut" + + "horization \002rE\n\033More about the Authzed A" + + "PI.\022&https://docs.authzed.com/reference/" + + "apib\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + grpc.gateway.protoc_gen_openapiv2.options.Annotations.getDescriptor(), + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(grpc.gateway.protoc_gen_openapiv2.options.Annotations.openapiv2Swagger); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + grpc.gateway.protoc_gen_openapiv2.options.Annotations.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/v1/PartialCaveatInfo.java b/generated/com/authzed/api/v1/PartialCaveatInfo.java new file mode 100644 index 00000000..09d9ec0c --- /dev/null +++ b/generated/com/authzed/api/v1/PartialCaveatInfo.java @@ -0,0 +1,668 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * 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 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.PartialCaveatInfo.class, com.authzed.api.v1.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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.PartialCaveatInfo)) { + return super.equals(obj); + } + com.authzed.api.v1.PartialCaveatInfo other = (com.authzed.api.v1.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.PartialCaveatInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.PartialCaveatInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.PartialCaveatInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.PartialCaveatInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.PartialCaveatInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.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.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.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.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.PartialCaveatInfo.class, com.authzed.api.v1.PartialCaveatInfo.Builder.class); + } + + // Construct using com.authzed.api.v1.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.PartialCaveatInfo getDefaultInstanceForType() { + return com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfo build() { + com.authzed.api.v1.PartialCaveatInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfo buildPartial() { + com.authzed.api.v1.PartialCaveatInfo result = new com.authzed.api.v1.PartialCaveatInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.PartialCaveatInfo result) { + if (((bitField0_ & 0x00000001) != 0)) { + missingRequiredContext_ = missingRequiredContext_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.missingRequiredContext_ = missingRequiredContext_; + } + + private void buildPartial0(com.authzed.api.v1.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.PartialCaveatInfo) { + return mergeFrom((com.authzed.api.v1.PartialCaveatInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.PartialCaveatInfo other) { + if (other == com.authzed.api.v1.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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.PartialCaveatInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.PartialCaveatInfo(); + } + + public static com.authzed.api.v1.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.PartialCaveatInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/PartialCaveatInfoOrBuilder.java b/generated/com/authzed/api/v1/PartialCaveatInfoOrBuilder.java new file mode 100644 index 00000000..4ef72ef0 --- /dev/null +++ b/generated/com/authzed/api/v1/PartialCaveatInfoOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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 [json_name = "missingRequiredContext", (.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); +} diff --git a/generated/com/authzed/api/v1/PermissionRelationshipTree.java b/generated/com/authzed/api/v1/PermissionRelationshipTree.java new file mode 100644 index 00000000..73889a69 --- /dev/null +++ b/generated/com/authzed/api/v1/PermissionRelationshipTree.java @@ -0,0 +1,1225 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * 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 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.PermissionRelationshipTree.class, com.authzed.api.v1.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 [json_name = "intermediate"]; + * @return Whether the intermediate field is set. + */ + @java.lang.Override + public boolean hasIntermediate() { + return treeTypeCase_ == 1; + } + /** + * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1 [json_name = "intermediate"]; + * @return The intermediate. + */ + @java.lang.Override + public com.authzed.api.v1.AlgebraicSubjectSet getIntermediate() { + if (treeTypeCase_ == 1) { + return (com.authzed.api.v1.AlgebraicSubjectSet) treeType_; + } + return com.authzed.api.v1.AlgebraicSubjectSet.getDefaultInstance(); + } + /** + * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1 [json_name = "intermediate"]; + */ + @java.lang.Override + public com.authzed.api.v1.AlgebraicSubjectSetOrBuilder getIntermediateOrBuilder() { + if (treeTypeCase_ == 1) { + return (com.authzed.api.v1.AlgebraicSubjectSet) treeType_; + } + return com.authzed.api.v1.AlgebraicSubjectSet.getDefaultInstance(); + } + + public static final int LEAF_FIELD_NUMBER = 2; + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + * @return Whether the leaf field is set. + */ + @java.lang.Override + public boolean hasLeaf() { + return treeTypeCase_ == 2; + } + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + * @return The leaf. + */ + @java.lang.Override + public com.authzed.api.v1.DirectSubjectSet getLeaf() { + if (treeTypeCase_ == 2) { + return (com.authzed.api.v1.DirectSubjectSet) treeType_; + } + return com.authzed.api.v1.DirectSubjectSet.getDefaultInstance(); + } + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + */ + @java.lang.Override + public com.authzed.api.v1.DirectSubjectSetOrBuilder getLeafOrBuilder() { + if (treeTypeCase_ == 2) { + return (com.authzed.api.v1.DirectSubjectSet) treeType_; + } + return com.authzed.api.v1.DirectSubjectSet.getDefaultInstance(); + } + + public static final int EXPANDED_OBJECT_FIELD_NUMBER = 3; + private com.authzed.api.v1.ObjectReference expandedObject_; + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + * @return Whether the expandedObject field is set. + */ + @java.lang.Override + public boolean hasExpandedObject() { + return expandedObject_ != null; + } + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + * @return The expandedObject. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getExpandedObject() { + return expandedObject_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : expandedObject_; + } + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getExpandedObjectOrBuilder() { + return expandedObject_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : expandedObject_; + } + + public static final int EXPANDED_RELATION_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object expandedRelation_ = ""; + /** + * string expanded_relation = 4 [json_name = "expandedRelation"]; + * @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 [json_name = "expandedRelation"]; + * @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.AlgebraicSubjectSet) treeType_); + } + if (treeTypeCase_ == 2) { + output.writeMessage(2, (com.authzed.api.v1.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.AlgebraicSubjectSet) treeType_); + } + if (treeTypeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.authzed.api.v1.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.PermissionRelationshipTree)) { + return super.equals(obj); + } + com.authzed.api.v1.PermissionRelationshipTree other = (com.authzed.api.v1.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.PermissionRelationshipTree parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.PermissionRelationshipTree parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.PermissionRelationshipTree parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.PermissionRelationshipTree parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.PermissionRelationshipTree parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.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.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.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.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.PermissionRelationshipTree.class, com.authzed.api.v1.PermissionRelationshipTree.Builder.class); + } + + // Construct using com.authzed.api.v1.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.PermissionRelationshipTree getDefaultInstanceForType() { + return com.authzed.api.v1.PermissionRelationshipTree.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.PermissionRelationshipTree build() { + com.authzed.api.v1.PermissionRelationshipTree result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.PermissionRelationshipTree buildPartial() { + com.authzed.api.v1.PermissionRelationshipTree result = new com.authzed.api.v1.PermissionRelationshipTree(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.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.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.PermissionRelationshipTree) { + return mergeFrom((com.authzed.api.v1.PermissionRelationshipTree)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.PermissionRelationshipTree other) { + if (other == com.authzed.api.v1.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.AlgebraicSubjectSet, com.authzed.api.v1.AlgebraicSubjectSet.Builder, com.authzed.api.v1.AlgebraicSubjectSetOrBuilder> intermediateBuilder_; + /** + * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1 [json_name = "intermediate"]; + * @return Whether the intermediate field is set. + */ + @java.lang.Override + public boolean hasIntermediate() { + return treeTypeCase_ == 1; + } + /** + * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1 [json_name = "intermediate"]; + * @return The intermediate. + */ + @java.lang.Override + public com.authzed.api.v1.AlgebraicSubjectSet getIntermediate() { + if (intermediateBuilder_ == null) { + if (treeTypeCase_ == 1) { + return (com.authzed.api.v1.AlgebraicSubjectSet) treeType_; + } + return com.authzed.api.v1.AlgebraicSubjectSet.getDefaultInstance(); + } else { + if (treeTypeCase_ == 1) { + return intermediateBuilder_.getMessage(); + } + return com.authzed.api.v1.AlgebraicSubjectSet.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1 [json_name = "intermediate"]; + */ + public Builder setIntermediate(com.authzed.api.v1.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 [json_name = "intermediate"]; + */ + public Builder setIntermediate( + com.authzed.api.v1.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 [json_name = "intermediate"]; + */ + public Builder mergeIntermediate(com.authzed.api.v1.AlgebraicSubjectSet value) { + if (intermediateBuilder_ == null) { + if (treeTypeCase_ == 1 && + treeType_ != com.authzed.api.v1.AlgebraicSubjectSet.getDefaultInstance()) { + treeType_ = com.authzed.api.v1.AlgebraicSubjectSet.newBuilder((com.authzed.api.v1.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 [json_name = "intermediate"]; + */ + 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 [json_name = "intermediate"]; + */ + public com.authzed.api.v1.AlgebraicSubjectSet.Builder getIntermediateBuilder() { + return getIntermediateFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1 [json_name = "intermediate"]; + */ + @java.lang.Override + public com.authzed.api.v1.AlgebraicSubjectSetOrBuilder getIntermediateOrBuilder() { + if ((treeTypeCase_ == 1) && (intermediateBuilder_ != null)) { + return intermediateBuilder_.getMessageOrBuilder(); + } else { + if (treeTypeCase_ == 1) { + return (com.authzed.api.v1.AlgebraicSubjectSet) treeType_; + } + return com.authzed.api.v1.AlgebraicSubjectSet.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1 [json_name = "intermediate"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.AlgebraicSubjectSet, com.authzed.api.v1.AlgebraicSubjectSet.Builder, com.authzed.api.v1.AlgebraicSubjectSetOrBuilder> + getIntermediateFieldBuilder() { + if (intermediateBuilder_ == null) { + if (!(treeTypeCase_ == 1)) { + treeType_ = com.authzed.api.v1.AlgebraicSubjectSet.getDefaultInstance(); + } + intermediateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.AlgebraicSubjectSet, com.authzed.api.v1.AlgebraicSubjectSet.Builder, com.authzed.api.v1.AlgebraicSubjectSetOrBuilder>( + (com.authzed.api.v1.AlgebraicSubjectSet) treeType_, + getParentForChildren(), + isClean()); + treeType_ = null; + } + treeTypeCase_ = 1; + onChanged(); + return intermediateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.DirectSubjectSet, com.authzed.api.v1.DirectSubjectSet.Builder, com.authzed.api.v1.DirectSubjectSetOrBuilder> leafBuilder_; + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + * @return Whether the leaf field is set. + */ + @java.lang.Override + public boolean hasLeaf() { + return treeTypeCase_ == 2; + } + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + * @return The leaf. + */ + @java.lang.Override + public com.authzed.api.v1.DirectSubjectSet getLeaf() { + if (leafBuilder_ == null) { + if (treeTypeCase_ == 2) { + return (com.authzed.api.v1.DirectSubjectSet) treeType_; + } + return com.authzed.api.v1.DirectSubjectSet.getDefaultInstance(); + } else { + if (treeTypeCase_ == 2) { + return leafBuilder_.getMessage(); + } + return com.authzed.api.v1.DirectSubjectSet.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + */ + public Builder setLeaf(com.authzed.api.v1.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 [json_name = "leaf"]; + */ + public Builder setLeaf( + com.authzed.api.v1.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 [json_name = "leaf"]; + */ + public Builder mergeLeaf(com.authzed.api.v1.DirectSubjectSet value) { + if (leafBuilder_ == null) { + if (treeTypeCase_ == 2 && + treeType_ != com.authzed.api.v1.DirectSubjectSet.getDefaultInstance()) { + treeType_ = com.authzed.api.v1.DirectSubjectSet.newBuilder((com.authzed.api.v1.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 [json_name = "leaf"]; + */ + 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 [json_name = "leaf"]; + */ + public com.authzed.api.v1.DirectSubjectSet.Builder getLeafBuilder() { + return getLeafFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + */ + @java.lang.Override + public com.authzed.api.v1.DirectSubjectSetOrBuilder getLeafOrBuilder() { + if ((treeTypeCase_ == 2) && (leafBuilder_ != null)) { + return leafBuilder_.getMessageOrBuilder(); + } else { + if (treeTypeCase_ == 2) { + return (com.authzed.api.v1.DirectSubjectSet) treeType_; + } + return com.authzed.api.v1.DirectSubjectSet.getDefaultInstance(); + } + } + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.DirectSubjectSet, com.authzed.api.v1.DirectSubjectSet.Builder, com.authzed.api.v1.DirectSubjectSetOrBuilder> + getLeafFieldBuilder() { + if (leafBuilder_ == null) { + if (!(treeTypeCase_ == 2)) { + treeType_ = com.authzed.api.v1.DirectSubjectSet.getDefaultInstance(); + } + leafBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.DirectSubjectSet, com.authzed.api.v1.DirectSubjectSet.Builder, com.authzed.api.v1.DirectSubjectSetOrBuilder>( + (com.authzed.api.v1.DirectSubjectSet) treeType_, + getParentForChildren(), + isClean()); + treeType_ = null; + } + treeTypeCase_ = 2; + onChanged(); + return leafBuilder_; + } + + private com.authzed.api.v1.ObjectReference expandedObject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> expandedObjectBuilder_; + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + * @return Whether the expandedObject field is set. + */ + public boolean hasExpandedObject() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + * @return The expandedObject. + */ + public com.authzed.api.v1.ObjectReference getExpandedObject() { + if (expandedObjectBuilder_ == null) { + return expandedObject_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : expandedObject_; + } else { + return expandedObjectBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + */ + public Builder setExpandedObject(com.authzed.api.v1.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 [json_name = "expandedObject"]; + */ + public Builder setExpandedObject( + com.authzed.api.v1.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 [json_name = "expandedObject"]; + */ + public Builder mergeExpandedObject(com.authzed.api.v1.ObjectReference value) { + if (expandedObjectBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + expandedObject_ != null && + expandedObject_ != com.authzed.api.v1.ObjectReference.getDefaultInstance()) { + getExpandedObjectBuilder().mergeFrom(value); + } else { + expandedObject_ = value; + } + } else { + expandedObjectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + */ + 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 [json_name = "expandedObject"]; + */ + public com.authzed.api.v1.ObjectReference.Builder getExpandedObjectBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getExpandedObjectFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getExpandedObjectOrBuilder() { + if (expandedObjectBuilder_ != null) { + return expandedObjectBuilder_.getMessageOrBuilder(); + } else { + return expandedObject_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : expandedObject_; + } + } + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getExpandedObjectFieldBuilder() { + if (expandedObjectBuilder_ == null) { + expandedObjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder>( + getExpandedObject(), + getParentForChildren(), + isClean()); + expandedObject_ = null; + } + return expandedObjectBuilder_; + } + + private java.lang.Object expandedRelation_ = ""; + /** + * string expanded_relation = 4 [json_name = "expandedRelation"]; + * @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 [json_name = "expandedRelation"]; + * @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 [json_name = "expandedRelation"]; + * @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 [json_name = "expandedRelation"]; + * @return This builder for chaining. + */ + public Builder clearExpandedRelation() { + expandedRelation_ = getDefaultInstance().getExpandedRelation(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string expanded_relation = 4 [json_name = "expandedRelation"]; + * @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.PermissionRelationshipTree DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.PermissionRelationshipTree(); + } + + public static com.authzed.api.v1.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.PermissionRelationshipTree getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/PermissionRelationshipTreeOrBuilder.java b/generated/com/authzed/api/v1/PermissionRelationshipTreeOrBuilder.java new file mode 100644 index 00000000..98d512cd --- /dev/null +++ b/generated/com/authzed/api/v1/PermissionRelationshipTreeOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +public interface PermissionRelationshipTreeOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.PermissionRelationshipTree) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1 [json_name = "intermediate"]; + * @return Whether the intermediate field is set. + */ + boolean hasIntermediate(); + /** + * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1 [json_name = "intermediate"]; + * @return The intermediate. + */ + com.authzed.api.v1.AlgebraicSubjectSet getIntermediate(); + /** + * .authzed.api.v1.AlgebraicSubjectSet intermediate = 1 [json_name = "intermediate"]; + */ + com.authzed.api.v1.AlgebraicSubjectSetOrBuilder getIntermediateOrBuilder(); + + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + * @return Whether the leaf field is set. + */ + boolean hasLeaf(); + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + * @return The leaf. + */ + com.authzed.api.v1.DirectSubjectSet getLeaf(); + /** + * .authzed.api.v1.DirectSubjectSet leaf = 2 [json_name = "leaf"]; + */ + com.authzed.api.v1.DirectSubjectSetOrBuilder getLeafOrBuilder(); + + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + * @return Whether the expandedObject field is set. + */ + boolean hasExpandedObject(); + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + * @return The expandedObject. + */ + com.authzed.api.v1.ObjectReference getExpandedObject(); + /** + * .authzed.api.v1.ObjectReference expanded_object = 3 [json_name = "expandedObject"]; + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getExpandedObjectOrBuilder(); + + /** + * string expanded_relation = 4 [json_name = "expandedRelation"]; + * @return The expandedRelation. + */ + java.lang.String getExpandedRelation(); + /** + * string expanded_relation = 4 [json_name = "expandedRelation"]; + * @return The bytes for expandedRelation. + */ + com.google.protobuf.ByteString + getExpandedRelationBytes(); + + public com.authzed.api.v1.PermissionRelationshipTree.TreeTypeCase getTreeTypeCase(); +} diff --git a/generated/com/authzed/api/v1/PermissionService.java b/generated/com/authzed/api/v1/PermissionService.java new file mode 100644 index 00000000..f4728a0d --- /dev/null +++ b/generated/com/authzed/api/v1/PermissionService.java @@ -0,0 +1,571 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public final class PermissionService { + private PermissionService() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_Consistency_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_Consistency_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_RelationshipFilter_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_RelationshipFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_SubjectFilter_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_SubjectFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_SubjectFilter_RelationFilter_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_SubjectFilter_RelationFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ReadRelationshipsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ReadRelationshipsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ReadRelationshipsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ReadRelationshipsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_Precondition_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_Precondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_WriteRelationshipsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_WriteRelationshipsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_WriteRelationshipsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_WriteRelationshipsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_DeleteRelationshipsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_DeleteRelationshipsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_DeleteRelationshipsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_DeleteRelationshipsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_CheckPermissionRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_CheckPermissionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_CheckPermissionResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_CheckPermissionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_CheckBulkPermissionsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_CheckBulkPermissionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_CheckBulkPermissionsRequestItem_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_CheckBulkPermissionsRequestItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_CheckBulkPermissionsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_CheckBulkPermissionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_CheckBulkPermissionsPair_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_CheckBulkPermissionsPair_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_CheckBulkPermissionsResponseItem_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_CheckBulkPermissionsResponseItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpandPermissionTreeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpandPermissionTreeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ExpandPermissionTreeResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ExpandPermissionTreeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_LookupResourcesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_LookupResourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_LookupResourcesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_LookupResourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_LookupSubjectsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_LookupSubjectsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_LookupSubjectsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_LookupSubjectsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ResolvedSubject_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ResolvedSubject_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\'authzed/api/v1/permission_service.prot" + + "o\022\016authzed.api.v1\032\034google/protobuf/struc" + + "t.proto\032\034google/api/annotations.proto\032\027g" + + "oogle/rpc/status.proto\032\027validate/validat" + + "e.proto\032\031authzed/api/v1/core.proto\032\032auth" + + "zed/api/v1/debug.proto\"\234\002\n\013Consistency\0224" + + "\n\020minimize_latency\030\001 \001(\010B\007\372B\004j\002\010\001H\000R\017min" + + "imizeLatency\022E\n\021at_least_as_fresh\030\002 \001(\0132" + + "\030.authzed.api.v1.ZedTokenH\000R\016atLeastAsFr" + + "esh\022F\n\021at_exact_snapshot\030\003 \001(\0132\030.authzed" + + ".api.v1.ZedTokenH\000R\017atExactSnapshot\0224\n\020f" + + "ully_consistent\030\004 \001(\010B\007\372B\004j\002\010\001H\000R\017fullyC" + + "onsistentB\022\n\013requirement\022\003\370B\001\"\365\003\n\022Relati" + + "onshipFilter\022p\n\rresource_type\030\001 \001(\tBK\372BH" + + "rF(\200\0012A^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)" + + "*[a-z][a-z0-9_]{1,62}[a-z0-9])?$R\014resour" + + "ceType\022W\n\024optional_resource_id\030\002 \001(\tB%\372B" + + "\"r (\200\0102\033^([a-zA-Z0-9/_|\\-=+]{1,})?$R\022opt" + + "ionalResourceId\022d\n\033optional_resource_id_" + + "prefix\030\005 \001(\tB%\372B\"r (\200\0102\033^([a-zA-Z0-9/_|\\" + + "-=+]{1,})?$R\030optionalResourceIdPrefix\022W\n" + + "\021optional_relation\030\003 \001(\tB*\372B\'r%(@2!^([a-" + + "z][a-z0-9_]{1,62}[a-z0-9])?$R\020optionalRe" + + "lation\022U\n\027optional_subject_filter\030\004 \001(\0132" + + "\035.authzed.api.v1.SubjectFilterR\025optional" + + "SubjectFilter\"\215\003\n\rSubjectFilter\022k\n\014subje" + + "ct_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]$R\013subjectType\022Z\n\023optional_subject" + + "_id\030\002 \001(\tB*\372B\'r%(\200\0102 ^(([a-zA-Z0-9/_|\\-=" + + "+]{1,})|\\*)?$R\021optionalSubjectId\022Y\n\021opti" + + "onal_relation\030\003 \001(\0132,.authzed.api.v1.Sub" + + "jectFilter.RelationFilterR\020optionalRelat" + + "ion\032X\n\016RelationFilter\022F\n\010relation\030\001 \001(\tB" + + "*\372B\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9]" + + ")?$R\010relation\"\251\002\n\030ReadRelationshipsReque" + + "st\022=\n\013consistency\030\001 \001(\0132\033.authzed.api.v1" + + ".ConsistencyR\013consistency\022]\n\023relationshi" + + "p_filter\030\002 \001(\0132\".authzed.api.v1.Relation" + + "shipFilterB\010\372B\005\212\001\002\020\001R\022relationshipFilter" + + "\022.\n\016optional_limit\030\003 \001(\rB\007\372B\004*\002(\000R\roptio" + + "nalLimit\022?\n\017optional_cursor\030\004 \001(\0132\026.auth" + + "zed.api.v1.CursorR\016optionalCursor\"\354\001\n\031Re" + + "adRelationshipsResponse\022;\n\007read_at\030\001 \001(\013" + + "2\030.authzed.api.v1.ZedTokenB\010\372B\005\212\001\002\020\001R\006re" + + "adAt\022J\n\014relationship\030\002 \001(\0132\034.authzed.api" + + ".v1.RelationshipB\010\372B\005\212\001\002\020\001R\014relationship" + + "\022F\n\023after_result_cursor\030\003 \001(\0132\026.authzed." + + "api.v1.CursorR\021afterResultCursor\"\206\002\n\014Pre" + + "condition\022P\n\toperation\030\001 \001(\0162&.authzed.a" + + "pi.v1.Precondition.OperationB\n\372B\007\202\001\004\020\001 \000" + + "R\toperation\022D\n\006filter\030\002 \001(\0132\".authzed.ap" + + "i.v1.RelationshipFilterB\010\372B\005\212\001\002\020\001R\006filte" + + "r\"^\n\tOperation\022\031\n\025OPERATION_UNSPECIFIED\020" + + "\000\022\034\n\030OPERATION_MUST_NOT_MATCH\020\001\022\030\n\024OPERA" + + "TION_MUST_MATCH\020\002\"\314\001\n\031WriteRelationships" + + "Request\022K\n\007updates\030\001 \003(\0132\".authzed.api.v" + + "1.RelationshipUpdateB\r\372B\n\222\001\007\"\005\212\001\002\020\001R\007upd" + + "ates\022b\n\026optional_preconditions\030\002 \003(\0132\034.a" + + "uthzed.api.v1.PreconditionB\r\372B\n\222\001\007\"\005\212\001\002\020" + + "\001R\025optionalPreconditions\"U\n\032WriteRelatio" + + "nshipsResponse\0227\n\nwritten_at\030\001 \001(\0132\030.aut" + + "hzed.api.v1.ZedTokenR\twrittenAt\"\330\002\n\032Dele" + + "teRelationshipsRequest\022]\n\023relationship_f" + + "ilter\030\001 \001(\0132\".authzed.api.v1.Relationshi" + + "pFilterB\010\372B\005\212\001\002\020\001R\022relationshipFilter\022b\n" + + "\026optional_preconditions\030\002 \003(\0132\034.authzed." + + "api.v1.PreconditionB\r\372B\n\222\001\007\"\005\212\001\002\020\001R\025opti" + + "onalPreconditions\022.\n\016optional_limit\030\003 \001(" + + "\rB\007\372B\004*\002(\000R\roptionalLimit\022G\n optional_al" + + "low_partial_deletions\030\004 \001(\010R\035optionalAll" + + "owPartialDeletions\"\267\002\n\033DeleteRelationshi" + + "psResponse\0227\n\ndeleted_at\030\001 \001(\0132\030.authzed" + + ".api.v1.ZedTokenR\tdeletedAt\022i\n\021deletion_" + + "progress\030\002 \001(\0162<.authzed.api.v1.DeleteRe" + + "lationshipsResponse.DeletionProgressR\020de" + + "letionProgress\"t\n\020DeletionProgress\022!\n\035DE" + + "LETION_PROGRESS_UNSPECIFIED\020\000\022\036\n\032DELETIO" + + "N_PROGRESS_COMPLETE\020\001\022\035\n\031DELETION_PROGRE" + + "SS_PARTIAL\020\002\"\220\003\n\026CheckPermissionRequest\022" + + "=\n\013consistency\030\001 \001(\0132\033.authzed.api.v1.Co" + + "nsistencyR\013consistency\022E\n\010resource\030\002 \001(\013" + + "2\037.authzed.api.v1.ObjectReferenceB\010\372B\005\212\001" + + "\002\020\001R\010resource\022J\n\npermission\030\003 \001(\tB*\372B\'r%" + + "(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\np" + + "ermission\022D\n\007subject\030\004 \001(\0132 .authzed.api" + + ".v1.SubjectReferenceB\010\372B\005\212\001\002\020\001R\007subject\022" + + ";\n\007context\030\005 \001(\0132\027.google.protobuf.Struc" + + "tB\010\372B\005\212\001\002\020\000R\007context\022!\n\014with_tracing\030\006 \001" + + "(\010R\013withTracing\"\213\004\n\027CheckPermissionRespo" + + "nse\022A\n\nchecked_at\030\001 \001(\0132\030.authzed.api.v1" + + ".ZedTokenB\010\372B\005\212\001\002\020\000R\tcheckedAt\022j\n\016permis" + + "sionship\030\002 \001(\01626.authzed.api.v1.CheckPer" + + "missionResponse.PermissionshipB\n\372B\007\202\001\004\020\001" + + " \000R\016permissionship\022[\n\023partial_caveat_inf" + + "o\030\003 \001(\0132!.authzed.api.v1.PartialCaveatIn" + + "foB\010\372B\005\212\001\002\020\000R\021partialCaveatInfo\022A\n\013debug" + + "_trace\030\004 \001(\0132 .authzed.api.v1.DebugInfor" + + "mationR\ndebugTrace\"\240\001\n\016Permissionship\022\036\n" + + "\032PERMISSIONSHIP_UNSPECIFIED\020\000\022 \n\034PERMISS" + + "IONSHIP_NO_PERMISSION\020\001\022!\n\035PERMISSIONSHI" + + "P_HAS_PERMISSION\020\002\022)\n%PERMISSIONSHIP_CON" + + "DITIONAL_PERMISSION\020\003\"\262\001\n\033CheckBulkPermi" + + "ssionsRequest\022=\n\013consistency\030\001 \001(\0132\033.aut" + + "hzed.api.v1.ConsistencyR\013consistency\022T\n\005" + + "items\030\002 \003(\0132/.authzed.api.v1.CheckBulkPe" + + "rmissionsRequestItemB\r\372B\n\222\001\007\"\005\212\001\002\020\001R\005ite" + + "ms\"\267\002\n\037CheckBulkPermissionsRequestItem\022E" + + "\n\010resource\030\001 \001(\0132\037.authzed.api.v1.Object" + + "ReferenceB\010\372B\005\212\001\002\020\001R\010resource\022J\n\npermiss" + + "ion\030\002 \001(\tB*\372B\'r%(@2!^([a-z][a-z0-9_]{1,6" + + "2}[a-z0-9])?$R\npermission\022D\n\007subject\030\003 \001" + + "(\0132 .authzed.api.v1.SubjectReferenceB\010\372B" + + "\005\212\001\002\020\001R\007subject\022;\n\007context\030\004 \001(\0132\027.googl" + + "e.protobuf.StructB\010\372B\005\212\001\002\020\000R\007context\"\260\001\n" + + "\034CheckBulkPermissionsResponse\022A\n\nchecked" + + "_at\030\001 \001(\0132\030.authzed.api.v1.ZedTokenB\010\372B\005" + + "\212\001\002\020\000R\tcheckedAt\022M\n\005pairs\030\002 \003(\0132(.authze" + + "d.api.v1.CheckBulkPermissionsPairB\r\372B\n\222\001" + + "\007\"\005\212\001\002\020\001R\005pairs\"\345\001\n\030CheckBulkPermissions" + + "Pair\022I\n\007request\030\001 \001(\0132/.authzed.api.v1.C" + + "heckBulkPermissionsRequestItemR\007request\022" + + "F\n\004item\030\002 \001(\01320.authzed.api.v1.CheckBulk" + + "PermissionsResponseItemH\000R\004item\022*\n\005error" + + "\030\003 \001(\0132\022.google.rpc.StatusH\000R\005errorB\n\n\010r" + + "esponse\"\353\001\n CheckBulkPermissionsResponse" + + "Item\022j\n\016permissionship\030\001 \001(\01626.authzed.a" + + "pi.v1.CheckPermissionResponse.Permission" + + "shipB\n\372B\007\202\001\004\020\001 \000R\016permissionship\022[\n\023part" + + "ial_caveat_info\030\002 \001(\0132!.authzed.api.v1.P" + + "artialCaveatInfoB\010\372B\005\212\001\002\020\000R\021partialCavea" + + "tInfo\"\357\001\n\033ExpandPermissionTreeRequest\022=\n" + + "\013consistency\030\001 \001(\0132\033.authzed.api.v1.Cons" + + "istencyR\013consistency\022E\n\010resource\030\002 \001(\0132\037" + + ".authzed.api.v1.ObjectReferenceB\010\372B\005\212\001\002\020" + + "\001R\010resource\022J\n\npermission\030\003 \001(\tB*\372B\'r%(@" + + "2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\nper" + + "mission\"\242\001\n\034ExpandPermissionTreeResponse" + + "\0229\n\013expanded_at\030\001 \001(\0132\030.authzed.api.v1.Z" + + "edTokenR\nexpandedAt\022G\n\ttree_root\030\002 \001(\0132*" + + ".authzed.api.v1.PermissionRelationshipTr" + + "eeR\010treeRoot\"\220\004\n\026LookupResourcesRequest\022" + + "=\n\013consistency\030\001 \001(\0132\033.authzed.api.v1.Co" + + "nsistencyR\013consistency\022z\n\024resource_objec" + + "t_type\030\002 \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]$R\022resourceObjectType\022G\n\npermission" + + "\030\003 \001(\tB\'\372B$r\"(@2\036^[a-z][a-z0-9_]{1,62}[a" + + "-z0-9]$R\npermission\022D\n\007subject\030\004 \001(\0132 .a" + + "uthzed.api.v1.SubjectReferenceB\010\372B\005\212\001\002\020\001" + + "R\007subject\022;\n\007context\030\005 \001(\0132\027.google.prot" + + "obuf.StructB\010\372B\005\212\001\002\020\000R\007context\022.\n\016option" + + "al_limit\030\006 \001(\rB\007\372B\004*\002(\000R\roptionalLimit\022?" + + "\n\017optional_cursor\030\007 \001(\0132\026.authzed.api.v1" + + ".CursorR\016optionalCursor\"\202\003\n\027LookupResour" + + "cesResponse\022:\n\014looked_up_at\030\001 \001(\0132\030.auth" + + "zed.api.v1.ZedTokenR\nlookedUpAt\022,\n\022resou" + + "rce_object_id\030\002 \001(\tR\020resourceObjectId\022X\n" + + "\016permissionship\030\003 \001(\0162$.authzed.api.v1.L" + + "ookupPermissionshipB\n\372B\007\202\001\004\020\001 \000R\016permiss" + + "ionship\022[\n\023partial_caveat_info\030\004 \001(\0132!.a" + + "uthzed.api.v1.PartialCaveatInfoB\010\372B\005\212\001\002\020" + + "\000R\021partialCaveatInfo\022F\n\023after_result_cur" + + "sor\030\005 \001(\0132\026.authzed.api.v1.CursorR\021after" + + "ResultCursor\"\352\006\n\025LookupSubjectsRequest\022=" + + "\n\013consistency\030\001 \001(\0132\033.authzed.api.v1.Con" + + "sistencyR\013consistency\022E\n\010resource\030\002 \001(\0132" + + "\037.authzed.api.v1.ObjectReferenceB\010\372B\005\212\001\002" + + "\020\001R\010resource\022J\n\npermission\030\003 \001(\tB*\372B\'r%(" + + "@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npe" + + "rmission\022x\n\023subject_object_type\030\004 \001(\tBH\372" + + "BErC(\200\0012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/" + + ")*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\021subject" + + "ObjectType\022f\n\031optional_subject_relation\030" + + "\005 \001(\tB*\372B\'r%(@2!^([a-z][a-z0-9_]{1,62}[a" + + "-z0-9])?$R\027optionalSubjectRelation\022;\n\007co" + + "ntext\030\006 \001(\0132\027.google.protobuf.StructB\010\372B" + + "\005\212\001\002\020\000R\007context\022?\n\027optional_concrete_lim" + + "it\030\007 \001(\rB\007\372B\004*\002(\000R\025optionalConcreteLimit" + + "\022?\n\017optional_cursor\030\010 \001(\0132\026.authzed.api." + + "v1.CursorR\016optionalCursor\022]\n\017wildcard_op" + + "tion\030\t \001(\01624.authzed.api.v1.LookupSubjec" + + "tsRequest.WildcardOptionR\016wildcardOption" + + "\"\177\n\016WildcardOption\022\037\n\033WILDCARD_OPTION_UN" + + "SPECIFIED\020\000\022%\n!WILDCARD_OPTION_INCLUDE_W" + + "ILDCARDS\020\001\022%\n!WILDCARD_OPTION_EXCLUDE_WI" + + "LDCARDS\020\002\"\306\004\n\026LookupSubjectsResponse\022:\n\014" + + "looked_up_at\030\001 \001(\0132\030.authzed.api.v1.ZedT" + + "okenR\nlookedUpAt\022.\n\021subject_object_id\030\002 " + + "\001(\tB\002\030\001R\017subjectObjectId\0224\n\024excluded_sub" + + "ject_ids\030\003 \003(\tB\002\030\001R\022excludedSubjectIds\022Z" + + "\n\016permissionship\030\004 \001(\0162$.authzed.api.v1." + + "LookupPermissionshipB\014\030\001\372B\007\202\001\004\020\001 \000R\016perm" + + "issionship\022]\n\023partial_caveat_info\030\005 \001(\0132" + + "!.authzed.api.v1.PartialCaveatInfoB\n\030\001\372B" + + "\005\212\001\002\020\000R\021partialCaveatInfo\0229\n\007subject\030\006 \001" + + "(\0132\037.authzed.api.v1.ResolvedSubjectR\007sub" + + "ject\022L\n\021excluded_subjects\030\007 \003(\0132\037.authze" + + "d.api.v1.ResolvedSubjectR\020excludedSubjec" + + "ts\022F\n\023after_result_cursor\030\010 \001(\0132\026.authze" + + "d.api.v1.CursorR\021afterResultCursor\"\364\001\n\017R" + + "esolvedSubject\022*\n\021subject_object_id\030\001 \001(" + + "\tR\017subjectObjectId\022X\n\016permissionship\030\002 \001" + + "(\0162$.authzed.api.v1.LookupPermissionship" + + "B\n\372B\007\202\001\004\020\001 \000R\016permissionship\022[\n\023partial_" + + "caveat_info\030\003 \001(\0132!.authzed.api.v1.Parti" + + "alCaveatInfoB\010\372B\005\212\001\002\020\000R\021partialCaveatInf" + + "o*\231\001\n\024LookupPermissionship\022%\n!LOOKUP_PER" + + "MISSIONSHIP_UNSPECIFIED\020\000\022(\n$LOOKUP_PERM" + + "ISSIONSHIP_HAS_PERMISSION\020\001\0220\n,LOOKUP_PE" + + "RMISSIONSHIP_CONDITIONAL_PERMISSION\020\0022\232\t" + + "\n\022PermissionsService\022\215\001\n\021ReadRelationshi" + + "ps\022(.authzed.api.v1.ReadRelationshipsReq" + + "uest\032).authzed.api.v1.ReadRelationshipsR" + + "esponse\"!\202\323\344\223\002\033:\001*\"\026/v1/relationships/re" + + "ad0\001\022\217\001\n\022WriteRelationships\022).authzed.ap" + + "i.v1.WriteRelationshipsRequest\032*.authzed" + + ".api.v1.WriteRelationshipsResponse\"\"\202\323\344\223" + + "\002\034:\001*\"\027/v1/relationships/write\022\223\001\n\023Delet" + + "eRelationships\022*.authzed.api.v1.DeleteRe" + + "lationshipsRequest\032+.authzed.api.v1.Dele" + + "teRelationshipsResponse\"#\202\323\344\223\002\035:\001*\"\030/v1/" + + "relationships/delete\022\204\001\n\017CheckPermission" + + "\022&.authzed.api.v1.CheckPermissionRequest" + + "\032\'.authzed.api.v1.CheckPermissionRespons" + + "e\" \202\323\344\223\002\032:\001*\"\025/v1/permissions/check\022\227\001\n\024" + + "CheckBulkPermissions\022+.authzed.api.v1.Ch" + + "eckBulkPermissionsRequest\032,.authzed.api." + + "v1.CheckBulkPermissionsResponse\"$\202\323\344\223\002\036:" + + "\001*\"\031/v1/permissions/checkbulk\022\224\001\n\024Expand" + + "PermissionTree\022+.authzed.api.v1.ExpandPe" + + "rmissionTreeRequest\032,.authzed.api.v1.Exp" + + "andPermissionTreeResponse\"!\202\323\344\223\002\033:\001*\"\026/v" + + "1/permissions/expand\022\212\001\n\017LookupResources" + + "\022&.authzed.api.v1.LookupResourcesRequest" + + "\032\'.authzed.api.v1.LookupResourcesRespons" + + "e\"$\202\323\344\223\002\036:\001*\"\031/v1/permissions/resources0" + + "\001\022\206\001\n\016LookupSubjects\022%.authzed.api.v1.Lo" + + "okupSubjectsRequest\032&.authzed.api.v1.Loo" + + "kupSubjectsResponse\"#\202\323\344\223\002\035:\001*\"\030/v1/perm" + + "issions/subjects0\001BJ\n\022com.authzed.api.v1" + + "P\001Z2github.com/authzed/authzed-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(), + com.google.api.AnnotationsProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + io.envoyproxy.pgv.validate.Validate.getDescriptor(), + com.authzed.api.v1.Core.getDescriptor(), + com.authzed.api.v1.Debug.getDescriptor(), + }); + internal_static_authzed_api_v1_Consistency_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_v1_Consistency_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_Consistency_descriptor, + new java.lang.String[] { "MinimizeLatency", "AtLeastAsFresh", "AtExactSnapshot", "FullyConsistent", "Requirement", }); + internal_static_authzed_api_v1_RelationshipFilter_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_v1_RelationshipFilter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_RelationshipFilter_descriptor, + new java.lang.String[] { "ResourceType", "OptionalResourceId", "OptionalResourceIdPrefix", "OptionalRelation", "OptionalSubjectFilter", }); + internal_static_authzed_api_v1_SubjectFilter_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authzed_api_v1_SubjectFilter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_SubjectFilter_descriptor, + new java.lang.String[] { "SubjectType", "OptionalSubjectId", "OptionalRelation", }); + internal_static_authzed_api_v1_SubjectFilter_RelationFilter_descriptor = + internal_static_authzed_api_v1_SubjectFilter_descriptor.getNestedTypes().get(0); + internal_static_authzed_api_v1_SubjectFilter_RelationFilter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_SubjectFilter_RelationFilter_descriptor, + new java.lang.String[] { "Relation", }); + internal_static_authzed_api_v1_ReadRelationshipsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_authzed_api_v1_ReadRelationshipsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ReadRelationshipsRequest_descriptor, + new java.lang.String[] { "Consistency", "RelationshipFilter", "OptionalLimit", "OptionalCursor", }); + internal_static_authzed_api_v1_ReadRelationshipsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_authzed_api_v1_ReadRelationshipsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ReadRelationshipsResponse_descriptor, + new java.lang.String[] { "ReadAt", "Relationship", "AfterResultCursor", }); + internal_static_authzed_api_v1_Precondition_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_authzed_api_v1_Precondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_Precondition_descriptor, + new java.lang.String[] { "Operation", "Filter", }); + internal_static_authzed_api_v1_WriteRelationshipsRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_authzed_api_v1_WriteRelationshipsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_WriteRelationshipsRequest_descriptor, + new java.lang.String[] { "Updates", "OptionalPreconditions", }); + internal_static_authzed_api_v1_WriteRelationshipsResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_authzed_api_v1_WriteRelationshipsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_WriteRelationshipsResponse_descriptor, + new java.lang.String[] { "WrittenAt", }); + internal_static_authzed_api_v1_DeleteRelationshipsRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_authzed_api_v1_DeleteRelationshipsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_DeleteRelationshipsRequest_descriptor, + new java.lang.String[] { "RelationshipFilter", "OptionalPreconditions", "OptionalLimit", "OptionalAllowPartialDeletions", }); + internal_static_authzed_api_v1_DeleteRelationshipsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_authzed_api_v1_DeleteRelationshipsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_DeleteRelationshipsResponse_descriptor, + new java.lang.String[] { "DeletedAt", "DeletionProgress", }); + internal_static_authzed_api_v1_CheckPermissionRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_authzed_api_v1_CheckPermissionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_CheckPermissionRequest_descriptor, + new java.lang.String[] { "Consistency", "Resource", "Permission", "Subject", "Context", "WithTracing", }); + internal_static_authzed_api_v1_CheckPermissionResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_authzed_api_v1_CheckPermissionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_CheckPermissionResponse_descriptor, + new java.lang.String[] { "CheckedAt", "Permissionship", "PartialCaveatInfo", "DebugTrace", }); + internal_static_authzed_api_v1_CheckBulkPermissionsRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_authzed_api_v1_CheckBulkPermissionsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_CheckBulkPermissionsRequest_descriptor, + new java.lang.String[] { "Consistency", "Items", }); + internal_static_authzed_api_v1_CheckBulkPermissionsRequestItem_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_authzed_api_v1_CheckBulkPermissionsRequestItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_CheckBulkPermissionsRequestItem_descriptor, + new java.lang.String[] { "Resource", "Permission", "Subject", "Context", }); + internal_static_authzed_api_v1_CheckBulkPermissionsResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_authzed_api_v1_CheckBulkPermissionsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_CheckBulkPermissionsResponse_descriptor, + new java.lang.String[] { "CheckedAt", "Pairs", }); + internal_static_authzed_api_v1_CheckBulkPermissionsPair_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_authzed_api_v1_CheckBulkPermissionsPair_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_CheckBulkPermissionsPair_descriptor, + new java.lang.String[] { "Request", "Item", "Error", "Response", }); + internal_static_authzed_api_v1_CheckBulkPermissionsResponseItem_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_authzed_api_v1_CheckBulkPermissionsResponseItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_CheckBulkPermissionsResponseItem_descriptor, + new java.lang.String[] { "Permissionship", "PartialCaveatInfo", }); + internal_static_authzed_api_v1_ExpandPermissionTreeRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_authzed_api_v1_ExpandPermissionTreeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpandPermissionTreeRequest_descriptor, + new java.lang.String[] { "Consistency", "Resource", "Permission", }); + internal_static_authzed_api_v1_ExpandPermissionTreeResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_authzed_api_v1_ExpandPermissionTreeResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ExpandPermissionTreeResponse_descriptor, + new java.lang.String[] { "ExpandedAt", "TreeRoot", }); + internal_static_authzed_api_v1_LookupResourcesRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_authzed_api_v1_LookupResourcesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_LookupResourcesRequest_descriptor, + new java.lang.String[] { "Consistency", "ResourceObjectType", "Permission", "Subject", "Context", "OptionalLimit", "OptionalCursor", }); + internal_static_authzed_api_v1_LookupResourcesResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_authzed_api_v1_LookupResourcesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_LookupResourcesResponse_descriptor, + new java.lang.String[] { "LookedUpAt", "ResourceObjectId", "Permissionship", "PartialCaveatInfo", "AfterResultCursor", }); + internal_static_authzed_api_v1_LookupSubjectsRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_authzed_api_v1_LookupSubjectsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_LookupSubjectsRequest_descriptor, + new java.lang.String[] { "Consistency", "Resource", "Permission", "SubjectObjectType", "OptionalSubjectRelation", "Context", "OptionalConcreteLimit", "OptionalCursor", "WildcardOption", }); + internal_static_authzed_api_v1_LookupSubjectsResponse_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_authzed_api_v1_LookupSubjectsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_LookupSubjectsResponse_descriptor, + new java.lang.String[] { "LookedUpAt", "SubjectObjectId", "ExcludedSubjectIds", "Permissionship", "PartialCaveatInfo", "Subject", "ExcludedSubjects", "AfterResultCursor", }); + internal_static_authzed_api_v1_ResolvedSubject_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_authzed_api_v1_ResolvedSubject_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ResolvedSubject_descriptor, + new java.lang.String[] { "SubjectObjectId", "Permissionship", "PartialCaveatInfo", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + 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(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + io.envoyproxy.pgv.validate.Validate.getDescriptor(); + com.authzed.api.v1.Core.getDescriptor(); + com.authzed.api.v1.Debug.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/v1/PermissionsServiceGrpc.java b/generated/com/authzed/api/v1/PermissionsServiceGrpc.java new file mode 100644 index 00000000..1b2ec021 --- /dev/null +++ b/generated/com/authzed/api/v1/PermissionsServiceGrpc.java @@ -0,0 +1,946 @@ +package com.authzed.api.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * PermissionsService implements a set of RPCs that perform operations on
+ * relationships and permissions.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: authzed/api/v1/permission_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class PermissionsServiceGrpc { + + private PermissionsServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "authzed.api.v1.PermissionsService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getReadRelationshipsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReadRelationships", + requestType = com.authzed.api.v1.ReadRelationshipsRequest.class, + responseType = com.authzed.api.v1.ReadRelationshipsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getReadRelationshipsMethod() { + io.grpc.MethodDescriptor getReadRelationshipsMethod; + if ((getReadRelationshipsMethod = PermissionsServiceGrpc.getReadRelationshipsMethod) == null) { + synchronized (PermissionsServiceGrpc.class) { + if ((getReadRelationshipsMethod = PermissionsServiceGrpc.getReadRelationshipsMethod) == null) { + PermissionsServiceGrpc.getReadRelationshipsMethod = getReadRelationshipsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReadRelationships")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ReadRelationshipsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ReadRelationshipsResponse.getDefaultInstance())) + .setSchemaDescriptor(new PermissionsServiceMethodDescriptorSupplier("ReadRelationships")) + .build(); + } + } + } + return getReadRelationshipsMethod; + } + + private static volatile io.grpc.MethodDescriptor getWriteRelationshipsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WriteRelationships", + requestType = com.authzed.api.v1.WriteRelationshipsRequest.class, + responseType = com.authzed.api.v1.WriteRelationshipsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getWriteRelationshipsMethod() { + io.grpc.MethodDescriptor getWriteRelationshipsMethod; + if ((getWriteRelationshipsMethod = PermissionsServiceGrpc.getWriteRelationshipsMethod) == null) { + synchronized (PermissionsServiceGrpc.class) { + if ((getWriteRelationshipsMethod = PermissionsServiceGrpc.getWriteRelationshipsMethod) == null) { + PermissionsServiceGrpc.getWriteRelationshipsMethod = getWriteRelationshipsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WriteRelationships")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.WriteRelationshipsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.WriteRelationshipsResponse.getDefaultInstance())) + .setSchemaDescriptor(new PermissionsServiceMethodDescriptorSupplier("WriteRelationships")) + .build(); + } + } + } + return getWriteRelationshipsMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteRelationshipsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteRelationships", + requestType = com.authzed.api.v1.DeleteRelationshipsRequest.class, + responseType = com.authzed.api.v1.DeleteRelationshipsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteRelationshipsMethod() { + io.grpc.MethodDescriptor getDeleteRelationshipsMethod; + if ((getDeleteRelationshipsMethod = PermissionsServiceGrpc.getDeleteRelationshipsMethod) == null) { + synchronized (PermissionsServiceGrpc.class) { + if ((getDeleteRelationshipsMethod = PermissionsServiceGrpc.getDeleteRelationshipsMethod) == null) { + PermissionsServiceGrpc.getDeleteRelationshipsMethod = getDeleteRelationshipsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteRelationships")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.DeleteRelationshipsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.DeleteRelationshipsResponse.getDefaultInstance())) + .setSchemaDescriptor(new PermissionsServiceMethodDescriptorSupplier("DeleteRelationships")) + .build(); + } + } + } + return getDeleteRelationshipsMethod; + } + + private static volatile io.grpc.MethodDescriptor getCheckPermissionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CheckPermission", + requestType = com.authzed.api.v1.CheckPermissionRequest.class, + responseType = com.authzed.api.v1.CheckPermissionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCheckPermissionMethod() { + io.grpc.MethodDescriptor getCheckPermissionMethod; + if ((getCheckPermissionMethod = PermissionsServiceGrpc.getCheckPermissionMethod) == null) { + synchronized (PermissionsServiceGrpc.class) { + if ((getCheckPermissionMethod = PermissionsServiceGrpc.getCheckPermissionMethod) == null) { + PermissionsServiceGrpc.getCheckPermissionMethod = getCheckPermissionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CheckPermission")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.CheckPermissionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.CheckPermissionResponse.getDefaultInstance())) + .setSchemaDescriptor(new PermissionsServiceMethodDescriptorSupplier("CheckPermission")) + .build(); + } + } + } + return getCheckPermissionMethod; + } + + private static volatile io.grpc.MethodDescriptor getCheckBulkPermissionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CheckBulkPermissions", + requestType = com.authzed.api.v1.CheckBulkPermissionsRequest.class, + responseType = com.authzed.api.v1.CheckBulkPermissionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCheckBulkPermissionsMethod() { + io.grpc.MethodDescriptor getCheckBulkPermissionsMethod; + if ((getCheckBulkPermissionsMethod = PermissionsServiceGrpc.getCheckBulkPermissionsMethod) == null) { + synchronized (PermissionsServiceGrpc.class) { + if ((getCheckBulkPermissionsMethod = PermissionsServiceGrpc.getCheckBulkPermissionsMethod) == null) { + PermissionsServiceGrpc.getCheckBulkPermissionsMethod = getCheckBulkPermissionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CheckBulkPermissions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.CheckBulkPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.CheckBulkPermissionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new PermissionsServiceMethodDescriptorSupplier("CheckBulkPermissions")) + .build(); + } + } + } + return getCheckBulkPermissionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getExpandPermissionTreeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExpandPermissionTree", + requestType = com.authzed.api.v1.ExpandPermissionTreeRequest.class, + responseType = com.authzed.api.v1.ExpandPermissionTreeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExpandPermissionTreeMethod() { + io.grpc.MethodDescriptor getExpandPermissionTreeMethod; + if ((getExpandPermissionTreeMethod = PermissionsServiceGrpc.getExpandPermissionTreeMethod) == null) { + synchronized (PermissionsServiceGrpc.class) { + if ((getExpandPermissionTreeMethod = PermissionsServiceGrpc.getExpandPermissionTreeMethod) == null) { + PermissionsServiceGrpc.getExpandPermissionTreeMethod = getExpandPermissionTreeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExpandPermissionTree")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExpandPermissionTreeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ExpandPermissionTreeResponse.getDefaultInstance())) + .setSchemaDescriptor(new PermissionsServiceMethodDescriptorSupplier("ExpandPermissionTree")) + .build(); + } + } + } + return getExpandPermissionTreeMethod; + } + + private static volatile io.grpc.MethodDescriptor getLookupResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LookupResources", + requestType = com.authzed.api.v1.LookupResourcesRequest.class, + responseType = com.authzed.api.v1.LookupResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getLookupResourcesMethod() { + io.grpc.MethodDescriptor getLookupResourcesMethod; + if ((getLookupResourcesMethod = PermissionsServiceGrpc.getLookupResourcesMethod) == null) { + synchronized (PermissionsServiceGrpc.class) { + if ((getLookupResourcesMethod = PermissionsServiceGrpc.getLookupResourcesMethod) == null) { + PermissionsServiceGrpc.getLookupResourcesMethod = getLookupResourcesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LookupResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.LookupResourcesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.LookupResourcesResponse.getDefaultInstance())) + .setSchemaDescriptor(new PermissionsServiceMethodDescriptorSupplier("LookupResources")) + .build(); + } + } + } + return getLookupResourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor getLookupSubjectsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LookupSubjects", + requestType = com.authzed.api.v1.LookupSubjectsRequest.class, + responseType = com.authzed.api.v1.LookupSubjectsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getLookupSubjectsMethod() { + io.grpc.MethodDescriptor getLookupSubjectsMethod; + if ((getLookupSubjectsMethod = PermissionsServiceGrpc.getLookupSubjectsMethod) == null) { + synchronized (PermissionsServiceGrpc.class) { + if ((getLookupSubjectsMethod = PermissionsServiceGrpc.getLookupSubjectsMethod) == null) { + PermissionsServiceGrpc.getLookupSubjectsMethod = getLookupSubjectsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LookupSubjects")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.LookupSubjectsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.LookupSubjectsResponse.getDefaultInstance())) + .setSchemaDescriptor(new PermissionsServiceMethodDescriptorSupplier("LookupSubjects")) + .build(); + } + } + } + return getLookupSubjectsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static PermissionsServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PermissionsServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PermissionsServiceStub(channel, callOptions); + } + }; + return PermissionsServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PermissionsServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PermissionsServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PermissionsServiceBlockingStub(channel, callOptions); + } + }; + return PermissionsServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static PermissionsServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PermissionsServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PermissionsServiceFutureStub(channel, callOptions); + } + }; + return PermissionsServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   * PermissionsService implements a set of RPCs that perform operations on
+   * relationships and permissions.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * ReadRelationships reads a set of the relationships matching one or more
+     * filters.
+     * 
+ */ + default void readRelationships(com.authzed.api.v1.ReadRelationshipsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReadRelationshipsMethod(), responseObserver); + } + + /** + *
+     * WriteRelationships atomically writes and/or deletes a set of specified
+     * relationships. An optional set of preconditions can be provided that must
+     * be satisfied for the operation to commit.
+     * 
+ */ + default void writeRelationships(com.authzed.api.v1.WriteRelationshipsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWriteRelationshipsMethod(), responseObserver); + } + + /** + *
+     * DeleteRelationships atomically bulk deletes all relationships matching the
+     * provided filter. If no relationships match, none will be deleted and the
+     * operation will succeed. An optional set of preconditions can be provided that must
+     * be satisfied for the operation to commit.
+     * 
+ */ + default void deleteRelationships(com.authzed.api.v1.DeleteRelationshipsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteRelationshipsMethod(), responseObserver); + } + + /** + *
+     * CheckPermission determines for a given resource whether a subject computes
+     * to having a permission or is a direct member of a particular relation.
+     * 
+ */ + default void checkPermission(com.authzed.api.v1.CheckPermissionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCheckPermissionMethod(), responseObserver); + } + + /** + *
+     * CheckBulkPermissions evaluates the given list of permission checks
+     * and returns the list of results.
+     * 
+ */ + default void checkBulkPermissions(com.authzed.api.v1.CheckBulkPermissionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCheckBulkPermissionsMethod(), responseObserver); + } + + /** + *
+     * ExpandPermissionTree reveals the graph structure for a resource's
+     * permission or relation. This RPC does not recurse infinitely deep and may
+     * require multiple calls to fully unnest a deeply nested graph.
+     * 
+ */ + default void expandPermissionTree(com.authzed.api.v1.ExpandPermissionTreeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExpandPermissionTreeMethod(), responseObserver); + } + + /** + *
+     * LookupResources returns all the resources of a given type that a subject
+     * can access whether via a computed permission or relation membership.
+     * 
+ */ + default void lookupResources(com.authzed.api.v1.LookupResourcesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLookupResourcesMethod(), responseObserver); + } + + /** + *
+     * LookupSubjects returns all the subjects of a given type that
+     * have access whether via a computed permission or relation membership.
+     * 
+ */ + default void lookupSubjects(com.authzed.api.v1.LookupSubjectsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLookupSubjectsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service PermissionsService. + *
+   * PermissionsService implements a set of RPCs that perform operations on
+   * relationships and permissions.
+   * 
+ */ + public static abstract class PermissionsServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return PermissionsServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service PermissionsService. + *
+   * PermissionsService implements a set of RPCs that perform operations on
+   * relationships and permissions.
+   * 
+ */ + public static final class PermissionsServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private PermissionsServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PermissionsServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PermissionsServiceStub(channel, callOptions); + } + + /** + *
+     * ReadRelationships reads a set of the relationships matching one or more
+     * filters.
+     * 
+ */ + public void readRelationships(com.authzed.api.v1.ReadRelationshipsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getReadRelationshipsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * WriteRelationships atomically writes and/or deletes a set of specified
+     * relationships. An optional set of preconditions can be provided that must
+     * be satisfied for the operation to commit.
+     * 
+ */ + public void writeRelationships(com.authzed.api.v1.WriteRelationshipsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getWriteRelationshipsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * DeleteRelationships atomically bulk deletes all relationships matching the
+     * provided filter. If no relationships match, none will be deleted and the
+     * operation will succeed. An optional set of preconditions can be provided that must
+     * be satisfied for the operation to commit.
+     * 
+ */ + public void deleteRelationships(com.authzed.api.v1.DeleteRelationshipsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteRelationshipsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * CheckPermission determines for a given resource whether a subject computes
+     * to having a permission or is a direct member of a particular relation.
+     * 
+ */ + public void checkPermission(com.authzed.api.v1.CheckPermissionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCheckPermissionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * CheckBulkPermissions evaluates the given list of permission checks
+     * and returns the list of results.
+     * 
+ */ + public void checkBulkPermissions(com.authzed.api.v1.CheckBulkPermissionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCheckBulkPermissionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * ExpandPermissionTree reveals the graph structure for a resource's
+     * permission or relation. This RPC does not recurse infinitely deep and may
+     * require multiple calls to fully unnest a deeply nested graph.
+     * 
+ */ + public void expandPermissionTree(com.authzed.api.v1.ExpandPermissionTreeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExpandPermissionTreeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * LookupResources returns all the resources of a given type that a subject
+     * can access whether via a computed permission or relation membership.
+     * 
+ */ + public void lookupResources(com.authzed.api.v1.LookupResourcesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getLookupResourcesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * LookupSubjects returns all the subjects of a given type that
+     * have access whether via a computed permission or relation membership.
+     * 
+ */ + public void lookupSubjects(com.authzed.api.v1.LookupSubjectsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getLookupSubjectsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service PermissionsService. + *
+   * PermissionsService implements a set of RPCs that perform operations on
+   * relationships and permissions.
+   * 
+ */ + public static final class PermissionsServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PermissionsServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PermissionsServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PermissionsServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * ReadRelationships reads a set of the relationships matching one or more
+     * filters.
+     * 
+ */ + public java.util.Iterator readRelationships( + com.authzed.api.v1.ReadRelationshipsRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getReadRelationshipsMethod(), getCallOptions(), request); + } + + /** + *
+     * WriteRelationships atomically writes and/or deletes a set of specified
+     * relationships. An optional set of preconditions can be provided that must
+     * be satisfied for the operation to commit.
+     * 
+ */ + public com.authzed.api.v1.WriteRelationshipsResponse writeRelationships(com.authzed.api.v1.WriteRelationshipsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getWriteRelationshipsMethod(), getCallOptions(), request); + } + + /** + *
+     * DeleteRelationships atomically bulk deletes all relationships matching the
+     * provided filter. If no relationships match, none will be deleted and the
+     * operation will succeed. An optional set of preconditions can be provided that must
+     * be satisfied for the operation to commit.
+     * 
+ */ + public com.authzed.api.v1.DeleteRelationshipsResponse deleteRelationships(com.authzed.api.v1.DeleteRelationshipsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteRelationshipsMethod(), getCallOptions(), request); + } + + /** + *
+     * CheckPermission determines for a given resource whether a subject computes
+     * to having a permission or is a direct member of a particular relation.
+     * 
+ */ + public com.authzed.api.v1.CheckPermissionResponse checkPermission(com.authzed.api.v1.CheckPermissionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCheckPermissionMethod(), getCallOptions(), request); + } + + /** + *
+     * CheckBulkPermissions evaluates the given list of permission checks
+     * and returns the list of results.
+     * 
+ */ + public com.authzed.api.v1.CheckBulkPermissionsResponse checkBulkPermissions(com.authzed.api.v1.CheckBulkPermissionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCheckBulkPermissionsMethod(), getCallOptions(), request); + } + + /** + *
+     * ExpandPermissionTree reveals the graph structure for a resource's
+     * permission or relation. This RPC does not recurse infinitely deep and may
+     * require multiple calls to fully unnest a deeply nested graph.
+     * 
+ */ + public com.authzed.api.v1.ExpandPermissionTreeResponse expandPermissionTree(com.authzed.api.v1.ExpandPermissionTreeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExpandPermissionTreeMethod(), getCallOptions(), request); + } + + /** + *
+     * LookupResources returns all the resources of a given type that a subject
+     * can access whether via a computed permission or relation membership.
+     * 
+ */ + public java.util.Iterator lookupResources( + com.authzed.api.v1.LookupResourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getLookupResourcesMethod(), getCallOptions(), request); + } + + /** + *
+     * LookupSubjects returns all the subjects of a given type that
+     * have access whether via a computed permission or relation membership.
+     * 
+ */ + public java.util.Iterator lookupSubjects( + com.authzed.api.v1.LookupSubjectsRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getLookupSubjectsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service PermissionsService. + *
+   * PermissionsService implements a set of RPCs that perform operations on
+   * relationships and permissions.
+   * 
+ */ + public static final class PermissionsServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PermissionsServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PermissionsServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PermissionsServiceFutureStub(channel, callOptions); + } + + /** + *
+     * WriteRelationships atomically writes and/or deletes a set of specified
+     * relationships. An optional set of preconditions can be provided that must
+     * be satisfied for the operation to commit.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture writeRelationships( + com.authzed.api.v1.WriteRelationshipsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getWriteRelationshipsMethod(), getCallOptions()), request); + } + + /** + *
+     * DeleteRelationships atomically bulk deletes all relationships matching the
+     * provided filter. If no relationships match, none will be deleted and the
+     * operation will succeed. An optional set of preconditions can be provided that must
+     * be satisfied for the operation to commit.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteRelationships( + com.authzed.api.v1.DeleteRelationshipsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteRelationshipsMethod(), getCallOptions()), request); + } + + /** + *
+     * CheckPermission determines for a given resource whether a subject computes
+     * to having a permission or is a direct member of a particular relation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture checkPermission( + com.authzed.api.v1.CheckPermissionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCheckPermissionMethod(), getCallOptions()), request); + } + + /** + *
+     * CheckBulkPermissions evaluates the given list of permission checks
+     * and returns the list of results.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture checkBulkPermissions( + com.authzed.api.v1.CheckBulkPermissionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCheckBulkPermissionsMethod(), getCallOptions()), request); + } + + /** + *
+     * ExpandPermissionTree reveals the graph structure for a resource's
+     * permission or relation. This RPC does not recurse infinitely deep and may
+     * require multiple calls to fully unnest a deeply nested graph.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture expandPermissionTree( + com.authzed.api.v1.ExpandPermissionTreeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExpandPermissionTreeMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_READ_RELATIONSHIPS = 0; + private static final int METHODID_WRITE_RELATIONSHIPS = 1; + private static final int METHODID_DELETE_RELATIONSHIPS = 2; + private static final int METHODID_CHECK_PERMISSION = 3; + private static final int METHODID_CHECK_BULK_PERMISSIONS = 4; + private static final int METHODID_EXPAND_PERMISSION_TREE = 5; + private static final int METHODID_LOOKUP_RESOURCES = 6; + private static final int METHODID_LOOKUP_SUBJECTS = 7; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_READ_RELATIONSHIPS: + serviceImpl.readRelationships((com.authzed.api.v1.ReadRelationshipsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_WRITE_RELATIONSHIPS: + serviceImpl.writeRelationships((com.authzed.api.v1.WriteRelationshipsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_RELATIONSHIPS: + serviceImpl.deleteRelationships((com.authzed.api.v1.DeleteRelationshipsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CHECK_PERMISSION: + serviceImpl.checkPermission((com.authzed.api.v1.CheckPermissionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CHECK_BULK_PERMISSIONS: + serviceImpl.checkBulkPermissions((com.authzed.api.v1.CheckBulkPermissionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPAND_PERMISSION_TREE: + serviceImpl.expandPermissionTree((com.authzed.api.v1.ExpandPermissionTreeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LOOKUP_RESOURCES: + serviceImpl.lookupResources((com.authzed.api.v1.LookupResourcesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LOOKUP_SUBJECTS: + serviceImpl.lookupSubjects((com.authzed.api.v1.LookupSubjectsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getReadRelationshipsMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.authzed.api.v1.ReadRelationshipsRequest, + com.authzed.api.v1.ReadRelationshipsResponse>( + service, METHODID_READ_RELATIONSHIPS))) + .addMethod( + getWriteRelationshipsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.WriteRelationshipsRequest, + com.authzed.api.v1.WriteRelationshipsResponse>( + service, METHODID_WRITE_RELATIONSHIPS))) + .addMethod( + getDeleteRelationshipsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.DeleteRelationshipsRequest, + com.authzed.api.v1.DeleteRelationshipsResponse>( + service, METHODID_DELETE_RELATIONSHIPS))) + .addMethod( + getCheckPermissionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.CheckPermissionRequest, + com.authzed.api.v1.CheckPermissionResponse>( + service, METHODID_CHECK_PERMISSION))) + .addMethod( + getCheckBulkPermissionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.CheckBulkPermissionsRequest, + com.authzed.api.v1.CheckBulkPermissionsResponse>( + service, METHODID_CHECK_BULK_PERMISSIONS))) + .addMethod( + getExpandPermissionTreeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.ExpandPermissionTreeRequest, + com.authzed.api.v1.ExpandPermissionTreeResponse>( + service, METHODID_EXPAND_PERMISSION_TREE))) + .addMethod( + getLookupResourcesMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.authzed.api.v1.LookupResourcesRequest, + com.authzed.api.v1.LookupResourcesResponse>( + service, METHODID_LOOKUP_RESOURCES))) + .addMethod( + getLookupSubjectsMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.authzed.api.v1.LookupSubjectsRequest, + com.authzed.api.v1.LookupSubjectsResponse>( + service, METHODID_LOOKUP_SUBJECTS))) + .build(); + } + + private static abstract class PermissionsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PermissionsServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.authzed.api.v1.PermissionService.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PermissionsService"); + } + } + + private static final class PermissionsServiceFileDescriptorSupplier + extends PermissionsServiceBaseDescriptorSupplier { + PermissionsServiceFileDescriptorSupplier() {} + } + + private static final class PermissionsServiceMethodDescriptorSupplier + extends PermissionsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PermissionsServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PermissionsServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PermissionsServiceFileDescriptorSupplier()) + .addMethod(getReadRelationshipsMethod()) + .addMethod(getWriteRelationshipsMethod()) + .addMethod(getDeleteRelationshipsMethod()) + .addMethod(getCheckPermissionMethod()) + .addMethod(getCheckBulkPermissionsMethod()) + .addMethod(getExpandPermissionTreeMethod()) + .addMethod(getLookupResourcesMethod()) + .addMethod(getLookupSubjectsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/generated/com/authzed/api/v1/Precondition.java b/generated/com/authzed/api/v1/Precondition.java new file mode 100644 index 00000000..26e26efc --- /dev/null +++ b/generated/com/authzed/api/v1/Precondition.java @@ -0,0 +1,820 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * Precondition specifies how and the existence or absence of certain
+ * relationships as expressed through the accompanying filter should affect
+ * whether or not the operation proceeds.
+ * MUST_NOT_MATCH will fail the parent request if any relationships match the
+ * relationships filter.
+ * MUST_MATCH will fail the parent request if there are no
+ * relationships that match the filter.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.Precondition} + */ +public final class Precondition extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.Precondition) + PreconditionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Precondition.newBuilder() to construct. + private Precondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Precondition() { + operation_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Precondition(); + } + + @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.PermissionService.internal_static_authzed_api_v1_Precondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_Precondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.Precondition.class, com.authzed.api.v1.Precondition.Builder.class); + } + + /** + * Protobuf enum {@code authzed.api.v1.Precondition.Operation} + */ + public enum Operation + implements com.google.protobuf.ProtocolMessageEnum { + /** + * OPERATION_UNSPECIFIED = 0; + */ + OPERATION_UNSPECIFIED(0), + /** + * OPERATION_MUST_NOT_MATCH = 1; + */ + OPERATION_MUST_NOT_MATCH(1), + /** + * OPERATION_MUST_MATCH = 2; + */ + OPERATION_MUST_MATCH(2), + UNRECOGNIZED(-1), + ; + + /** + * OPERATION_UNSPECIFIED = 0; + */ + public static final int OPERATION_UNSPECIFIED_VALUE = 0; + /** + * OPERATION_MUST_NOT_MATCH = 1; + */ + public static final int OPERATION_MUST_NOT_MATCH_VALUE = 1; + /** + * OPERATION_MUST_MATCH = 2; + */ + public static final int OPERATION_MUST_MATCH_VALUE = 2; + + + 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_MUST_NOT_MATCH; + case 2: return OPERATION_MUST_MATCH; + 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.Precondition.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.Precondition.Operation) + } + + public static final int OPERATION_FIELD_NUMBER = 1; + private int operation_ = 0; + /** + * .authzed.api.v1.Precondition.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for operation. + */ + @java.lang.Override public int getOperationValue() { + return operation_; + } + /** + * .authzed.api.v1.Precondition.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return The operation. + */ + @java.lang.Override public com.authzed.api.v1.Precondition.Operation getOperation() { + com.authzed.api.v1.Precondition.Operation result = com.authzed.api.v1.Precondition.Operation.forNumber(operation_); + return result == null ? com.authzed.api.v1.Precondition.Operation.UNRECOGNIZED : result; + } + + public static final int FILTER_FIELD_NUMBER = 2; + private com.authzed.api.v1.RelationshipFilter filter_; + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return filter_ != null; + } + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + * @return The filter. + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilter getFilter() { + return filter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : filter_; + } + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilterOrBuilder getFilterOrBuilder() { + return filter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : filter_; + } + + 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.Precondition.Operation.OPERATION_UNSPECIFIED.getNumber()) { + output.writeEnum(1, operation_); + } + if (filter_ != null) { + output.writeMessage(2, getFilter()); + } + 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.Precondition.Operation.OPERATION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, operation_); + } + if (filter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFilter()); + } + 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.Precondition)) { + return super.equals(obj); + } + com.authzed.api.v1.Precondition other = (com.authzed.api.v1.Precondition) obj; + + if (operation_ != other.operation_) return false; + if (hasFilter() != other.hasFilter()) return false; + if (hasFilter()) { + if (!getFilter() + .equals(other.getFilter())) 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 (hasFilter()) { + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.Precondition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.Precondition 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.Precondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.Precondition 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.Precondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.Precondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.Precondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.Precondition 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.Precondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.Precondition 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.Precondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.Precondition 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.Precondition 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; + } + /** + *
+   * Precondition specifies how and the existence or absence of certain
+   * relationships as expressed through the accompanying filter should affect
+   * whether or not the operation proceeds.
+   * MUST_NOT_MATCH will fail the parent request if any relationships match the
+   * relationships filter.
+   * MUST_MATCH will fail the parent request if there are no
+   * relationships that match the filter.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.Precondition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.Precondition) + com.authzed.api.v1.PreconditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_Precondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_Precondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.Precondition.class, com.authzed.api.v1.Precondition.Builder.class); + } + + // Construct using com.authzed.api.v1.Precondition.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; + filter_ = null; + if (filterBuilder_ != null) { + filterBuilder_.dispose(); + filterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_Precondition_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.Precondition getDefaultInstanceForType() { + return com.authzed.api.v1.Precondition.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.Precondition build() { + com.authzed.api.v1.Precondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.Precondition buildPartial() { + com.authzed.api.v1.Precondition result = new com.authzed.api.v1.Precondition(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.Precondition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operation_ = operation_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filterBuilder_ == null + ? filter_ + : filterBuilder_.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.Precondition) { + return mergeFrom((com.authzed.api.v1.Precondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.Precondition other) { + if (other == com.authzed.api.v1.Precondition.getDefaultInstance()) return this; + if (other.operation_ != 0) { + setOperationValue(other.getOperationValue()); + } + if (other.hasFilter()) { + mergeFilter(other.getFilter()); + } + 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( + getFilterFieldBuilder().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.Precondition.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for operation. + */ + @java.lang.Override public int getOperationValue() { + return operation_; + } + /** + * .authzed.api.v1.Precondition.Operation operation = 1 [json_name = "operation", (.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.Precondition.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return The operation. + */ + @java.lang.Override + public com.authzed.api.v1.Precondition.Operation getOperation() { + com.authzed.api.v1.Precondition.Operation result = com.authzed.api.v1.Precondition.Operation.forNumber(operation_); + return result == null ? com.authzed.api.v1.Precondition.Operation.UNRECOGNIZED : result; + } + /** + * .authzed.api.v1.Precondition.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation(com.authzed.api.v1.Precondition.Operation value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + operation_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .authzed.api.v1.Precondition.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOperation() { + bitField0_ = (bitField0_ & ~0x00000001); + operation_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.RelationshipFilter filter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> filterBuilder_; + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + * @return Whether the filter field is set. + */ + public boolean hasFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + * @return The filter. + */ + public com.authzed.api.v1.RelationshipFilter getFilter() { + if (filterBuilder_ == null) { + return filter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : filter_; + } else { + return filterBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + */ + public Builder setFilter(com.authzed.api.v1.RelationshipFilter value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + } else { + filterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + */ + public Builder setFilter( + com.authzed.api.v1.RelationshipFilter.Builder builderForValue) { + if (filterBuilder_ == null) { + filter_ = builderForValue.build(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + */ + public Builder mergeFilter(com.authzed.api.v1.RelationshipFilter value) { + if (filterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + filter_ != null && + filter_ != com.authzed.api.v1.RelationshipFilter.getDefaultInstance()) { + getFilterBuilder().mergeFrom(value); + } else { + filter_ = value; + } + } else { + filterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + */ + public Builder clearFilter() { + bitField0_ = (bitField0_ & ~0x00000002); + filter_ = null; + if (filterBuilder_ != null) { + filterBuilder_.dispose(); + filterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipFilter.Builder getFilterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFilterFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipFilterOrBuilder getFilterOrBuilder() { + if (filterBuilder_ != null) { + return filterBuilder_.getMessageOrBuilder(); + } else { + return filter_ == null ? + com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : filter_; + } + } + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> + getFilterFieldBuilder() { + if (filterBuilder_ == null) { + filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder>( + getFilter(), + getParentForChildren(), + isClean()); + filter_ = null; + } + return filterBuilder_; + } + @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.Precondition) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.Precondition) + private static final com.authzed.api.v1.Precondition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.Precondition(); + } + + public static com.authzed.api.v1.Precondition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Precondition 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.Precondition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/PreconditionOrBuilder.java b/generated/com/authzed/api/v1/PreconditionOrBuilder.java new file mode 100644 index 00000000..57141d91 --- /dev/null +++ b/generated/com/authzed/api/v1/PreconditionOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface PreconditionOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.Precondition) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Precondition.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for operation. + */ + int getOperationValue(); + /** + * .authzed.api.v1.Precondition.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return The operation. + */ + com.authzed.api.v1.Precondition.Operation getOperation(); + + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + * @return Whether the filter field is set. + */ + boolean hasFilter(); + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + * @return The filter. + */ + com.authzed.api.v1.RelationshipFilter getFilter(); + /** + * .authzed.api.v1.RelationshipFilter filter = 2 [json_name = "filter", (.validate.rules) = { ... } + */ + com.authzed.api.v1.RelationshipFilterOrBuilder getFilterOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ReadCounterValue.java b/generated/com/authzed/api/v1/ReadCounterValue.java new file mode 100644 index 00000000..7945696e --- /dev/null +++ b/generated/com/authzed/api/v1/ReadCounterValue.java @@ -0,0 +1,720 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.ReadCounterValue} + */ +public final class ReadCounterValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ReadCounterValue) + ReadCounterValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReadCounterValue.newBuilder() to construct. + private ReadCounterValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReadCounterValue() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReadCounterValue(); + } + + @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.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ReadCounterValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ReadCounterValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ReadCounterValue.class, com.authzed.api.v1.ReadCounterValue.Builder.class); + } + + public static final int RELATIONSHIP_COUNT_FIELD_NUMBER = 1; + private long relationshipCount_ = 0L; + /** + *
+   * relationship_count is the count of relationships that match the filter.
+   * 
+ * + * uint64 relationship_count = 1 [json_name = "relationshipCount"]; + * @return The relationshipCount. + */ + @java.lang.Override + public long getRelationshipCount() { + return relationshipCount_; + } + + public static final int READ_AT_FIELD_NUMBER = 2; + private com.authzed.api.v1.ZedToken readAt_; + /** + *
+   * read_at is the ZedToken at which the relationship count applies.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return Whether the readAt field is set. + */ + @java.lang.Override + public boolean hasReadAt() { + return readAt_ != null; + } + /** + *
+   * read_at is the ZedToken at which the relationship count applies.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return The readAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getReadAt() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + /** + *
+   * read_at is the ZedToken at which the relationship count applies.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + + 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 (relationshipCount_ != 0L) { + output.writeUInt64(1, relationshipCount_); + } + if (readAt_ != null) { + output.writeMessage(2, getReadAt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (relationshipCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, relationshipCount_); + } + if (readAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReadAt()); + } + 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.ReadCounterValue)) { + return super.equals(obj); + } + com.authzed.api.v1.ReadCounterValue other = (com.authzed.api.v1.ReadCounterValue) obj; + + if (getRelationshipCount() + != other.getRelationshipCount()) return false; + if (hasReadAt() != other.hasReadAt()) return false; + if (hasReadAt()) { + if (!getReadAt() + .equals(other.getReadAt())) 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) + RELATIONSHIP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRelationshipCount()); + if (hasReadAt()) { + hash = (37 * hash) + READ_AT_FIELD_NUMBER; + hash = (53 * hash) + getReadAt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ReadCounterValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadCounterValue 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.ReadCounterValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadCounterValue 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.ReadCounterValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadCounterValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ReadCounterValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadCounterValue 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.ReadCounterValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadCounterValue 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.ReadCounterValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadCounterValue 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.ReadCounterValue 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; + } + /** + * Protobuf type {@code authzed.api.v1.ReadCounterValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ReadCounterValue) + com.authzed.api.v1.ReadCounterValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ReadCounterValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ReadCounterValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ReadCounterValue.class, com.authzed.api.v1.ReadCounterValue.Builder.class); + } + + // Construct using com.authzed.api.v1.ReadCounterValue.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relationshipCount_ = 0L; + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.ExperimentalServiceOuterClass.internal_static_authzed_api_v1_ReadCounterValue_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ReadCounterValue getDefaultInstanceForType() { + return com.authzed.api.v1.ReadCounterValue.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ReadCounterValue build() { + com.authzed.api.v1.ReadCounterValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ReadCounterValue buildPartial() { + com.authzed.api.v1.ReadCounterValue result = new com.authzed.api.v1.ReadCounterValue(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ReadCounterValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relationshipCount_ = relationshipCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.readAt_ = readAtBuilder_ == null + ? readAt_ + : readAtBuilder_.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.ReadCounterValue) { + return mergeFrom((com.authzed.api.v1.ReadCounterValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ReadCounterValue other) { + if (other == com.authzed.api.v1.ReadCounterValue.getDefaultInstance()) return this; + if (other.getRelationshipCount() != 0L) { + setRelationshipCount(other.getRelationshipCount()); + } + if (other.hasReadAt()) { + mergeReadAt(other.getReadAt()); + } + 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: { + relationshipCount_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getReadAtFieldBuilder().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 long relationshipCount_ ; + /** + *
+     * relationship_count is the count of relationships that match the filter.
+     * 
+ * + * uint64 relationship_count = 1 [json_name = "relationshipCount"]; + * @return The relationshipCount. + */ + @java.lang.Override + public long getRelationshipCount() { + return relationshipCount_; + } + /** + *
+     * relationship_count is the count of relationships that match the filter.
+     * 
+ * + * uint64 relationship_count = 1 [json_name = "relationshipCount"]; + * @param value The relationshipCount to set. + * @return This builder for chaining. + */ + public Builder setRelationshipCount(long value) { + + relationshipCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * relationship_count is the count of relationships that match the filter.
+     * 
+ * + * uint64 relationship_count = 1 [json_name = "relationshipCount"]; + * @return This builder for chaining. + */ + public Builder clearRelationshipCount() { + bitField0_ = (bitField0_ & ~0x00000001); + relationshipCount_ = 0L; + onChanged(); + return this; + } + + private com.authzed.api.v1.ZedToken readAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> readAtBuilder_; + /** + *
+     * read_at is the ZedToken at which the relationship count applies.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return Whether the readAt field is set. + */ + public boolean hasReadAt() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * read_at is the ZedToken at which the relationship count applies.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return The readAt. + */ + public com.authzed.api.v1.ZedToken getReadAt() { + if (readAtBuilder_ == null) { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } else { + return readAtBuilder_.getMessage(); + } + } + /** + *
+     * read_at is the ZedToken at which the relationship count applies.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder setReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readAt_ = value; + } else { + readAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the relationship count applies.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder setReadAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (readAtBuilder_ == null) { + readAt_ = builderForValue.build(); + } else { + readAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the relationship count applies.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder mergeReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + readAt_ != null && + readAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getReadAtBuilder().mergeFrom(value); + } else { + readAt_ = value; + } + } else { + readAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the relationship count applies.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder clearReadAt() { + bitField0_ = (bitField0_ & ~0x00000002); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the relationship count applies.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedToken.Builder getReadAtBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getReadAtFieldBuilder().getBuilder(); + } + /** + *
+     * read_at is the ZedToken at which the relationship count applies.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + if (readAtBuilder_ != null) { + return readAtBuilder_.getMessageOrBuilder(); + } else { + return readAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + } + /** + *
+     * read_at is the ZedToken at which the relationship count applies.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getReadAtFieldBuilder() { + if (readAtBuilder_ == null) { + readAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getReadAt(), + getParentForChildren(), + isClean()); + readAt_ = null; + } + return readAtBuilder_; + } + @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.ReadCounterValue) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ReadCounterValue) + private static final com.authzed.api.v1.ReadCounterValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ReadCounterValue(); + } + + public static com.authzed.api.v1.ReadCounterValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadCounterValue 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.ReadCounterValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ReadCounterValueOrBuilder.java b/generated/com/authzed/api/v1/ReadCounterValueOrBuilder.java new file mode 100644 index 00000000..5c9f5317 --- /dev/null +++ b/generated/com/authzed/api/v1/ReadCounterValueOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/experimental_service.proto + +package com.authzed.api.v1; + +public interface ReadCounterValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ReadCounterValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * relationship_count is the count of relationships that match the filter.
+   * 
+ * + * uint64 relationship_count = 1 [json_name = "relationshipCount"]; + * @return The relationshipCount. + */ + long getRelationshipCount(); + + /** + *
+   * read_at is the ZedToken at which the relationship count applies.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return Whether the readAt field is set. + */ + boolean hasReadAt(); + /** + *
+   * read_at is the ZedToken at which the relationship count applies.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return The readAt. + */ + com.authzed.api.v1.ZedToken getReadAt(); + /** + *
+   * read_at is the ZedToken at which the relationship count applies.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ReadRelationshipsRequest.java b/generated/com/authzed/api/v1/ReadRelationshipsRequest.java new file mode 100644 index 00000000..3836b417 --- /dev/null +++ b/generated/com/authzed/api/v1/ReadRelationshipsRequest.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ReadRelationshipsRequest specifies one or more filters used to read matching
+ * relationships within the system.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ReadRelationshipsRequest} + */ +public final class ReadRelationshipsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ReadRelationshipsRequest) + ReadRelationshipsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReadRelationshipsRequest.newBuilder() to construct. + private ReadRelationshipsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReadRelationshipsRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReadRelationshipsRequest(); + } + + @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.PermissionService.internal_static_authzed_api_v1_ReadRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ReadRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ReadRelationshipsRequest.class, com.authzed.api.v1.ReadRelationshipsRequest.Builder.class); + } + + public static final int CONSISTENCY_FIELD_NUMBER = 1; + private com.authzed.api.v1.Consistency consistency_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + @java.lang.Override + public boolean hasConsistency() { + return consistency_ != null; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + @java.lang.Override + public com.authzed.api.v1.Consistency getConsistency() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + @java.lang.Override + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + + public static final int RELATIONSHIP_FILTER_FIELD_NUMBER = 2; + private com.authzed.api.v1.RelationshipFilter relationshipFilter_; + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be returned.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return Whether the relationshipFilter field is set. + */ + @java.lang.Override + public boolean hasRelationshipFilter() { + return relationshipFilter_ != null; + } + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be returned.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return The relationshipFilter. + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilter getRelationshipFilter() { + return relationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be returned.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilterOrBuilder getRelationshipFilterOrBuilder() { + return relationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } + + public static final int OPTIONAL_LIMIT_FIELD_NUMBER = 3; + private int optionalLimit_ = 0; + /** + *
+   * optional_limit, if non-zero, specifies the limit on the number of relationships to return
+   * before the stream is closed on the server side. By default, the stream will continue
+   * resolving relationships until exhausted or the stream is closed due to the client or a
+   * network issue.
+   * 
+ * + * uint32 optional_limit = 3 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + @java.lang.Override + public int getOptionalLimit() { + return optionalLimit_; + } + + public static final int OPTIONAL_CURSOR_FIELD_NUMBER = 4; + private com.authzed.api.v1.Cursor optionalCursor_; + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the ReadRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + @java.lang.Override + public boolean hasOptionalCursor() { + return optionalCursor_ != null; + } + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the ReadRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + @java.lang.Override + public com.authzed.api.v1.Cursor getOptionalCursor() { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the ReadRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + */ + @java.lang.Override + public com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder() { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + + 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 (consistency_ != null) { + output.writeMessage(1, getConsistency()); + } + if (relationshipFilter_ != null) { + output.writeMessage(2, getRelationshipFilter()); + } + if (optionalLimit_ != 0) { + output.writeUInt32(3, optionalLimit_); + } + if (optionalCursor_ != null) { + output.writeMessage(4, getOptionalCursor()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consistency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConsistency()); + } + if (relationshipFilter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRelationshipFilter()); + } + if (optionalLimit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, optionalLimit_); + } + if (optionalCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOptionalCursor()); + } + 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.ReadRelationshipsRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.ReadRelationshipsRequest other = (com.authzed.api.v1.ReadRelationshipsRequest) obj; + + if (hasConsistency() != other.hasConsistency()) return false; + if (hasConsistency()) { + if (!getConsistency() + .equals(other.getConsistency())) return false; + } + if (hasRelationshipFilter() != other.hasRelationshipFilter()) return false; + if (hasRelationshipFilter()) { + if (!getRelationshipFilter() + .equals(other.getRelationshipFilter())) return false; + } + if (getOptionalLimit() + != other.getOptionalLimit()) return false; + if (hasOptionalCursor() != other.hasOptionalCursor()) return false; + if (hasOptionalCursor()) { + if (!getOptionalCursor() + .equals(other.getOptionalCursor())) 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 (hasConsistency()) { + hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getConsistency().hashCode(); + } + if (hasRelationshipFilter()) { + hash = (37 * hash) + RELATIONSHIP_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipFilter().hashCode(); + } + hash = (37 * hash) + OPTIONAL_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getOptionalLimit(); + if (hasOptionalCursor()) { + hash = (37 * hash) + OPTIONAL_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getOptionalCursor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ReadRelationshipsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadRelationshipsRequest 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.ReadRelationshipsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadRelationshipsRequest 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.ReadRelationshipsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadRelationshipsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ReadRelationshipsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadRelationshipsRequest 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.ReadRelationshipsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadRelationshipsRequest 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.ReadRelationshipsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadRelationshipsRequest 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.ReadRelationshipsRequest 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; + } + /** + *
+   * ReadRelationshipsRequest specifies one or more filters used to read matching
+   * relationships within the system.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ReadRelationshipsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ReadRelationshipsRequest) + com.authzed.api.v1.ReadRelationshipsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ReadRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ReadRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ReadRelationshipsRequest.class, com.authzed.api.v1.ReadRelationshipsRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.ReadRelationshipsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + relationshipFilter_ = null; + if (relationshipFilterBuilder_ != null) { + relationshipFilterBuilder_.dispose(); + relationshipFilterBuilder_ = null; + } + optionalLimit_ = 0; + optionalCursor_ = null; + if (optionalCursorBuilder_ != null) { + optionalCursorBuilder_.dispose(); + optionalCursorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ReadRelationshipsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ReadRelationshipsRequest getDefaultInstanceForType() { + return com.authzed.api.v1.ReadRelationshipsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ReadRelationshipsRequest build() { + com.authzed.api.v1.ReadRelationshipsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ReadRelationshipsRequest buildPartial() { + com.authzed.api.v1.ReadRelationshipsRequest result = new com.authzed.api.v1.ReadRelationshipsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ReadRelationshipsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consistency_ = consistencyBuilder_ == null + ? consistency_ + : consistencyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relationshipFilter_ = relationshipFilterBuilder_ == null + ? relationshipFilter_ + : relationshipFilterBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.optionalLimit_ = optionalLimit_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.optionalCursor_ = optionalCursorBuilder_ == null + ? optionalCursor_ + : optionalCursorBuilder_.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.ReadRelationshipsRequest) { + return mergeFrom((com.authzed.api.v1.ReadRelationshipsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ReadRelationshipsRequest other) { + if (other == com.authzed.api.v1.ReadRelationshipsRequest.getDefaultInstance()) return this; + if (other.hasConsistency()) { + mergeConsistency(other.getConsistency()); + } + if (other.hasRelationshipFilter()) { + mergeRelationshipFilter(other.getRelationshipFilter()); + } + if (other.getOptionalLimit() != 0) { + setOptionalLimit(other.getOptionalLimit()); + } + if (other.hasOptionalCursor()) { + mergeOptionalCursor(other.getOptionalCursor()); + } + 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( + getConsistencyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getRelationshipFilterFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + optionalLimit_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + input.readMessage( + getOptionalCursorFieldBuilder().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.Consistency consistency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> consistencyBuilder_; + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + public boolean hasConsistency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + public com.authzed.api.v1.Consistency getConsistency() { + if (consistencyBuilder_ == null) { + return consistency_ == null ? com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } else { + return consistencyBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistency_ = value; + } else { + consistencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder setConsistency( + com.authzed.api.v1.Consistency.Builder builderForValue) { + if (consistencyBuilder_ == null) { + consistency_ = builderForValue.build(); + } else { + consistencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder mergeConsistency(com.authzed.api.v1.Consistency value) { + if (consistencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + consistency_ != null && + consistency_ != com.authzed.api.v1.Consistency.getDefaultInstance()) { + getConsistencyBuilder().mergeFrom(value); + } else { + consistency_ = value; + } + } else { + consistencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public Builder clearConsistency() { + bitField0_ = (bitField0_ & ~0x00000001); + consistency_ = null; + if (consistencyBuilder_ != null) { + consistencyBuilder_.dispose(); + consistencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.Consistency.Builder getConsistencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsistencyFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + public com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder() { + if (consistencyBuilder_ != null) { + return consistencyBuilder_.getMessageOrBuilder(); + } else { + return consistency_ == null ? + com.authzed.api.v1.Consistency.getDefaultInstance() : consistency_; + } + } + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder> + getConsistencyFieldBuilder() { + if (consistencyBuilder_ == null) { + consistencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Consistency, com.authzed.api.v1.Consistency.Builder, com.authzed.api.v1.ConsistencyOrBuilder>( + getConsistency(), + getParentForChildren(), + isClean()); + consistency_ = null; + } + return consistencyBuilder_; + } + + private com.authzed.api.v1.RelationshipFilter relationshipFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> relationshipFilterBuilder_; + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be returned.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return Whether the relationshipFilter field is set. + */ + public boolean hasRelationshipFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be returned.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return The relationshipFilter. + */ + public com.authzed.api.v1.RelationshipFilter getRelationshipFilter() { + if (relationshipFilterBuilder_ == null) { + return relationshipFilter_ == null ? com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } else { + return relationshipFilterBuilder_.getMessage(); + } + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be returned.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder setRelationshipFilter(com.authzed.api.v1.RelationshipFilter value) { + if (relationshipFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relationshipFilter_ = value; + } else { + relationshipFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be returned.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder setRelationshipFilter( + com.authzed.api.v1.RelationshipFilter.Builder builderForValue) { + if (relationshipFilterBuilder_ == null) { + relationshipFilter_ = builderForValue.build(); + } else { + relationshipFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be returned.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder mergeRelationshipFilter(com.authzed.api.v1.RelationshipFilter value) { + if (relationshipFilterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + relationshipFilter_ != null && + relationshipFilter_ != com.authzed.api.v1.RelationshipFilter.getDefaultInstance()) { + getRelationshipFilterBuilder().mergeFrom(value); + } else { + relationshipFilter_ = value; + } + } else { + relationshipFilterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be returned.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public Builder clearRelationshipFilter() { + bitField0_ = (bitField0_ & ~0x00000002); + relationshipFilter_ = null; + if (relationshipFilterBuilder_ != null) { + relationshipFilterBuilder_.dispose(); + relationshipFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be returned.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipFilter.Builder getRelationshipFilterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRelationshipFilterFieldBuilder().getBuilder(); + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be returned.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipFilterOrBuilder getRelationshipFilterOrBuilder() { + if (relationshipFilterBuilder_ != null) { + return relationshipFilterBuilder_.getMessageOrBuilder(); + } else { + return relationshipFilter_ == null ? + com.authzed.api.v1.RelationshipFilter.getDefaultInstance() : relationshipFilter_; + } + } + /** + *
+     * relationship_filter defines the filter to be applied to the relationships
+     * to be returned.
+     * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> + getRelationshipFilterFieldBuilder() { + if (relationshipFilterBuilder_ == null) { + relationshipFilterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder>( + getRelationshipFilter(), + getParentForChildren(), + isClean()); + relationshipFilter_ = null; + } + return relationshipFilterBuilder_; + } + + private int optionalLimit_ ; + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of relationships to return
+     * before the stream is closed on the server side. By default, the stream will continue
+     * resolving relationships until exhausted or the stream is closed due to the client or a
+     * network issue.
+     * 
+ * + * uint32 optional_limit = 3 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + @java.lang.Override + public int getOptionalLimit() { + return optionalLimit_; + } + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of relationships to return
+     * before the stream is closed on the server side. By default, the stream will continue
+     * resolving relationships until exhausted or the stream is closed due to the client or a
+     * network issue.
+     * 
+ * + * uint32 optional_limit = 3 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @param value The optionalLimit to set. + * @return This builder for chaining. + */ + public Builder setOptionalLimit(int value) { + + optionalLimit_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_limit, if non-zero, specifies the limit on the number of relationships to return
+     * before the stream is closed on the server side. By default, the stream will continue
+     * resolving relationships until exhausted or the stream is closed due to the client or a
+     * network issue.
+     * 
+ * + * uint32 optional_limit = 3 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalLimit() { + bitField0_ = (bitField0_ & ~0x00000004); + optionalLimit_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.Cursor optionalCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> optionalCursorBuilder_; + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the ReadRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + public boolean hasOptionalCursor() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the ReadRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + public com.authzed.api.v1.Cursor getOptionalCursor() { + if (optionalCursorBuilder_ == null) { + return optionalCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } else { + return optionalCursorBuilder_.getMessage(); + } + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the ReadRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + */ + public Builder setOptionalCursor(com.authzed.api.v1.Cursor value) { + if (optionalCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalCursor_ = value; + } else { + optionalCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the ReadRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + */ + public Builder setOptionalCursor( + com.authzed.api.v1.Cursor.Builder builderForValue) { + if (optionalCursorBuilder_ == null) { + optionalCursor_ = builderForValue.build(); + } else { + optionalCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the ReadRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + */ + public Builder mergeOptionalCursor(com.authzed.api.v1.Cursor value) { + if (optionalCursorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + optionalCursor_ != null && + optionalCursor_ != com.authzed.api.v1.Cursor.getDefaultInstance()) { + getOptionalCursorBuilder().mergeFrom(value); + } else { + optionalCursor_ = value; + } + } else { + optionalCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the ReadRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + */ + public Builder clearOptionalCursor() { + bitField0_ = (bitField0_ & ~0x00000008); + optionalCursor_ = null; + if (optionalCursorBuilder_ != null) { + optionalCursorBuilder_.dispose(); + optionalCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the ReadRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + */ + public com.authzed.api.v1.Cursor.Builder getOptionalCursorBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getOptionalCursorFieldBuilder().getBuilder(); + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the ReadRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + */ + public com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder() { + if (optionalCursorBuilder_ != null) { + return optionalCursorBuilder_.getMessageOrBuilder(); + } else { + return optionalCursor_ == null ? + com.authzed.api.v1.Cursor.getDefaultInstance() : optionalCursor_; + } + } + /** + *
+     * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+     * The cursor can be found on the ReadRelationshipsResponse object.
+     * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> + getOptionalCursorFieldBuilder() { + if (optionalCursorBuilder_ == null) { + optionalCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder>( + getOptionalCursor(), + getParentForChildren(), + isClean()); + optionalCursor_ = null; + } + return optionalCursorBuilder_; + } + @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.ReadRelationshipsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ReadRelationshipsRequest) + private static final com.authzed.api.v1.ReadRelationshipsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ReadRelationshipsRequest(); + } + + public static com.authzed.api.v1.ReadRelationshipsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadRelationshipsRequest 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.ReadRelationshipsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ReadRelationshipsRequestOrBuilder.java b/generated/com/authzed/api/v1/ReadRelationshipsRequestOrBuilder.java new file mode 100644 index 00000000..0c63e14e --- /dev/null +++ b/generated/com/authzed/api/v1/ReadRelationshipsRequestOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface ReadRelationshipsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ReadRelationshipsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return Whether the consistency field is set. + */ + boolean hasConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + * @return The consistency. + */ + com.authzed.api.v1.Consistency getConsistency(); + /** + * .authzed.api.v1.Consistency consistency = 1 [json_name = "consistency"]; + */ + com.authzed.api.v1.ConsistencyOrBuilder getConsistencyOrBuilder(); + + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be returned.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return Whether the relationshipFilter field is set. + */ + boolean hasRelationshipFilter(); + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be returned.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + * @return The relationshipFilter. + */ + com.authzed.api.v1.RelationshipFilter getRelationshipFilter(); + /** + *
+   * relationship_filter defines the filter to be applied to the relationships
+   * to be returned.
+   * 
+ * + * .authzed.api.v1.RelationshipFilter relationship_filter = 2 [json_name = "relationshipFilter", (.validate.rules) = { ... } + */ + com.authzed.api.v1.RelationshipFilterOrBuilder getRelationshipFilterOrBuilder(); + + /** + *
+   * optional_limit, if non-zero, specifies the limit on the number of relationships to return
+   * before the stream is closed on the server side. By default, the stream will continue
+   * resolving relationships until exhausted or the stream is closed due to the client or a
+   * network issue.
+   * 
+ * + * uint32 optional_limit = 3 [json_name = "optionalLimit", (.validate.rules) = { ... } + * @return The optionalLimit. + */ + int getOptionalLimit(); + + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the ReadRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + * @return Whether the optionalCursor field is set. + */ + boolean hasOptionalCursor(); + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the ReadRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + * @return The optionalCursor. + */ + com.authzed.api.v1.Cursor getOptionalCursor(); + /** + *
+   * optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+   * The cursor can be found on the ReadRelationshipsResponse object.
+   * 
+ * + * .authzed.api.v1.Cursor optional_cursor = 4 [json_name = "optionalCursor"]; + */ + com.authzed.api.v1.CursorOrBuilder getOptionalCursorOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ReadRelationshipsResponse.java b/generated/com/authzed/api/v1/ReadRelationshipsResponse.java new file mode 100644 index 00000000..ea931ac3 --- /dev/null +++ b/generated/com/authzed/api/v1/ReadRelationshipsResponse.java @@ -0,0 +1,1119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ReadRelationshipsResponse contains a Relationship found that matches the
+ * specified relationship filter(s). A instance of this response message will
+ * be streamed to the client for each relationship found.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ReadRelationshipsResponse} + */ +public final class ReadRelationshipsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ReadRelationshipsResponse) + ReadRelationshipsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReadRelationshipsResponse.newBuilder() to construct. + private ReadRelationshipsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReadRelationshipsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReadRelationshipsResponse(); + } + + @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.PermissionService.internal_static_authzed_api_v1_ReadRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ReadRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ReadRelationshipsResponse.class, com.authzed.api.v1.ReadRelationshipsResponse.Builder.class); + } + + public static final int READ_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken readAt_; + /** + *
+   * read_at is the ZedToken at which the relationship was found.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + * @return Whether the readAt field is set. + */ + @java.lang.Override + public boolean hasReadAt() { + return readAt_ != null; + } + /** + *
+   * read_at is the ZedToken at which the relationship was found.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + * @return The readAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getReadAt() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + /** + *
+   * read_at is the ZedToken at which the relationship was found.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + + public static final int RELATIONSHIP_FIELD_NUMBER = 2; + private com.authzed.api.v1.Relationship relationship_; + /** + *
+   * relationship is the found relationship.
+   * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return Whether the relationship field is set. + */ + @java.lang.Override + public boolean hasRelationship() { + return relationship_ != null; + } + /** + *
+   * relationship is the found relationship.
+   * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return The relationship. + */ + @java.lang.Override + public com.authzed.api.v1.Relationship getRelationship() { + return relationship_ == null ? com.authzed.api.v1.Relationship.getDefaultInstance() : relationship_; + } + /** + *
+   * relationship is the found relationship.
+   * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipOrBuilder getRelationshipOrBuilder() { + return relationship_ == null ? com.authzed.api.v1.Relationship.getDefaultInstance() : relationship_; + } + + public static final int AFTER_RESULT_CURSOR_FIELD_NUMBER = 3; + private com.authzed.api.v1.Cursor afterResultCursor_; + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + @java.lang.Override + public boolean hasAfterResultCursor() { + return afterResultCursor_ != null; + } + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + @java.lang.Override + public com.authzed.api.v1.Cursor getAfterResultCursor() { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + */ + @java.lang.Override + public com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder() { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + + 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 (readAt_ != null) { + output.writeMessage(1, getReadAt()); + } + if (relationship_ != null) { + output.writeMessage(2, getRelationship()); + } + if (afterResultCursor_ != null) { + output.writeMessage(3, getAfterResultCursor()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (readAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getReadAt()); + } + if (relationship_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRelationship()); + } + if (afterResultCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAfterResultCursor()); + } + 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.ReadRelationshipsResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.ReadRelationshipsResponse other = (com.authzed.api.v1.ReadRelationshipsResponse) obj; + + if (hasReadAt() != other.hasReadAt()) return false; + if (hasReadAt()) { + if (!getReadAt() + .equals(other.getReadAt())) return false; + } + if (hasRelationship() != other.hasRelationship()) return false; + if (hasRelationship()) { + if (!getRelationship() + .equals(other.getRelationship())) return false; + } + if (hasAfterResultCursor() != other.hasAfterResultCursor()) return false; + if (hasAfterResultCursor()) { + if (!getAfterResultCursor() + .equals(other.getAfterResultCursor())) 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 (hasReadAt()) { + hash = (37 * hash) + READ_AT_FIELD_NUMBER; + hash = (53 * hash) + getReadAt().hashCode(); + } + if (hasRelationship()) { + hash = (37 * hash) + RELATIONSHIP_FIELD_NUMBER; + hash = (53 * hash) + getRelationship().hashCode(); + } + if (hasAfterResultCursor()) { + hash = (37 * hash) + AFTER_RESULT_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getAfterResultCursor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ReadRelationshipsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadRelationshipsResponse 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.ReadRelationshipsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadRelationshipsResponse 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.ReadRelationshipsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadRelationshipsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ReadRelationshipsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadRelationshipsResponse 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.ReadRelationshipsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadRelationshipsResponse 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.ReadRelationshipsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadRelationshipsResponse 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.ReadRelationshipsResponse 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; + } + /** + *
+   * ReadRelationshipsResponse contains a Relationship found that matches the
+   * specified relationship filter(s). A instance of this response message will
+   * be streamed to the client for each relationship found.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ReadRelationshipsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ReadRelationshipsResponse) + com.authzed.api.v1.ReadRelationshipsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ReadRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ReadRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ReadRelationshipsResponse.class, com.authzed.api.v1.ReadRelationshipsResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.ReadRelationshipsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + relationship_ = null; + if (relationshipBuilder_ != null) { + relationshipBuilder_.dispose(); + relationshipBuilder_ = null; + } + afterResultCursor_ = null; + if (afterResultCursorBuilder_ != null) { + afterResultCursorBuilder_.dispose(); + afterResultCursorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ReadRelationshipsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ReadRelationshipsResponse getDefaultInstanceForType() { + return com.authzed.api.v1.ReadRelationshipsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ReadRelationshipsResponse build() { + com.authzed.api.v1.ReadRelationshipsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ReadRelationshipsResponse buildPartial() { + com.authzed.api.v1.ReadRelationshipsResponse result = new com.authzed.api.v1.ReadRelationshipsResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ReadRelationshipsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.readAt_ = readAtBuilder_ == null + ? readAt_ + : readAtBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relationship_ = relationshipBuilder_ == null + ? relationship_ + : relationshipBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.afterResultCursor_ = afterResultCursorBuilder_ == null + ? afterResultCursor_ + : afterResultCursorBuilder_.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.ReadRelationshipsResponse) { + return mergeFrom((com.authzed.api.v1.ReadRelationshipsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ReadRelationshipsResponse other) { + if (other == com.authzed.api.v1.ReadRelationshipsResponse.getDefaultInstance()) return this; + if (other.hasReadAt()) { + mergeReadAt(other.getReadAt()); + } + if (other.hasRelationship()) { + mergeRelationship(other.getRelationship()); + } + if (other.hasAfterResultCursor()) { + mergeAfterResultCursor(other.getAfterResultCursor()); + } + 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( + getReadAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getRelationshipFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getAfterResultCursorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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.ZedToken readAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> readAtBuilder_; + /** + *
+     * read_at is the ZedToken at which the relationship was found.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + * @return Whether the readAt field is set. + */ + public boolean hasReadAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * read_at is the ZedToken at which the relationship was found.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + * @return The readAt. + */ + public com.authzed.api.v1.ZedToken getReadAt() { + if (readAtBuilder_ == null) { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } else { + return readAtBuilder_.getMessage(); + } + } + /** + *
+     * read_at is the ZedToken at which the relationship was found.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder setReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readAt_ = value; + } else { + readAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the relationship was found.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder setReadAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (readAtBuilder_ == null) { + readAt_ = builderForValue.build(); + } else { + readAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the relationship was found.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder mergeReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + readAt_ != null && + readAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getReadAtBuilder().mergeFrom(value); + } else { + readAt_ = value; + } + } else { + readAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the relationship was found.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder clearReadAt() { + bitField0_ = (bitField0_ & ~0x00000001); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the relationship was found.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedToken.Builder getReadAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getReadAtFieldBuilder().getBuilder(); + } + /** + *
+     * read_at is the ZedToken at which the relationship was found.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + if (readAtBuilder_ != null) { + return readAtBuilder_.getMessageOrBuilder(); + } else { + return readAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + } + /** + *
+     * read_at is the ZedToken at which the relationship was found.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getReadAtFieldBuilder() { + if (readAtBuilder_ == null) { + readAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getReadAt(), + getParentForChildren(), + isClean()); + readAt_ = null; + } + return readAtBuilder_; + } + + private com.authzed.api.v1.Relationship relationship_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder> relationshipBuilder_; + /** + *
+     * relationship is the found relationship.
+     * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return Whether the relationship field is set. + */ + public boolean hasRelationship() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * relationship is the found relationship.
+     * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return The relationship. + */ + public com.authzed.api.v1.Relationship getRelationship() { + if (relationshipBuilder_ == null) { + return relationship_ == null ? com.authzed.api.v1.Relationship.getDefaultInstance() : relationship_; + } else { + return relationshipBuilder_.getMessage(); + } + } + /** + *
+     * relationship is the found relationship.
+     * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + public Builder setRelationship(com.authzed.api.v1.Relationship value) { + if (relationshipBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relationship_ = value; + } else { + relationshipBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * relationship is the found relationship.
+     * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + public Builder setRelationship( + com.authzed.api.v1.Relationship.Builder builderForValue) { + if (relationshipBuilder_ == null) { + relationship_ = builderForValue.build(); + } else { + relationshipBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * relationship is the found relationship.
+     * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + public Builder mergeRelationship(com.authzed.api.v1.Relationship value) { + if (relationshipBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + relationship_ != null && + relationship_ != com.authzed.api.v1.Relationship.getDefaultInstance()) { + getRelationshipBuilder().mergeFrom(value); + } else { + relationship_ = value; + } + } else { + relationshipBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * relationship is the found relationship.
+     * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + public Builder clearRelationship() { + bitField0_ = (bitField0_ & ~0x00000002); + relationship_ = null; + if (relationshipBuilder_ != null) { + relationshipBuilder_.dispose(); + relationshipBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * relationship is the found relationship.
+     * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Relationship.Builder getRelationshipBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRelationshipFieldBuilder().getBuilder(); + } + /** + *
+     * relationship is the found relationship.
+     * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipOrBuilder getRelationshipOrBuilder() { + if (relationshipBuilder_ != null) { + return relationshipBuilder_.getMessageOrBuilder(); + } else { + return relationship_ == null ? + com.authzed.api.v1.Relationship.getDefaultInstance() : relationship_; + } + } + /** + *
+     * relationship is the found relationship.
+     * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder> + getRelationshipFieldBuilder() { + if (relationshipBuilder_ == null) { + relationshipBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder>( + getRelationship(), + getParentForChildren(), + isClean()); + relationship_ = null; + } + return relationshipBuilder_; + } + + private com.authzed.api.v1.Cursor afterResultCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> afterResultCursorBuilder_; + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + public boolean hasAfterResultCursor() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + public com.authzed.api.v1.Cursor getAfterResultCursor() { + if (afterResultCursorBuilder_ == null) { + return afterResultCursor_ == null ? com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } else { + return afterResultCursorBuilder_.getMessage(); + } + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + */ + public Builder setAfterResultCursor(com.authzed.api.v1.Cursor value) { + if (afterResultCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + afterResultCursor_ = value; + } else { + afterResultCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + */ + public Builder setAfterResultCursor( + com.authzed.api.v1.Cursor.Builder builderForValue) { + if (afterResultCursorBuilder_ == null) { + afterResultCursor_ = builderForValue.build(); + } else { + afterResultCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + */ + public Builder mergeAfterResultCursor(com.authzed.api.v1.Cursor value) { + if (afterResultCursorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + afterResultCursor_ != null && + afterResultCursor_ != com.authzed.api.v1.Cursor.getDefaultInstance()) { + getAfterResultCursorBuilder().mergeFrom(value); + } else { + afterResultCursor_ = value; + } + } else { + afterResultCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + */ + public Builder clearAfterResultCursor() { + bitField0_ = (bitField0_ & ~0x00000004); + afterResultCursor_ = null; + if (afterResultCursorBuilder_ != null) { + afterResultCursorBuilder_.dispose(); + afterResultCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + */ + public com.authzed.api.v1.Cursor.Builder getAfterResultCursorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAfterResultCursorFieldBuilder().getBuilder(); + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + */ + public com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder() { + if (afterResultCursorBuilder_ != null) { + return afterResultCursorBuilder_.getMessageOrBuilder(); + } else { + return afterResultCursor_ == null ? + com.authzed.api.v1.Cursor.getDefaultInstance() : afterResultCursor_; + } + } + /** + *
+     * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+     * result.
+     * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder> + getAfterResultCursorFieldBuilder() { + if (afterResultCursorBuilder_ == null) { + afterResultCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Cursor, com.authzed.api.v1.Cursor.Builder, com.authzed.api.v1.CursorOrBuilder>( + getAfterResultCursor(), + getParentForChildren(), + isClean()); + afterResultCursor_ = null; + } + return afterResultCursorBuilder_; + } + @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.ReadRelationshipsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ReadRelationshipsResponse) + private static final com.authzed.api.v1.ReadRelationshipsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ReadRelationshipsResponse(); + } + + public static com.authzed.api.v1.ReadRelationshipsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadRelationshipsResponse 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.ReadRelationshipsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ReadRelationshipsResponseOrBuilder.java b/generated/com/authzed/api/v1/ReadRelationshipsResponseOrBuilder.java new file mode 100644 index 00000000..d0cdb648 --- /dev/null +++ b/generated/com/authzed/api/v1/ReadRelationshipsResponseOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface ReadRelationshipsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ReadRelationshipsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * read_at is the ZedToken at which the relationship was found.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + * @return Whether the readAt field is set. + */ + boolean hasReadAt(); + /** + *
+   * read_at is the ZedToken at which the relationship was found.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + * @return The readAt. + */ + com.authzed.api.v1.ZedToken getReadAt(); + /** + *
+   * read_at is the ZedToken at which the relationship was found.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 1 [json_name = "readAt", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder(); + + /** + *
+   * relationship is the found relationship.
+   * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return Whether the relationship field is set. + */ + boolean hasRelationship(); + /** + *
+   * relationship is the found relationship.
+   * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return The relationship. + */ + com.authzed.api.v1.Relationship getRelationship(); + /** + *
+   * relationship is the found relationship.
+   * 
+ * + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + com.authzed.api.v1.RelationshipOrBuilder getRelationshipOrBuilder(); + + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + * @return Whether the afterResultCursor field is set. + */ + boolean hasAfterResultCursor(); + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + * @return The afterResultCursor. + */ + com.authzed.api.v1.Cursor getAfterResultCursor(); + /** + *
+   * after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+   * result.
+   * 
+ * + * .authzed.api.v1.Cursor after_result_cursor = 3 [json_name = "afterResultCursor"]; + */ + com.authzed.api.v1.CursorOrBuilder getAfterResultCursorOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ReadSchemaRequest.java b/generated/com/authzed/api/v1/ReadSchemaRequest.java new file mode 100644 index 00000000..84f7651d --- /dev/null +++ b/generated/com/authzed/api/v1/ReadSchemaRequest.java @@ -0,0 +1,409 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/schema_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ReadSchemaRequest returns the schema from the database.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ReadSchemaRequest} + */ +public final class ReadSchemaRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ReadSchemaRequest) + ReadSchemaRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReadSchemaRequest.newBuilder() to construct. + private ReadSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReadSchemaRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReadSchemaRequest(); + } + + @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.SchemaServiceOuterClass.internal_static_authzed_api_v1_ReadSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_ReadSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ReadSchemaRequest.class, com.authzed.api.v1.ReadSchemaRequest.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.ReadSchemaRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.ReadSchemaRequest other = (com.authzed.api.v1.ReadSchemaRequest) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ReadSchemaRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadSchemaRequest 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.ReadSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadSchemaRequest 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.ReadSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadSchemaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ReadSchemaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadSchemaRequest 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.ReadSchemaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadSchemaRequest 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.ReadSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadSchemaRequest 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.ReadSchemaRequest 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; + } + /** + *
+   * ReadSchemaRequest returns the schema from the database.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ReadSchemaRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ReadSchemaRequest) + com.authzed.api.v1.ReadSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_ReadSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_ReadSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ReadSchemaRequest.class, com.authzed.api.v1.ReadSchemaRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.ReadSchemaRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_ReadSchemaRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ReadSchemaRequest getDefaultInstanceForType() { + return com.authzed.api.v1.ReadSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ReadSchemaRequest build() { + com.authzed.api.v1.ReadSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ReadSchemaRequest buildPartial() { + com.authzed.api.v1.ReadSchemaRequest result = new com.authzed.api.v1.ReadSchemaRequest(this); + onBuilt(); + return result; + } + + @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.ReadSchemaRequest) { + return mergeFrom((com.authzed.api.v1.ReadSchemaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ReadSchemaRequest other) { + if (other == com.authzed.api.v1.ReadSchemaRequest.getDefaultInstance()) return this; + 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; + 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; + } + @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.ReadSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ReadSchemaRequest) + private static final com.authzed.api.v1.ReadSchemaRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ReadSchemaRequest(); + } + + public static com.authzed.api.v1.ReadSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadSchemaRequest 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.ReadSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ReadSchemaRequestOrBuilder.java b/generated/com/authzed/api/v1/ReadSchemaRequestOrBuilder.java new file mode 100644 index 00000000..d52c67c1 --- /dev/null +++ b/generated/com/authzed/api/v1/ReadSchemaRequestOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/schema_service.proto + +package com.authzed.api.v1; + +public interface ReadSchemaRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ReadSchemaRequest) + com.google.protobuf.MessageOrBuilder { +} diff --git a/generated/com/authzed/api/v1/ReadSchemaResponse.java b/generated/com/authzed/api/v1/ReadSchemaResponse.java new file mode 100644 index 00000000..3b9f1953 --- /dev/null +++ b/generated/com/authzed/api/v1/ReadSchemaResponse.java @@ -0,0 +1,811 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/schema_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ReadSchemaResponse is the resulting data after having read the Object
+ * Definitions from a Schema.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ReadSchemaResponse} + */ +public final class ReadSchemaResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ReadSchemaResponse) + ReadSchemaResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReadSchemaResponse.newBuilder() to construct. + private ReadSchemaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReadSchemaResponse() { + schemaText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReadSchemaResponse(); + } + + @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.SchemaServiceOuterClass.internal_static_authzed_api_v1_ReadSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_ReadSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ReadSchemaResponse.class, com.authzed.api.v1.ReadSchemaResponse.Builder.class); + } + + public static final int SCHEMA_TEXT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object schemaText_ = ""; + /** + *
+   * schema_text is the textual form of the current schema in the system
+   * 
+ * + * string schema_text = 1 [json_name = "schemaText"]; + * @return The schemaText. + */ + @java.lang.Override + public java.lang.String getSchemaText() { + java.lang.Object ref = schemaText_; + 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(); + schemaText_ = s; + return s; + } + } + /** + *
+   * schema_text is the textual form of the current schema in the system
+   * 
+ * + * string schema_text = 1 [json_name = "schemaText"]; + * @return The bytes for schemaText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemaTextBytes() { + java.lang.Object ref = schemaText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_AT_FIELD_NUMBER = 2; + private com.authzed.api.v1.ZedToken readAt_; + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return Whether the readAt field is set. + */ + @java.lang.Override + public boolean hasReadAt() { + return readAt_ != null; + } + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return The readAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getReadAt() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + + 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(schemaText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schemaText_); + } + if (readAt_ != null) { + output.writeMessage(2, getReadAt()); + } + 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(schemaText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schemaText_); + } + if (readAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReadAt()); + } + 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.ReadSchemaResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.ReadSchemaResponse other = (com.authzed.api.v1.ReadSchemaResponse) obj; + + if (!getSchemaText() + .equals(other.getSchemaText())) return false; + if (hasReadAt() != other.hasReadAt()) return false; + if (hasReadAt()) { + if (!getReadAt() + .equals(other.getReadAt())) 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) + SCHEMA_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getSchemaText().hashCode(); + if (hasReadAt()) { + hash = (37 * hash) + READ_AT_FIELD_NUMBER; + hash = (53 * hash) + getReadAt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ReadSchemaResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadSchemaResponse 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.ReadSchemaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadSchemaResponse 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.ReadSchemaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ReadSchemaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ReadSchemaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadSchemaResponse 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.ReadSchemaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadSchemaResponse 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.ReadSchemaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ReadSchemaResponse 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.ReadSchemaResponse 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; + } + /** + *
+   * ReadSchemaResponse is the resulting data after having read the Object
+   * Definitions from a Schema.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ReadSchemaResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ReadSchemaResponse) + com.authzed.api.v1.ReadSchemaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_ReadSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_ReadSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ReadSchemaResponse.class, com.authzed.api.v1.ReadSchemaResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.ReadSchemaResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schemaText_ = ""; + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_ReadSchemaResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ReadSchemaResponse getDefaultInstanceForType() { + return com.authzed.api.v1.ReadSchemaResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ReadSchemaResponse build() { + com.authzed.api.v1.ReadSchemaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ReadSchemaResponse buildPartial() { + com.authzed.api.v1.ReadSchemaResponse result = new com.authzed.api.v1.ReadSchemaResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ReadSchemaResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schemaText_ = schemaText_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.readAt_ = readAtBuilder_ == null + ? readAt_ + : readAtBuilder_.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.ReadSchemaResponse) { + return mergeFrom((com.authzed.api.v1.ReadSchemaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ReadSchemaResponse other) { + if (other == com.authzed.api.v1.ReadSchemaResponse.getDefaultInstance()) return this; + if (!other.getSchemaText().isEmpty()) { + schemaText_ = other.schemaText_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasReadAt()) { + mergeReadAt(other.getReadAt()); + } + 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: { + schemaText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getReadAtFieldBuilder().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 schemaText_ = ""; + /** + *
+     * schema_text is the textual form of the current schema in the system
+     * 
+ * + * string schema_text = 1 [json_name = "schemaText"]; + * @return The schemaText. + */ + public java.lang.String getSchemaText() { + java.lang.Object ref = schemaText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * schema_text is the textual form of the current schema in the system
+     * 
+ * + * string schema_text = 1 [json_name = "schemaText"]; + * @return The bytes for schemaText. + */ + public com.google.protobuf.ByteString + getSchemaTextBytes() { + java.lang.Object ref = schemaText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * schema_text is the textual form of the current schema in the system
+     * 
+ * + * string schema_text = 1 [json_name = "schemaText"]; + * @param value The schemaText to set. + * @return This builder for chaining. + */ + public Builder setSchemaText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schemaText_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * schema_text is the textual form of the current schema in the system
+     * 
+ * + * string schema_text = 1 [json_name = "schemaText"]; + * @return This builder for chaining. + */ + public Builder clearSchemaText() { + schemaText_ = getDefaultInstance().getSchemaText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * schema_text is the textual form of the current schema in the system
+     * 
+ * + * string schema_text = 1 [json_name = "schemaText"]; + * @param value The bytes for schemaText to set. + * @return This builder for chaining. + */ + public Builder setSchemaTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schemaText_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.authzed.api.v1.ZedToken readAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> readAtBuilder_; + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return Whether the readAt field is set. + */ + public boolean hasReadAt() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return The readAt. + */ + public com.authzed.api.v1.ZedToken getReadAt() { + if (readAtBuilder_ == null) { + return readAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } else { + return readAtBuilder_.getMessage(); + } + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder setReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readAt_ = value; + } else { + readAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder setReadAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (readAtBuilder_ == null) { + readAt_ = builderForValue.build(); + } else { + readAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder mergeReadAt(com.authzed.api.v1.ZedToken value) { + if (readAtBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + readAt_ != null && + readAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getReadAtBuilder().mergeFrom(value); + } else { + readAt_ = value; + } + } else { + readAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public Builder clearReadAt() { + bitField0_ = (bitField0_ & ~0x00000002); + readAt_ = null; + if (readAtBuilder_ != null) { + readAtBuilder_.dispose(); + readAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedToken.Builder getReadAtBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getReadAtFieldBuilder().getBuilder(); + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder() { + if (readAtBuilder_ != null) { + return readAtBuilder_.getMessageOrBuilder(); + } else { + return readAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : readAt_; + } + } + /** + *
+     * read_at is the ZedToken at which the schema was read.
+     * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getReadAtFieldBuilder() { + if (readAtBuilder_ == null) { + readAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getReadAt(), + getParentForChildren(), + isClean()); + readAt_ = null; + } + return readAtBuilder_; + } + @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.ReadSchemaResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ReadSchemaResponse) + private static final com.authzed.api.v1.ReadSchemaResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ReadSchemaResponse(); + } + + public static com.authzed.api.v1.ReadSchemaResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadSchemaResponse 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.ReadSchemaResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ReadSchemaResponseOrBuilder.java b/generated/com/authzed/api/v1/ReadSchemaResponseOrBuilder.java new file mode 100644 index 00000000..02ecee15 --- /dev/null +++ b/generated/com/authzed/api/v1/ReadSchemaResponseOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/schema_service.proto + +package com.authzed.api.v1; + +public interface ReadSchemaResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ReadSchemaResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * schema_text is the textual form of the current schema in the system
+   * 
+ * + * string schema_text = 1 [json_name = "schemaText"]; + * @return The schemaText. + */ + java.lang.String getSchemaText(); + /** + *
+   * schema_text is the textual form of the current schema in the system
+   * 
+ * + * string schema_text = 1 [json_name = "schemaText"]; + * @return The bytes for schemaText. + */ + com.google.protobuf.ByteString + getSchemaTextBytes(); + + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return Whether the readAt field is set. + */ + boolean hasReadAt(); + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + * @return The readAt. + */ + com.authzed.api.v1.ZedToken getReadAt(); + /** + *
+   * read_at is the ZedToken at which the schema was read.
+   * 
+ * + * .authzed.api.v1.ZedToken read_at = 2 [json_name = "readAt", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ZedTokenOrBuilder getReadAtOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/Relationship.java b/generated/com/authzed/api/v1/Relationship.java new file mode 100644 index 00000000..80f045ef --- /dev/null +++ b/generated/com/authzed/api/v1/Relationship.java @@ -0,0 +1,1271 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * 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 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.Relationship.class, com.authzed.api.v1.Relationship.Builder.class); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private com.authzed.api.v1.ObjectReference resource_; + /** + *
+   * resource is the resource to which the subject is related, in some manner
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.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 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getResource() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + /** + *
+   * resource is the resource to which the subject is related, in some manner
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + return resource_ == null ? com.authzed.api.v1.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 [json_name = "relation", (.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 [json_name = "relation", (.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.SubjectReference subject_; + /** + *
+   * subject is the subject to which the resource is related, in some manner.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.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 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReference getSubject() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + /** + *
+   * subject is the subject to which the resource is related, in some manner.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + + public static final int OPTIONAL_CAVEAT_FIELD_NUMBER = 4; + private com.authzed.api.v1.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 [json_name = "optionalCaveat", (.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + * @return The optionalCaveat. + */ + @java.lang.Override + public com.authzed.api.v1.ContextualizedCaveat getOptionalCaveat() { + return optionalCaveat_ == null ? com.authzed.api.v1.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ContextualizedCaveatOrBuilder getOptionalCaveatOrBuilder() { + return optionalCaveat_ == null ? com.authzed.api.v1.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.Relationship)) { + return super.equals(obj); + } + com.authzed.api.v1.Relationship other = (com.authzed.api.v1.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.Relationship parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.Relationship parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.Relationship parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.Relationship parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.Relationship parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.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.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.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.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.Relationship.class, com.authzed.api.v1.Relationship.Builder.class); + } + + // Construct using com.authzed.api.v1.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.Relationship getDefaultInstanceForType() { + return com.authzed.api.v1.Relationship.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.Relationship build() { + com.authzed.api.v1.Relationship result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.Relationship buildPartial() { + com.authzed.api.v1.Relationship result = new com.authzed.api.v1.Relationship(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.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.Relationship) { + return mergeFrom((com.authzed.api.v1.Relationship)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.Relationship other) { + if (other == com.authzed.api.v1.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.ObjectReference resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> resourceBuilder_; + /** + *
+     * resource is the resource to which the subject is related, in some manner
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.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 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + public com.authzed.api.v1.ObjectReference getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.authzed.api.v1.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 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource(com.authzed.api.v1.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 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder setResource( + com.authzed.api.v1.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 [json_name = "resource", (.validate.rules) = { ... } + */ + public Builder mergeResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + resource_ != null && + resource_ != com.authzed.api.v1.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 [json_name = "resource", (.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 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.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 [json_name = "resource", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + } + /** + *
+     * resource is the resource to which the subject is related, in some manner
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.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 [json_name = "relation", (.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 [json_name = "relation", (.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 [json_name = "relation", (.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 [json_name = "relation", (.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 [json_name = "relation", (.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.SubjectReference subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> subjectBuilder_; + /** + *
+     * subject is the subject to which the resource is related, in some manner.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.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 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + public com.authzed.api.v1.SubjectReference getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null ? com.authzed.api.v1.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 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject(com.authzed.api.v1.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 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder setSubject( + com.authzed.api.v1.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 [json_name = "subject", (.validate.rules) = { ... } + */ + public Builder mergeSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + subject_ != null && + subject_ != com.authzed.api.v1.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 [json_name = "subject", (.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 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.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 [json_name = "subject", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null ? + com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + } + /** + *
+     * subject is the subject to which the resource is related, in some manner.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder>( + getSubject(), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + private com.authzed.api.v1.ContextualizedCaveat optionalCaveat_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ContextualizedCaveat, com.authzed.api.v1.ContextualizedCaveat.Builder, com.authzed.api.v1.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 [json_name = "optionalCaveat", (.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + * @return The optionalCaveat. + */ + public com.authzed.api.v1.ContextualizedCaveat getOptionalCaveat() { + if (optionalCaveatBuilder_ == null) { + return optionalCaveat_ == null ? com.authzed.api.v1.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + */ + public Builder setOptionalCaveat(com.authzed.api.v1.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + */ + public Builder setOptionalCaveat( + com.authzed.api.v1.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + */ + public Builder mergeOptionalCaveat(com.authzed.api.v1.ContextualizedCaveat value) { + if (optionalCaveatBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + optionalCaveat_ != null && + optionalCaveat_ != com.authzed.api.v1.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 [json_name = "optionalCaveat", (.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ContextualizedCaveatOrBuilder getOptionalCaveatOrBuilder() { + if (optionalCaveatBuilder_ != null) { + return optionalCaveatBuilder_.getMessageOrBuilder(); + } else { + return optionalCaveat_ == null ? + com.authzed.api.v1.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ContextualizedCaveat, com.authzed.api.v1.ContextualizedCaveat.Builder, com.authzed.api.v1.ContextualizedCaveatOrBuilder> + getOptionalCaveatFieldBuilder() { + if (optionalCaveatBuilder_ == null) { + optionalCaveatBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ContextualizedCaveat, com.authzed.api.v1.ContextualizedCaveat.Builder, com.authzed.api.v1.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.Relationship DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.Relationship(); + } + + public static com.authzed.api.v1.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.Relationship getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/RelationshipFilter.java b/generated/com/authzed/api/v1/RelationshipFilter.java new file mode 100644 index 00000000..42c210e0 --- /dev/null +++ b/generated/com/authzed/api/v1/RelationshipFilter.java @@ -0,0 +1,1334 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * RelationshipFilter is a collection of filters which when applied to a
+ * relationship will return relationships that have exactly matching fields.
+ * All fields are optional and if left unspecified will not filter relationships,
+ * but at least one field must be specified.
+ * NOTE: The performance of the API will be affected by the selection of fields
+ * on which to filter. If a field is not indexed, the performance of the API
+ * can be significantly slower.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.RelationshipFilter} + */ +public final class RelationshipFilter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.RelationshipFilter) + RelationshipFilterOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelationshipFilter.newBuilder() to construct. + private RelationshipFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelationshipFilter() { + resourceType_ = ""; + optionalResourceId_ = ""; + optionalResourceIdPrefix_ = ""; + optionalRelation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelationshipFilter(); + } + + @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.PermissionService.internal_static_authzed_api_v1_RelationshipFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_RelationshipFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.RelationshipFilter.class, com.authzed.api.v1.RelationshipFilter.Builder.class); + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + /** + *
+   * resource_type is the *optional* resource type of the relationship.
+   * NOTE: It is not prefixed with "optional_" for legacy compatibility.
+   * 
+ * + * string resource_type = 1 [json_name = "resourceType", (.validate.rules) = { ... } + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + /** + *
+   * resource_type is the *optional* resource type of the relationship.
+   * NOTE: It is not prefixed with "optional_" for legacy compatibility.
+   * 
+ * + * string resource_type = 1 [json_name = "resourceType", (.validate.rules) = { ... } + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_RESOURCE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalResourceId_ = ""; + /** + *
+   * optional_resource_id is the *optional* resource ID of the relationship.
+   * If specified, optional_resource_id_prefix cannot be specified.
+   * 
+ * + * string optional_resource_id = 2 [json_name = "optionalResourceId", (.validate.rules) = { ... } + * @return The optionalResourceId. + */ + @java.lang.Override + public java.lang.String getOptionalResourceId() { + java.lang.Object ref = optionalResourceId_; + 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(); + optionalResourceId_ = s; + return s; + } + } + /** + *
+   * optional_resource_id is the *optional* resource ID of the relationship.
+   * If specified, optional_resource_id_prefix cannot be specified.
+   * 
+ * + * string optional_resource_id = 2 [json_name = "optionalResourceId", (.validate.rules) = { ... } + * @return The bytes for optionalResourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalResourceIdBytes() { + java.lang.Object ref = optionalResourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_RESOURCE_ID_PREFIX_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalResourceIdPrefix_ = ""; + /** + *
+   * optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
+   * If specified, optional_resource_id cannot be specified.
+   * 
+ * + * string optional_resource_id_prefix = 5 [json_name = "optionalResourceIdPrefix", (.validate.rules) = { ... } + * @return The optionalResourceIdPrefix. + */ + @java.lang.Override + public java.lang.String getOptionalResourceIdPrefix() { + java.lang.Object ref = optionalResourceIdPrefix_; + 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(); + optionalResourceIdPrefix_ = s; + return s; + } + } + /** + *
+   * optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
+   * If specified, optional_resource_id cannot be specified.
+   * 
+ * + * string optional_resource_id_prefix = 5 [json_name = "optionalResourceIdPrefix", (.validate.rules) = { ... } + * @return The bytes for optionalResourceIdPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalResourceIdPrefixBytes() { + java.lang.Object ref = optionalResourceIdPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalResourceIdPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_RELATION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalRelation_ = ""; + /** + *
+   * relation is the *optional* relation of the relationship.
+   * 
+ * + * string optional_relation = 3 [json_name = "optionalRelation", (.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; + } + } + /** + *
+   * relation is the *optional* relation of the relationship.
+   * 
+ * + * string optional_relation = 3 [json_name = "optionalRelation", (.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; + } + } + + public static final int OPTIONAL_SUBJECT_FILTER_FIELD_NUMBER = 4; + private com.authzed.api.v1.SubjectFilter optionalSubjectFilter_; + /** + *
+   * optional_subject_filter is the optional filter for the subjects of the relationships.
+   * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + * @return Whether the optionalSubjectFilter field is set. + */ + @java.lang.Override + public boolean hasOptionalSubjectFilter() { + return optionalSubjectFilter_ != null; + } + /** + *
+   * optional_subject_filter is the optional filter for the subjects of the relationships.
+   * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + * @return The optionalSubjectFilter. + */ + @java.lang.Override + public com.authzed.api.v1.SubjectFilter getOptionalSubjectFilter() { + return optionalSubjectFilter_ == null ? com.authzed.api.v1.SubjectFilter.getDefaultInstance() : optionalSubjectFilter_; + } + /** + *
+   * optional_subject_filter is the optional filter for the subjects of the relationships.
+   * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + */ + @java.lang.Override + public com.authzed.api.v1.SubjectFilterOrBuilder getOptionalSubjectFilterOrBuilder() { + return optionalSubjectFilter_ == null ? com.authzed.api.v1.SubjectFilter.getDefaultInstance() : optionalSubjectFilter_; + } + + 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(resourceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalResourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, optionalResourceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalRelation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, optionalRelation_); + } + if (optionalSubjectFilter_ != null) { + output.writeMessage(4, getOptionalSubjectFilter()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalResourceIdPrefix_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, optionalResourceIdPrefix_); + } + 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(resourceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalResourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, optionalResourceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalRelation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, optionalRelation_); + } + if (optionalSubjectFilter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOptionalSubjectFilter()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalResourceIdPrefix_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, optionalResourceIdPrefix_); + } + 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.RelationshipFilter)) { + return super.equals(obj); + } + com.authzed.api.v1.RelationshipFilter other = (com.authzed.api.v1.RelationshipFilter) obj; + + if (!getResourceType() + .equals(other.getResourceType())) return false; + if (!getOptionalResourceId() + .equals(other.getOptionalResourceId())) return false; + if (!getOptionalResourceIdPrefix() + .equals(other.getOptionalResourceIdPrefix())) return false; + if (!getOptionalRelation() + .equals(other.getOptionalRelation())) return false; + if (hasOptionalSubjectFilter() != other.hasOptionalSubjectFilter()) return false; + if (hasOptionalSubjectFilter()) { + if (!getOptionalSubjectFilter() + .equals(other.getOptionalSubjectFilter())) 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) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().hashCode(); + hash = (37 * hash) + OPTIONAL_RESOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getOptionalResourceId().hashCode(); + hash = (37 * hash) + OPTIONAL_RESOURCE_ID_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getOptionalResourceIdPrefix().hashCode(); + hash = (37 * hash) + OPTIONAL_RELATION_FIELD_NUMBER; + hash = (53 * hash) + getOptionalRelation().hashCode(); + if (hasOptionalSubjectFilter()) { + hash = (37 * hash) + OPTIONAL_SUBJECT_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getOptionalSubjectFilter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.RelationshipFilter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.RelationshipFilter 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.RelationshipFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.RelationshipFilter 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.RelationshipFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.RelationshipFilter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.RelationshipFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.RelationshipFilter 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.RelationshipFilter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.RelationshipFilter 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.RelationshipFilter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.RelationshipFilter 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.RelationshipFilter 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; + } + /** + *
+   * RelationshipFilter is a collection of filters which when applied to a
+   * relationship will return relationships that have exactly matching fields.
+   * All fields are optional and if left unspecified will not filter relationships,
+   * but at least one field must be specified.
+   * NOTE: The performance of the API will be affected by the selection of fields
+   * on which to filter. If a field is not indexed, the performance of the API
+   * can be significantly slower.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.RelationshipFilter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.RelationshipFilter) + com.authzed.api.v1.RelationshipFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_RelationshipFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_RelationshipFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.RelationshipFilter.class, com.authzed.api.v1.RelationshipFilter.Builder.class); + } + + // Construct using com.authzed.api.v1.RelationshipFilter.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceType_ = ""; + optionalResourceId_ = ""; + optionalResourceIdPrefix_ = ""; + optionalRelation_ = ""; + optionalSubjectFilter_ = null; + if (optionalSubjectFilterBuilder_ != null) { + optionalSubjectFilterBuilder_.dispose(); + optionalSubjectFilterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_RelationshipFilter_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.RelationshipFilter getDefaultInstanceForType() { + return com.authzed.api.v1.RelationshipFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.RelationshipFilter build() { + com.authzed.api.v1.RelationshipFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.RelationshipFilter buildPartial() { + com.authzed.api.v1.RelationshipFilter result = new com.authzed.api.v1.RelationshipFilter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.RelationshipFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optionalResourceId_ = optionalResourceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.optionalResourceIdPrefix_ = optionalResourceIdPrefix_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.optionalRelation_ = optionalRelation_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.optionalSubjectFilter_ = optionalSubjectFilterBuilder_ == null + ? optionalSubjectFilter_ + : optionalSubjectFilterBuilder_.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.RelationshipFilter) { + return mergeFrom((com.authzed.api.v1.RelationshipFilter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.RelationshipFilter other) { + if (other == com.authzed.api.v1.RelationshipFilter.getDefaultInstance()) return this; + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOptionalResourceId().isEmpty()) { + optionalResourceId_ = other.optionalResourceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOptionalResourceIdPrefix().isEmpty()) { + optionalResourceIdPrefix_ = other.optionalResourceIdPrefix_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOptionalRelation().isEmpty()) { + optionalRelation_ = other.optionalRelation_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasOptionalSubjectFilter()) { + mergeOptionalSubjectFilter(other.getOptionalSubjectFilter()); + } + 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: { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + optionalResourceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + optionalRelation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: { + input.readMessage( + getOptionalSubjectFilterFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: { + optionalResourceIdPrefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + 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 resourceType_ = ""; + /** + *
+     * resource_type is the *optional* resource type of the relationship.
+     * NOTE: It is not prefixed with "optional_" for legacy compatibility.
+     * 
+ * + * string resource_type = 1 [json_name = "resourceType", (.validate.rules) = { ... } + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * resource_type is the *optional* resource type of the relationship.
+     * NOTE: It is not prefixed with "optional_" for legacy compatibility.
+     * 
+ * + * string resource_type = 1 [json_name = "resourceType", (.validate.rules) = { ... } + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString + getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * resource_type is the *optional* resource type of the relationship.
+     * NOTE: It is not prefixed with "optional_" for legacy compatibility.
+     * 
+ * + * string resource_type = 1 [json_name = "resourceType", (.validate.rules) = { ... } + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * resource_type is the *optional* resource type of the relationship.
+     * NOTE: It is not prefixed with "optional_" for legacy compatibility.
+     * 
+ * + * string resource_type = 1 [json_name = "resourceType", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * resource_type is the *optional* resource type of the relationship.
+     * NOTE: It is not prefixed with "optional_" for legacy compatibility.
+     * 
+ * + * string resource_type = 1 [json_name = "resourceType", (.validate.rules) = { ... } + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object optionalResourceId_ = ""; + /** + *
+     * optional_resource_id is the *optional* resource ID of the relationship.
+     * If specified, optional_resource_id_prefix cannot be specified.
+     * 
+ * + * string optional_resource_id = 2 [json_name = "optionalResourceId", (.validate.rules) = { ... } + * @return The optionalResourceId. + */ + public java.lang.String getOptionalResourceId() { + java.lang.Object ref = optionalResourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalResourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_resource_id is the *optional* resource ID of the relationship.
+     * If specified, optional_resource_id_prefix cannot be specified.
+     * 
+ * + * string optional_resource_id = 2 [json_name = "optionalResourceId", (.validate.rules) = { ... } + * @return The bytes for optionalResourceId. + */ + public com.google.protobuf.ByteString + getOptionalResourceIdBytes() { + java.lang.Object ref = optionalResourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_resource_id is the *optional* resource ID of the relationship.
+     * If specified, optional_resource_id_prefix cannot be specified.
+     * 
+ * + * string optional_resource_id = 2 [json_name = "optionalResourceId", (.validate.rules) = { ... } + * @param value The optionalResourceId to set. + * @return This builder for chaining. + */ + public Builder setOptionalResourceId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalResourceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_resource_id is the *optional* resource ID of the relationship.
+     * If specified, optional_resource_id_prefix cannot be specified.
+     * 
+ * + * string optional_resource_id = 2 [json_name = "optionalResourceId", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalResourceId() { + optionalResourceId_ = getDefaultInstance().getOptionalResourceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * optional_resource_id is the *optional* resource ID of the relationship.
+     * If specified, optional_resource_id_prefix cannot be specified.
+     * 
+ * + * string optional_resource_id = 2 [json_name = "optionalResourceId", (.validate.rules) = { ... } + * @param value The bytes for optionalResourceId to set. + * @return This builder for chaining. + */ + public Builder setOptionalResourceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalResourceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object optionalResourceIdPrefix_ = ""; + /** + *
+     * optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
+     * If specified, optional_resource_id cannot be specified.
+     * 
+ * + * string optional_resource_id_prefix = 5 [json_name = "optionalResourceIdPrefix", (.validate.rules) = { ... } + * @return The optionalResourceIdPrefix. + */ + public java.lang.String getOptionalResourceIdPrefix() { + java.lang.Object ref = optionalResourceIdPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalResourceIdPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
+     * If specified, optional_resource_id cannot be specified.
+     * 
+ * + * string optional_resource_id_prefix = 5 [json_name = "optionalResourceIdPrefix", (.validate.rules) = { ... } + * @return The bytes for optionalResourceIdPrefix. + */ + public com.google.protobuf.ByteString + getOptionalResourceIdPrefixBytes() { + java.lang.Object ref = optionalResourceIdPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalResourceIdPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
+     * If specified, optional_resource_id cannot be specified.
+     * 
+ * + * string optional_resource_id_prefix = 5 [json_name = "optionalResourceIdPrefix", (.validate.rules) = { ... } + * @param value The optionalResourceIdPrefix to set. + * @return This builder for chaining. + */ + public Builder setOptionalResourceIdPrefix( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalResourceIdPrefix_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
+     * If specified, optional_resource_id cannot be specified.
+     * 
+ * + * string optional_resource_id_prefix = 5 [json_name = "optionalResourceIdPrefix", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalResourceIdPrefix() { + optionalResourceIdPrefix_ = getDefaultInstance().getOptionalResourceIdPrefix(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
+     * If specified, optional_resource_id cannot be specified.
+     * 
+ * + * string optional_resource_id_prefix = 5 [json_name = "optionalResourceIdPrefix", (.validate.rules) = { ... } + * @param value The bytes for optionalResourceIdPrefix to set. + * @return This builder for chaining. + */ + public Builder setOptionalResourceIdPrefixBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalResourceIdPrefix_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object optionalRelation_ = ""; + /** + *
+     * relation is the *optional* relation of the relationship.
+     * 
+ * + * string optional_relation = 3 [json_name = "optionalRelation", (.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; + } + } + /** + *
+     * relation is the *optional* relation of the relationship.
+     * 
+ * + * string optional_relation = 3 [json_name = "optionalRelation", (.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; + } + } + /** + *
+     * relation is the *optional* relation of the relationship.
+     * 
+ * + * string optional_relation = 3 [json_name = "optionalRelation", (.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * relation is the *optional* relation of the relationship.
+     * 
+ * + * string optional_relation = 3 [json_name = "optionalRelation", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalRelation() { + optionalRelation_ = getDefaultInstance().getOptionalRelation(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * relation is the *optional* relation of the relationship.
+     * 
+ * + * string optional_relation = 3 [json_name = "optionalRelation", (.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_ |= 0x00000008; + onChanged(); + return this; + } + + private com.authzed.api.v1.SubjectFilter optionalSubjectFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectFilter, com.authzed.api.v1.SubjectFilter.Builder, com.authzed.api.v1.SubjectFilterOrBuilder> optionalSubjectFilterBuilder_; + /** + *
+     * optional_subject_filter is the optional filter for the subjects of the relationships.
+     * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + * @return Whether the optionalSubjectFilter field is set. + */ + public boolean hasOptionalSubjectFilter() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * optional_subject_filter is the optional filter for the subjects of the relationships.
+     * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + * @return The optionalSubjectFilter. + */ + public com.authzed.api.v1.SubjectFilter getOptionalSubjectFilter() { + if (optionalSubjectFilterBuilder_ == null) { + return optionalSubjectFilter_ == null ? com.authzed.api.v1.SubjectFilter.getDefaultInstance() : optionalSubjectFilter_; + } else { + return optionalSubjectFilterBuilder_.getMessage(); + } + } + /** + *
+     * optional_subject_filter is the optional filter for the subjects of the relationships.
+     * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + */ + public Builder setOptionalSubjectFilter(com.authzed.api.v1.SubjectFilter value) { + if (optionalSubjectFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalSubjectFilter_ = value; + } else { + optionalSubjectFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * optional_subject_filter is the optional filter for the subjects of the relationships.
+     * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + */ + public Builder setOptionalSubjectFilter( + com.authzed.api.v1.SubjectFilter.Builder builderForValue) { + if (optionalSubjectFilterBuilder_ == null) { + optionalSubjectFilter_ = builderForValue.build(); + } else { + optionalSubjectFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * optional_subject_filter is the optional filter for the subjects of the relationships.
+     * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + */ + public Builder mergeOptionalSubjectFilter(com.authzed.api.v1.SubjectFilter value) { + if (optionalSubjectFilterBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + optionalSubjectFilter_ != null && + optionalSubjectFilter_ != com.authzed.api.v1.SubjectFilter.getDefaultInstance()) { + getOptionalSubjectFilterBuilder().mergeFrom(value); + } else { + optionalSubjectFilter_ = value; + } + } else { + optionalSubjectFilterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * optional_subject_filter is the optional filter for the subjects of the relationships.
+     * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + */ + public Builder clearOptionalSubjectFilter() { + bitField0_ = (bitField0_ & ~0x00000010); + optionalSubjectFilter_ = null; + if (optionalSubjectFilterBuilder_ != null) { + optionalSubjectFilterBuilder_.dispose(); + optionalSubjectFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_subject_filter is the optional filter for the subjects of the relationships.
+     * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + */ + public com.authzed.api.v1.SubjectFilter.Builder getOptionalSubjectFilterBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getOptionalSubjectFilterFieldBuilder().getBuilder(); + } + /** + *
+     * optional_subject_filter is the optional filter for the subjects of the relationships.
+     * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + */ + public com.authzed.api.v1.SubjectFilterOrBuilder getOptionalSubjectFilterOrBuilder() { + if (optionalSubjectFilterBuilder_ != null) { + return optionalSubjectFilterBuilder_.getMessageOrBuilder(); + } else { + return optionalSubjectFilter_ == null ? + com.authzed.api.v1.SubjectFilter.getDefaultInstance() : optionalSubjectFilter_; + } + } + /** + *
+     * optional_subject_filter is the optional filter for the subjects of the relationships.
+     * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectFilter, com.authzed.api.v1.SubjectFilter.Builder, com.authzed.api.v1.SubjectFilterOrBuilder> + getOptionalSubjectFilterFieldBuilder() { + if (optionalSubjectFilterBuilder_ == null) { + optionalSubjectFilterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectFilter, com.authzed.api.v1.SubjectFilter.Builder, com.authzed.api.v1.SubjectFilterOrBuilder>( + getOptionalSubjectFilter(), + getParentForChildren(), + isClean()); + optionalSubjectFilter_ = null; + } + return optionalSubjectFilterBuilder_; + } + @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.RelationshipFilter) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.RelationshipFilter) + private static final com.authzed.api.v1.RelationshipFilter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.RelationshipFilter(); + } + + public static com.authzed.api.v1.RelationshipFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelationshipFilter 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.RelationshipFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/RelationshipFilterOrBuilder.java b/generated/com/authzed/api/v1/RelationshipFilterOrBuilder.java new file mode 100644 index 00000000..e5dbe6d3 --- /dev/null +++ b/generated/com/authzed/api/v1/RelationshipFilterOrBuilder.java @@ -0,0 +1,122 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface RelationshipFilterOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.RelationshipFilter) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * resource_type is the *optional* resource type of the relationship.
+   * NOTE: It is not prefixed with "optional_" for legacy compatibility.
+   * 
+ * + * string resource_type = 1 [json_name = "resourceType", (.validate.rules) = { ... } + * @return The resourceType. + */ + java.lang.String getResourceType(); + /** + *
+   * resource_type is the *optional* resource type of the relationship.
+   * NOTE: It is not prefixed with "optional_" for legacy compatibility.
+   * 
+ * + * string resource_type = 1 [json_name = "resourceType", (.validate.rules) = { ... } + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString + getResourceTypeBytes(); + + /** + *
+   * optional_resource_id is the *optional* resource ID of the relationship.
+   * If specified, optional_resource_id_prefix cannot be specified.
+   * 
+ * + * string optional_resource_id = 2 [json_name = "optionalResourceId", (.validate.rules) = { ... } + * @return The optionalResourceId. + */ + java.lang.String getOptionalResourceId(); + /** + *
+   * optional_resource_id is the *optional* resource ID of the relationship.
+   * If specified, optional_resource_id_prefix cannot be specified.
+   * 
+ * + * string optional_resource_id = 2 [json_name = "optionalResourceId", (.validate.rules) = { ... } + * @return The bytes for optionalResourceId. + */ + com.google.protobuf.ByteString + getOptionalResourceIdBytes(); + + /** + *
+   * optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
+   * If specified, optional_resource_id cannot be specified.
+   * 
+ * + * string optional_resource_id_prefix = 5 [json_name = "optionalResourceIdPrefix", (.validate.rules) = { ... } + * @return The optionalResourceIdPrefix. + */ + java.lang.String getOptionalResourceIdPrefix(); + /** + *
+   * optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
+   * If specified, optional_resource_id cannot be specified.
+   * 
+ * + * string optional_resource_id_prefix = 5 [json_name = "optionalResourceIdPrefix", (.validate.rules) = { ... } + * @return The bytes for optionalResourceIdPrefix. + */ + com.google.protobuf.ByteString + getOptionalResourceIdPrefixBytes(); + + /** + *
+   * relation is the *optional* relation of the relationship.
+   * 
+ * + * string optional_relation = 3 [json_name = "optionalRelation", (.validate.rules) = { ... } + * @return The optionalRelation. + */ + java.lang.String getOptionalRelation(); + /** + *
+   * relation is the *optional* relation of the relationship.
+   * 
+ * + * string optional_relation = 3 [json_name = "optionalRelation", (.validate.rules) = { ... } + * @return The bytes for optionalRelation. + */ + com.google.protobuf.ByteString + getOptionalRelationBytes(); + + /** + *
+   * optional_subject_filter is the optional filter for the subjects of the relationships.
+   * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + * @return Whether the optionalSubjectFilter field is set. + */ + boolean hasOptionalSubjectFilter(); + /** + *
+   * optional_subject_filter is the optional filter for the subjects of the relationships.
+   * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + * @return The optionalSubjectFilter. + */ + com.authzed.api.v1.SubjectFilter getOptionalSubjectFilter(); + /** + *
+   * optional_subject_filter is the optional filter for the subjects of the relationships.
+   * 
+ * + * .authzed.api.v1.SubjectFilter optional_subject_filter = 4 [json_name = "optionalSubjectFilter"]; + */ + com.authzed.api.v1.SubjectFilterOrBuilder getOptionalSubjectFilterOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/RelationshipOrBuilder.java b/generated/com/authzed/api/v1/RelationshipOrBuilder.java new file mode 100644 index 00000000..cb04d8da --- /dev/null +++ b/generated/com/authzed/api/v1/RelationshipOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +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 [json_name = "resource", (.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 [json_name = "resource", (.validate.rules) = { ... } + * @return The resource. + */ + com.authzed.api.v1.ObjectReference getResource(); + /** + *
+   * resource is the resource to which the subject is related, in some manner
+   * 
+ * + * .authzed.api.v1.ObjectReference resource = 1 [json_name = "resource", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder(); + + /** + *
+   * relation is how the resource and subject are related.
+   * 
+ * + * string relation = 2 [json_name = "relation", (.validate.rules) = { ... } + * @return The relation. + */ + java.lang.String getRelation(); + /** + *
+   * relation is how the resource and subject are related.
+   * 
+ * + * string relation = 2 [json_name = "relation", (.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 [json_name = "subject", (.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 [json_name = "subject", (.validate.rules) = { ... } + * @return The subject. + */ + com.authzed.api.v1.SubjectReference getSubject(); + /** + *
+   * subject is the subject to which the resource is related, in some manner.
+   * 
+ * + * .authzed.api.v1.SubjectReference subject = 3 [json_name = "subject", (.validate.rules) = { ... } + */ + com.authzed.api.v1.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 [json_name = "optionalCaveat", (.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + * @return The optionalCaveat. + */ + com.authzed.api.v1.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 [json_name = "optionalCaveat", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ContextualizedCaveatOrBuilder getOptionalCaveatOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/RelationshipUpdate.java b/generated/com/authzed/api/v1/RelationshipUpdate.java new file mode 100644 index 00000000..9b7aee67 --- /dev/null +++ b/generated/com/authzed/api/v1/RelationshipUpdate.java @@ -0,0 +1,831 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * 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 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.RelationshipUpdate.class, com.authzed.api.v1.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.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 [json_name = "operation", (.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 [json_name = "operation", (.validate.rules) = { ... } + * @return The operation. + */ + @java.lang.Override public com.authzed.api.v1.RelationshipUpdate.Operation getOperation() { + com.authzed.api.v1.RelationshipUpdate.Operation result = com.authzed.api.v1.RelationshipUpdate.Operation.forNumber(operation_); + return result == null ? com.authzed.api.v1.RelationshipUpdate.Operation.UNRECOGNIZED : result; + } + + public static final int RELATIONSHIP_FIELD_NUMBER = 2; + private com.authzed.api.v1.Relationship relationship_; + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return Whether the relationship field is set. + */ + @java.lang.Override + public boolean hasRelationship() { + return relationship_ != null; + } + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return The relationship. + */ + @java.lang.Override + public com.authzed.api.v1.Relationship getRelationship() { + return relationship_ == null ? com.authzed.api.v1.Relationship.getDefaultInstance() : relationship_; + } + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipOrBuilder getRelationshipOrBuilder() { + return relationship_ == null ? com.authzed.api.v1.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.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.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.RelationshipUpdate)) { + return super.equals(obj); + } + com.authzed.api.v1.RelationshipUpdate other = (com.authzed.api.v1.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.RelationshipUpdate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.RelationshipUpdate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.RelationshipUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.RelationshipUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.RelationshipUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.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.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.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.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.RelationshipUpdate.class, com.authzed.api.v1.RelationshipUpdate.Builder.class); + } + + // Construct using com.authzed.api.v1.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.RelationshipUpdate getDefaultInstanceForType() { + return com.authzed.api.v1.RelationshipUpdate.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.RelationshipUpdate build() { + com.authzed.api.v1.RelationshipUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.RelationshipUpdate buildPartial() { + com.authzed.api.v1.RelationshipUpdate result = new com.authzed.api.v1.RelationshipUpdate(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.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.RelationshipUpdate) { + return mergeFrom((com.authzed.api.v1.RelationshipUpdate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.RelationshipUpdate other) { + if (other == com.authzed.api.v1.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 [json_name = "operation", (.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 [json_name = "operation", (.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 [json_name = "operation", (.validate.rules) = { ... } + * @return The operation. + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipUpdate.Operation getOperation() { + com.authzed.api.v1.RelationshipUpdate.Operation result = com.authzed.api.v1.RelationshipUpdate.Operation.forNumber(operation_); + return result == null ? com.authzed.api.v1.RelationshipUpdate.Operation.UNRECOGNIZED : result; + } + /** + * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation(com.authzed.api.v1.RelationshipUpdate.Operation value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + operation_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOperation() { + bitField0_ = (bitField0_ & ~0x00000001); + operation_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.Relationship relationship_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder> relationshipBuilder_; + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return Whether the relationship field is set. + */ + public boolean hasRelationship() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return The relationship. + */ + public com.authzed.api.v1.Relationship getRelationship() { + if (relationshipBuilder_ == null) { + return relationship_ == null ? com.authzed.api.v1.Relationship.getDefaultInstance() : relationship_; + } else { + return relationshipBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + public Builder setRelationship(com.authzed.api.v1.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 [json_name = "relationship", (.validate.rules) = { ... } + */ + public Builder setRelationship( + com.authzed.api.v1.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 [json_name = "relationship", (.validate.rules) = { ... } + */ + public Builder mergeRelationship(com.authzed.api.v1.Relationship value) { + if (relationshipBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + relationship_ != null && + relationship_ != com.authzed.api.v1.Relationship.getDefaultInstance()) { + getRelationshipBuilder().mergeFrom(value); + } else { + relationship_ = value; + } + } else { + relationshipBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.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 [json_name = "relationship", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Relationship.Builder getRelationshipBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRelationshipFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipOrBuilder getRelationshipOrBuilder() { + if (relationshipBuilder_ != null) { + return relationshipBuilder_.getMessageOrBuilder(); + } else { + return relationship_ == null ? + com.authzed.api.v1.Relationship.getDefaultInstance() : relationship_; + } + } + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.RelationshipOrBuilder> + getRelationshipFieldBuilder() { + if (relationshipBuilder_ == null) { + relationshipBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.Relationship, com.authzed.api.v1.Relationship.Builder, com.authzed.api.v1.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.RelationshipUpdate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.RelationshipUpdate(); + } + + public static com.authzed.api.v1.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.RelationshipUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/RelationshipUpdateOrBuilder.java b/generated/com/authzed/api/v1/RelationshipUpdateOrBuilder.java new file mode 100644 index 00000000..69764dc3 --- /dev/null +++ b/generated/com/authzed/api/v1/RelationshipUpdateOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +public interface RelationshipUpdateOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.RelationshipUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for operation. + */ + int getOperationValue(); + /** + * .authzed.api.v1.RelationshipUpdate.Operation operation = 1 [json_name = "operation", (.validate.rules) = { ... } + * @return The operation. + */ + com.authzed.api.v1.RelationshipUpdate.Operation getOperation(); + + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return Whether the relationship field is set. + */ + boolean hasRelationship(); + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + * @return The relationship. + */ + com.authzed.api.v1.Relationship getRelationship(); + /** + * .authzed.api.v1.Relationship relationship = 2 [json_name = "relationship", (.validate.rules) = { ... } + */ + com.authzed.api.v1.RelationshipOrBuilder getRelationshipOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ResolvedSubject.java b/generated/com/authzed/api/v1/ResolvedSubject.java new file mode 100644 index 00000000..52da4c1c --- /dev/null +++ b/generated/com/authzed/api/v1/ResolvedSubject.java @@ -0,0 +1,938 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * ResolvedSubject is a single subject resolved within LookupSubjects.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.ResolvedSubject} + */ +public final class ResolvedSubject extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.ResolvedSubject) + ResolvedSubjectOrBuilder { +private static final long serialVersionUID = 0L; + // Use ResolvedSubject.newBuilder() to construct. + private ResolvedSubject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResolvedSubject() { + subjectObjectId_ = ""; + permissionship_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResolvedSubject(); + } + + @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.PermissionService.internal_static_authzed_api_v1_ResolvedSubject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ResolvedSubject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ResolvedSubject.class, com.authzed.api.v1.ResolvedSubject.Builder.class); + } + + public static final int SUBJECT_OBJECT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object subjectObjectId_ = ""; + /** + *
+   * subject_object_id is the Object ID of the subject found. May be a `*` if
+   * a wildcard was found.
+   * 
+ * + * string subject_object_id = 1 [json_name = "subjectObjectId"]; + * @return The subjectObjectId. + */ + @java.lang.Override + public java.lang.String getSubjectObjectId() { + java.lang.Object ref = subjectObjectId_; + 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(); + subjectObjectId_ = s; + return s; + } + } + /** + *
+   * subject_object_id is the Object ID of the subject found. May be a `*` if
+   * a wildcard was found.
+   * 
+ * + * string subject_object_id = 1 [json_name = "subjectObjectId"]; + * @return The bytes for subjectObjectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectObjectIdBytes() { + java.lang.Object ref = subjectObjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectObjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSIONSHIP_FIELD_NUMBER = 2; + private int permissionship_ = 0; + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + @java.lang.Override public com.authzed.api.v1.LookupPermissionship getPermissionship() { + com.authzed.api.v1.LookupPermissionship result = com.authzed.api.v1.LookupPermissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.LookupPermissionship.UNRECOGNIZED : result; + } + + public static final int PARTIAL_CAVEAT_INFO_FIELD_NUMBER = 3; + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + @java.lang.Override + public boolean hasPartialCaveatInfo() { + return partialCaveatInfo_ != null; + } + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + + 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(subjectObjectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subjectObjectId_); + } + if (permissionship_ != com.authzed.api.v1.LookupPermissionship.LOOKUP_PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + output.writeEnum(2, permissionship_); + } + if (partialCaveatInfo_ != null) { + output.writeMessage(3, getPartialCaveatInfo()); + } + 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(subjectObjectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subjectObjectId_); + } + if (permissionship_ != com.authzed.api.v1.LookupPermissionship.LOOKUP_PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, permissionship_); + } + if (partialCaveatInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPartialCaveatInfo()); + } + 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.ResolvedSubject)) { + return super.equals(obj); + } + com.authzed.api.v1.ResolvedSubject other = (com.authzed.api.v1.ResolvedSubject) obj; + + if (!getSubjectObjectId() + .equals(other.getSubjectObjectId())) return false; + if (permissionship_ != other.permissionship_) return false; + if (hasPartialCaveatInfo() != other.hasPartialCaveatInfo()) return false; + if (hasPartialCaveatInfo()) { + if (!getPartialCaveatInfo() + .equals(other.getPartialCaveatInfo())) 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) + SUBJECT_OBJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubjectObjectId().hashCode(); + hash = (37 * hash) + PERMISSIONSHIP_FIELD_NUMBER; + hash = (53 * hash) + permissionship_; + if (hasPartialCaveatInfo()) { + hash = (37 * hash) + PARTIAL_CAVEAT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPartialCaveatInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.ResolvedSubject parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ResolvedSubject 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.ResolvedSubject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ResolvedSubject 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.ResolvedSubject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.ResolvedSubject parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.ResolvedSubject parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ResolvedSubject 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.ResolvedSubject parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ResolvedSubject 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.ResolvedSubject parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.ResolvedSubject 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.ResolvedSubject 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; + } + /** + *
+   * ResolvedSubject is a single subject resolved within LookupSubjects.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.ResolvedSubject} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.ResolvedSubject) + com.authzed.api.v1.ResolvedSubjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ResolvedSubject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ResolvedSubject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.ResolvedSubject.class, com.authzed.api.v1.ResolvedSubject.Builder.class); + } + + // Construct using com.authzed.api.v1.ResolvedSubject.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectObjectId_ = ""; + permissionship_ = 0; + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_ResolvedSubject_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.ResolvedSubject getDefaultInstanceForType() { + return com.authzed.api.v1.ResolvedSubject.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ResolvedSubject build() { + com.authzed.api.v1.ResolvedSubject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ResolvedSubject buildPartial() { + com.authzed.api.v1.ResolvedSubject result = new com.authzed.api.v1.ResolvedSubject(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.ResolvedSubject result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectObjectId_ = subjectObjectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.permissionship_ = permissionship_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.partialCaveatInfo_ = partialCaveatInfoBuilder_ == null + ? partialCaveatInfo_ + : partialCaveatInfoBuilder_.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.ResolvedSubject) { + return mergeFrom((com.authzed.api.v1.ResolvedSubject)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ResolvedSubject other) { + if (other == com.authzed.api.v1.ResolvedSubject.getDefaultInstance()) return this; + if (!other.getSubjectObjectId().isEmpty()) { + subjectObjectId_ = other.subjectObjectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.permissionship_ != 0) { + setPermissionshipValue(other.getPermissionshipValue()); + } + if (other.hasPartialCaveatInfo()) { + mergePartialCaveatInfo(other.getPartialCaveatInfo()); + } + 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: { + subjectObjectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + permissionship_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getPartialCaveatInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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 subjectObjectId_ = ""; + /** + *
+     * subject_object_id is the Object ID of the subject found. May be a `*` if
+     * a wildcard was found.
+     * 
+ * + * string subject_object_id = 1 [json_name = "subjectObjectId"]; + * @return The subjectObjectId. + */ + public java.lang.String getSubjectObjectId() { + java.lang.Object ref = subjectObjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectObjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * subject_object_id is the Object ID of the subject found. May be a `*` if
+     * a wildcard was found.
+     * 
+ * + * string subject_object_id = 1 [json_name = "subjectObjectId"]; + * @return The bytes for subjectObjectId. + */ + public com.google.protobuf.ByteString + getSubjectObjectIdBytes() { + java.lang.Object ref = subjectObjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectObjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * subject_object_id is the Object ID of the subject found. May be a `*` if
+     * a wildcard was found.
+     * 
+ * + * string subject_object_id = 1 [json_name = "subjectObjectId"]; + * @param value The subjectObjectId to set. + * @return This builder for chaining. + */ + public Builder setSubjectObjectId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subjectObjectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * subject_object_id is the Object ID of the subject found. May be a `*` if
+     * a wildcard was found.
+     * 
+ * + * string subject_object_id = 1 [json_name = "subjectObjectId"]; + * @return This builder for chaining. + */ + public Builder clearSubjectObjectId() { + subjectObjectId_ = getDefaultInstance().getSubjectObjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * subject_object_id is the Object ID of the subject found. May be a `*` if
+     * a wildcard was found.
+     * 
+ * + * string subject_object_id = 1 [json_name = "subjectObjectId"]; + * @param value The bytes for subjectObjectId to set. + * @return This builder for chaining. + */ + public Builder setSubjectObjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subjectObjectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int permissionship_ = 0; + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + @java.lang.Override public int getPermissionshipValue() { + return permissionship_; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @param value The enum numeric value on the wire for permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionshipValue(int value) { + permissionship_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + @java.lang.Override + public com.authzed.api.v1.LookupPermissionship getPermissionship() { + com.authzed.api.v1.LookupPermissionship result = com.authzed.api.v1.LookupPermissionship.forNumber(permissionship_); + return result == null ? com.authzed.api.v1.LookupPermissionship.UNRECOGNIZED : result; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @param value The permissionship to set. + * @return This builder for chaining. + */ + public Builder setPermissionship(com.authzed.api.v1.LookupPermissionship value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + permissionship_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * permissionship indicates whether the response was partially evaluated or not
+     * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermissionship() { + bitField0_ = (bitField0_ & ~0x00000002); + permissionship_ = 0; + onChanged(); + return this; + } + + private com.authzed.api.v1.PartialCaveatInfo partialCaveatInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> partialCaveatInfoBuilder_; + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + public boolean hasPartialCaveatInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + public com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo() { + if (partialCaveatInfoBuilder_ == null) { + return partialCaveatInfo_ == null ? com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } else { + return partialCaveatInfoBuilder_.getMessage(); + } + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder setPartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partialCaveatInfo_ = value; + } else { + partialCaveatInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder setPartialCaveatInfo( + com.authzed.api.v1.PartialCaveatInfo.Builder builderForValue) { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfo_ = builderForValue.build(); + } else { + partialCaveatInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder mergePartialCaveatInfo(com.authzed.api.v1.PartialCaveatInfo value) { + if (partialCaveatInfoBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + partialCaveatInfo_ != null && + partialCaveatInfo_ != com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance()) { + getPartialCaveatInfoBuilder().mergeFrom(value); + } else { + partialCaveatInfo_ = value; + } + } else { + partialCaveatInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public Builder clearPartialCaveatInfo() { + bitField0_ = (bitField0_ & ~0x00000004); + partialCaveatInfo_ = null; + if (partialCaveatInfoBuilder_ != null) { + partialCaveatInfoBuilder_.dispose(); + partialCaveatInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PartialCaveatInfo.Builder getPartialCaveatInfoBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPartialCaveatInfoFieldBuilder().getBuilder(); + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder() { + if (partialCaveatInfoBuilder_ != null) { + return partialCaveatInfoBuilder_.getMessageOrBuilder(); + } else { + return partialCaveatInfo_ == null ? + com.authzed.api.v1.PartialCaveatInfo.getDefaultInstance() : partialCaveatInfo_; + } + } + /** + *
+     * partial_caveat_info holds information of a partially-evaluated caveated response
+     * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder> + getPartialCaveatInfoFieldBuilder() { + if (partialCaveatInfoBuilder_ == null) { + partialCaveatInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.PartialCaveatInfo, com.authzed.api.v1.PartialCaveatInfo.Builder, com.authzed.api.v1.PartialCaveatInfoOrBuilder>( + getPartialCaveatInfo(), + getParentForChildren(), + isClean()); + partialCaveatInfo_ = null; + } + return partialCaveatInfoBuilder_; + } + @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.ResolvedSubject) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.ResolvedSubject) + private static final com.authzed.api.v1.ResolvedSubject DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ResolvedSubject(); + } + + public static com.authzed.api.v1.ResolvedSubject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResolvedSubject 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.ResolvedSubject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ResolvedSubjectOrBuilder.java b/generated/com/authzed/api/v1/ResolvedSubjectOrBuilder.java new file mode 100644 index 00000000..54bd8957 --- /dev/null +++ b/generated/com/authzed/api/v1/ResolvedSubjectOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface ResolvedSubjectOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ResolvedSubject) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * subject_object_id is the Object ID of the subject found. May be a `*` if
+   * a wildcard was found.
+   * 
+ * + * string subject_object_id = 1 [json_name = "subjectObjectId"]; + * @return The subjectObjectId. + */ + java.lang.String getSubjectObjectId(); + /** + *
+   * subject_object_id is the Object ID of the subject found. May be a `*` if
+   * a wildcard was found.
+   * 
+ * + * string subject_object_id = 1 [json_name = "subjectObjectId"]; + * @return The bytes for subjectObjectId. + */ + com.google.protobuf.ByteString + getSubjectObjectIdBytes(); + + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The enum numeric value on the wire for permissionship. + */ + int getPermissionshipValue(); + /** + *
+   * permissionship indicates whether the response was partially evaluated or not
+   * 
+ * + * .authzed.api.v1.LookupPermissionship permissionship = 2 [json_name = "permissionship", (.validate.rules) = { ... } + * @return The permissionship. + */ + com.authzed.api.v1.LookupPermissionship getPermissionship(); + + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return Whether the partialCaveatInfo field is set. + */ + boolean hasPartialCaveatInfo(); + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + * @return The partialCaveatInfo. + */ + com.authzed.api.v1.PartialCaveatInfo getPartialCaveatInfo(); + /** + *
+   * partial_caveat_info holds information of a partially-evaluated caveated response
+   * 
+ * + * .authzed.api.v1.PartialCaveatInfo partial_caveat_info = 3 [json_name = "partialCaveatInfo", (.validate.rules) = { ... } + */ + com.authzed.api.v1.PartialCaveatInfoOrBuilder getPartialCaveatInfoOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/SchemaServiceGrpc.java b/generated/com/authzed/api/v1/SchemaServiceGrpc.java new file mode 100644 index 00000000..ce362a09 --- /dev/null +++ b/generated/com/authzed/api/v1/SchemaServiceGrpc.java @@ -0,0 +1,421 @@ +package com.authzed.api.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * SchemaService implements operations on a Permissions System's Schema.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: authzed/api/v1/schema_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SchemaServiceGrpc { + + private SchemaServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "authzed.api.v1.SchemaService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getReadSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReadSchema", + requestType = com.authzed.api.v1.ReadSchemaRequest.class, + responseType = com.authzed.api.v1.ReadSchemaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getReadSchemaMethod() { + io.grpc.MethodDescriptor getReadSchemaMethod; + if ((getReadSchemaMethod = SchemaServiceGrpc.getReadSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getReadSchemaMethod = SchemaServiceGrpc.getReadSchemaMethod) == null) { + SchemaServiceGrpc.getReadSchemaMethod = getReadSchemaMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReadSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ReadSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.ReadSchemaResponse.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("ReadSchema")) + .build(); + } + } + } + return getReadSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getWriteSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WriteSchema", + requestType = com.authzed.api.v1.WriteSchemaRequest.class, + responseType = com.authzed.api.v1.WriteSchemaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getWriteSchemaMethod() { + io.grpc.MethodDescriptor getWriteSchemaMethod; + if ((getWriteSchemaMethod = SchemaServiceGrpc.getWriteSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getWriteSchemaMethod = SchemaServiceGrpc.getWriteSchemaMethod) == null) { + SchemaServiceGrpc.getWriteSchemaMethod = getWriteSchemaMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WriteSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.WriteSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.WriteSchemaResponse.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("WriteSchema")) + .build(); + } + } + } + return getWriteSchemaMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static SchemaServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SchemaServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceStub(channel, callOptions); + } + }; + return SchemaServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SchemaServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SchemaServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceBlockingStub(channel, callOptions); + } + }; + return SchemaServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static SchemaServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SchemaServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceFutureStub(channel, callOptions); + } + }; + return SchemaServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   * SchemaService implements operations on a Permissions System's Schema.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Read returns the current Object Definitions for a Permissions System.
+     * Errors include:
+     * - INVALID_ARGUMENT: a provided value has failed to semantically validate
+     * - NOT_FOUND: no schema has been defined
+     * 
+ */ + default void readSchema(com.authzed.api.v1.ReadSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReadSchemaMethod(), responseObserver); + } + + /** + *
+     * Write overwrites the current Object Definitions for a Permissions System.
+     * 
+ */ + default void writeSchema(com.authzed.api.v1.WriteSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWriteSchemaMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service SchemaService. + *
+   * SchemaService implements operations on a Permissions System's Schema.
+   * 
+ */ + public static abstract class SchemaServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return SchemaServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service SchemaService. + *
+   * SchemaService implements operations on a Permissions System's Schema.
+   * 
+ */ + public static final class SchemaServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private SchemaServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SchemaServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceStub(channel, callOptions); + } + + /** + *
+     * Read returns the current Object Definitions for a Permissions System.
+     * Errors include:
+     * - INVALID_ARGUMENT: a provided value has failed to semantically validate
+     * - NOT_FOUND: no schema has been defined
+     * 
+ */ + public void readSchema(com.authzed.api.v1.ReadSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReadSchemaMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Write overwrites the current Object Definitions for a Permissions System.
+     * 
+ */ + public void writeSchema(com.authzed.api.v1.WriteSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getWriteSchemaMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service SchemaService. + *
+   * SchemaService implements operations on a Permissions System's Schema.
+   * 
+ */ + public static final class SchemaServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SchemaServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SchemaServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * Read returns the current Object Definitions for a Permissions System.
+     * Errors include:
+     * - INVALID_ARGUMENT: a provided value has failed to semantically validate
+     * - NOT_FOUND: no schema has been defined
+     * 
+ */ + public com.authzed.api.v1.ReadSchemaResponse readSchema(com.authzed.api.v1.ReadSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReadSchemaMethod(), getCallOptions(), request); + } + + /** + *
+     * Write overwrites the current Object Definitions for a Permissions System.
+     * 
+ */ + public com.authzed.api.v1.WriteSchemaResponse writeSchema(com.authzed.api.v1.WriteSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getWriteSchemaMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service SchemaService. + *
+   * SchemaService implements operations on a Permissions System's Schema.
+   * 
+ */ + public static final class SchemaServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private SchemaServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SchemaServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceFutureStub(channel, callOptions); + } + + /** + *
+     * Read returns the current Object Definitions for a Permissions System.
+     * Errors include:
+     * - INVALID_ARGUMENT: a provided value has failed to semantically validate
+     * - NOT_FOUND: no schema has been defined
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture readSchema( + com.authzed.api.v1.ReadSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReadSchemaMethod(), getCallOptions()), request); + } + + /** + *
+     * Write overwrites the current Object Definitions for a Permissions System.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture writeSchema( + com.authzed.api.v1.WriteSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getWriteSchemaMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_READ_SCHEMA = 0; + private static final int METHODID_WRITE_SCHEMA = 1; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_READ_SCHEMA: + serviceImpl.readSchema((com.authzed.api.v1.ReadSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_WRITE_SCHEMA: + serviceImpl.writeSchema((com.authzed.api.v1.WriteSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getReadSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.ReadSchemaRequest, + com.authzed.api.v1.ReadSchemaResponse>( + service, METHODID_READ_SCHEMA))) + .addMethod( + getWriteSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1.WriteSchemaRequest, + com.authzed.api.v1.WriteSchemaResponse>( + service, METHODID_WRITE_SCHEMA))) + .build(); + } + + private static abstract class SchemaServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SchemaServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.authzed.api.v1.SchemaServiceOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SchemaService"); + } + } + + private static final class SchemaServiceFileDescriptorSupplier + extends SchemaServiceBaseDescriptorSupplier { + SchemaServiceFileDescriptorSupplier() {} + } + + private static final class SchemaServiceMethodDescriptorSupplier + extends SchemaServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + SchemaServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SchemaServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SchemaServiceFileDescriptorSupplier()) + .addMethod(getReadSchemaMethod()) + .addMethod(getWriteSchemaMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/generated/com/authzed/api/v1/SchemaServiceOuterClass.java b/generated/com/authzed/api/v1/SchemaServiceOuterClass.java new file mode 100644 index 00000000..c46bdafd --- /dev/null +++ b/generated/com/authzed/api/v1/SchemaServiceOuterClass.java @@ -0,0 +1,109 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/schema_service.proto + +package com.authzed.api.v1; + +public final class SchemaServiceOuterClass { + private SchemaServiceOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ReadSchemaRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ReadSchemaRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_ReadSchemaResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_ReadSchemaResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_WriteSchemaRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_WriteSchemaRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_WriteSchemaResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_WriteSchemaResponse_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#authzed/api/v1/schema_service.proto\022\016a" + + "uthzed.api.v1\032\034google/api/annotations.pr" + + "oto\032\027validate/validate.proto\032\031authzed/ap" + + "i/v1/core.proto\"\023\n\021ReadSchemaRequest\"r\n\022" + + "ReadSchemaResponse\022\037\n\013schema_text\030\001 \001(\tR" + + "\nschemaText\022;\n\007read_at\030\002 \001(\0132\030.authzed.a" + + "pi.v1.ZedTokenB\010\372B\005\212\001\002\020\001R\006readAt\"8\n\022Writ" + + "eSchemaRequest\022\"\n\006schema\030\001 \001(\tB\n\372B\007r\005(\200\200" + + "\200\002R\006schema\"X\n\023WriteSchemaResponse\022A\n\nwri" + + "tten_at\030\001 \001(\0132\030.authzed.api.v1.ZedTokenB" + + "\010\372B\005\212\001\002\020\001R\twrittenAt2\365\001\n\rSchemaService\022o" + + "\n\nReadSchema\022!.authzed.api.v1.ReadSchema" + + "Request\032\".authzed.api.v1.ReadSchemaRespo" + + "nse\"\032\202\323\344\223\002\024:\001*\"\017/v1/schema/read\022s\n\013Write" + + "Schema\022\".authzed.api.v1.WriteSchemaReque" + + "st\032#.authzed.api.v1.WriteSchemaResponse\"" + + "\033\202\323\344\223\002\025:\001*\"\020/v1/schema/writeBJ\n\022com.auth" + + "zed.api.v1P\001Z2github.com/authzed/authzed" + + "-go/proto/authzed/api/v1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + io.envoyproxy.pgv.validate.Validate.getDescriptor(), + com.authzed.api.v1.Core.getDescriptor(), + }); + internal_static_authzed_api_v1_ReadSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_v1_ReadSchemaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ReadSchemaRequest_descriptor, + new java.lang.String[] { }); + internal_static_authzed_api_v1_ReadSchemaResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_v1_ReadSchemaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_ReadSchemaResponse_descriptor, + new java.lang.String[] { "SchemaText", "ReadAt", }); + internal_static_authzed_api_v1_WriteSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authzed_api_v1_WriteSchemaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_WriteSchemaRequest_descriptor, + new java.lang.String[] { "Schema", }); + internal_static_authzed_api_v1_WriteSchemaResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_authzed_api_v1_WriteSchemaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_WriteSchemaResponse_descriptor, + new java.lang.String[] { "WrittenAt", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(io.envoyproxy.pgv.validate.Validate.rules); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + io.envoyproxy.pgv.validate.Validate.getDescriptor(); + com.authzed.api.v1.Core.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/v1/SubjectFilter.java b/generated/com/authzed/api/v1/SubjectFilter.java new file mode 100644 index 00000000..e11ace6d --- /dev/null +++ b/generated/com/authzed/api/v1/SubjectFilter.java @@ -0,0 +1,1428 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * SubjectFilter specifies a filter on the subject of a relationship.
+ * subject_type is required and all other fields are optional, and will not
+ * impose any additional requirements if left unspecified.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.SubjectFilter} + */ +public final class SubjectFilter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.SubjectFilter) + SubjectFilterOrBuilder { +private static final long serialVersionUID = 0L; + // Use SubjectFilter.newBuilder() to construct. + private SubjectFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubjectFilter() { + subjectType_ = ""; + optionalSubjectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubjectFilter(); + } + + @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.PermissionService.internal_static_authzed_api_v1_SubjectFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_SubjectFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.SubjectFilter.class, com.authzed.api.v1.SubjectFilter.Builder.class); + } + + public interface RelationFilterOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.SubjectFilter.RelationFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * string relation = 1 [json_name = "relation", (.validate.rules) = { ... } + * @return The relation. + */ + java.lang.String getRelation(); + /** + * string relation = 1 [json_name = "relation", (.validate.rules) = { ... } + * @return The bytes for relation. + */ + com.google.protobuf.ByteString + getRelationBytes(); + } + /** + * Protobuf type {@code authzed.api.v1.SubjectFilter.RelationFilter} + */ + public static final class RelationFilter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.SubjectFilter.RelationFilter) + RelationFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelationFilter.newBuilder() to construct. + private RelationFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelationFilter() { + relation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelationFilter(); + } + + @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.PermissionService.internal_static_authzed_api_v1_SubjectFilter_RelationFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_SubjectFilter_RelationFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.SubjectFilter.RelationFilter.class, com.authzed.api.v1.SubjectFilter.RelationFilter.Builder.class); + } + + public static final int RELATION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object relation_ = ""; + /** + * string relation = 1 [json_name = "relation", (.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; + } + } + /** + * string relation = 1 [json_name = "relation", (.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; + } + } + + 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(relation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, relation_); + } + 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(relation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, relation_); + } + 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.SubjectFilter.RelationFilter)) { + return super.equals(obj); + } + com.authzed.api.v1.SubjectFilter.RelationFilter other = (com.authzed.api.v1.SubjectFilter.RelationFilter) obj; + + if (!getRelation() + .equals(other.getRelation())) 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) + RELATION_FIELD_NUMBER; + hash = (53 * hash) + getRelation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.SubjectFilter.RelationFilter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.SubjectFilter.RelationFilter 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.SubjectFilter.RelationFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.SubjectFilter.RelationFilter 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.SubjectFilter.RelationFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.SubjectFilter.RelationFilter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.SubjectFilter.RelationFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.SubjectFilter.RelationFilter 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.SubjectFilter.RelationFilter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.SubjectFilter.RelationFilter 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.SubjectFilter.RelationFilter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.SubjectFilter.RelationFilter 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.SubjectFilter.RelationFilter 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; + } + /** + * Protobuf type {@code authzed.api.v1.SubjectFilter.RelationFilter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.SubjectFilter.RelationFilter) + com.authzed.api.v1.SubjectFilter.RelationFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_SubjectFilter_RelationFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_SubjectFilter_RelationFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.SubjectFilter.RelationFilter.class, com.authzed.api.v1.SubjectFilter.RelationFilter.Builder.class); + } + + // Construct using com.authzed.api.v1.SubjectFilter.RelationFilter.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_SubjectFilter_RelationFilter_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.SubjectFilter.RelationFilter getDefaultInstanceForType() { + return com.authzed.api.v1.SubjectFilter.RelationFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.SubjectFilter.RelationFilter build() { + com.authzed.api.v1.SubjectFilter.RelationFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.SubjectFilter.RelationFilter buildPartial() { + com.authzed.api.v1.SubjectFilter.RelationFilter result = new com.authzed.api.v1.SubjectFilter.RelationFilter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.SubjectFilter.RelationFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relation_ = relation_; + } + } + + @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.SubjectFilter.RelationFilter) { + return mergeFrom((com.authzed.api.v1.SubjectFilter.RelationFilter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.SubjectFilter.RelationFilter other) { + if (other == com.authzed.api.v1.SubjectFilter.RelationFilter.getDefaultInstance()) return this; + if (!other.getRelation().isEmpty()) { + relation_ = other.relation_; + 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: { + relation_ = 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 relation_ = ""; + /** + * string relation = 1 [json_name = "relation", (.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; + } + } + /** + * string relation = 1 [json_name = "relation", (.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; + } + } + /** + * string relation = 1 [json_name = "relation", (.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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string relation = 1 [json_name = "relation", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearRelation() { + relation_ = getDefaultInstance().getRelation(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string relation = 1 [json_name = "relation", (.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_ |= 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.SubjectFilter.RelationFilter) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.SubjectFilter.RelationFilter) + private static final com.authzed.api.v1.SubjectFilter.RelationFilter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.SubjectFilter.RelationFilter(); + } + + public static com.authzed.api.v1.SubjectFilter.RelationFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelationFilter 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.SubjectFilter.RelationFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int SUBJECT_TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object subjectType_ = ""; + /** + * string subject_type = 1 [json_name = "subjectType", (.validate.rules) = { ... } + * @return The subjectType. + */ + @java.lang.Override + public java.lang.String getSubjectType() { + java.lang.Object ref = subjectType_; + 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(); + subjectType_ = s; + return s; + } + } + /** + * string subject_type = 1 [json_name = "subjectType", (.validate.rules) = { ... } + * @return The bytes for subjectType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectTypeBytes() { + java.lang.Object ref = subjectType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_SUBJECT_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalSubjectId_ = ""; + /** + * string optional_subject_id = 2 [json_name = "optionalSubjectId", (.validate.rules) = { ... } + * @return The optionalSubjectId. + */ + @java.lang.Override + public java.lang.String getOptionalSubjectId() { + java.lang.Object ref = optionalSubjectId_; + 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(); + optionalSubjectId_ = s; + return s; + } + } + /** + * string optional_subject_id = 2 [json_name = "optionalSubjectId", (.validate.rules) = { ... } + * @return The bytes for optionalSubjectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalSubjectIdBytes() { + java.lang.Object ref = optionalSubjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalSubjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_RELATION_FIELD_NUMBER = 3; + private com.authzed.api.v1.SubjectFilter.RelationFilter optionalRelation_; + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + * @return Whether the optionalRelation field is set. + */ + @java.lang.Override + public boolean hasOptionalRelation() { + return optionalRelation_ != null; + } + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + * @return The optionalRelation. + */ + @java.lang.Override + public com.authzed.api.v1.SubjectFilter.RelationFilter getOptionalRelation() { + return optionalRelation_ == null ? com.authzed.api.v1.SubjectFilter.RelationFilter.getDefaultInstance() : optionalRelation_; + } + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + */ + @java.lang.Override + public com.authzed.api.v1.SubjectFilter.RelationFilterOrBuilder getOptionalRelationOrBuilder() { + return optionalRelation_ == null ? com.authzed.api.v1.SubjectFilter.RelationFilter.getDefaultInstance() : optionalRelation_; + } + + 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(subjectType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalSubjectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, optionalSubjectId_); + } + if (optionalRelation_ != null) { + output.writeMessage(3, getOptionalRelation()); + } + 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(subjectType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalSubjectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, optionalSubjectId_); + } + if (optionalRelation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getOptionalRelation()); + } + 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.SubjectFilter)) { + return super.equals(obj); + } + com.authzed.api.v1.SubjectFilter other = (com.authzed.api.v1.SubjectFilter) obj; + + if (!getSubjectType() + .equals(other.getSubjectType())) return false; + if (!getOptionalSubjectId() + .equals(other.getOptionalSubjectId())) return false; + if (hasOptionalRelation() != other.hasOptionalRelation()) return false; + if (hasOptionalRelation()) { + 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(); + hash = (37 * hash) + SUBJECT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getSubjectType().hashCode(); + hash = (37 * hash) + OPTIONAL_SUBJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getOptionalSubjectId().hashCode(); + if (hasOptionalRelation()) { + 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.SubjectFilter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.SubjectFilter 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.SubjectFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.SubjectFilter 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.SubjectFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.SubjectFilter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.SubjectFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.SubjectFilter 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.SubjectFilter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.SubjectFilter 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.SubjectFilter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.SubjectFilter 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.SubjectFilter 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; + } + /** + *
+   * SubjectFilter specifies a filter on the subject of a relationship.
+   * subject_type is required and all other fields are optional, and will not
+   * impose any additional requirements if left unspecified.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.SubjectFilter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.SubjectFilter) + com.authzed.api.v1.SubjectFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_SubjectFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_SubjectFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.SubjectFilter.class, com.authzed.api.v1.SubjectFilter.Builder.class); + } + + // Construct using com.authzed.api.v1.SubjectFilter.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectType_ = ""; + optionalSubjectId_ = ""; + optionalRelation_ = null; + if (optionalRelationBuilder_ != null) { + optionalRelationBuilder_.dispose(); + optionalRelationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_SubjectFilter_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.SubjectFilter getDefaultInstanceForType() { + return com.authzed.api.v1.SubjectFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.SubjectFilter build() { + com.authzed.api.v1.SubjectFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.SubjectFilter buildPartial() { + com.authzed.api.v1.SubjectFilter result = new com.authzed.api.v1.SubjectFilter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.SubjectFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectType_ = subjectType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optionalSubjectId_ = optionalSubjectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.optionalRelation_ = optionalRelationBuilder_ == null + ? optionalRelation_ + : optionalRelationBuilder_.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.SubjectFilter) { + return mergeFrom((com.authzed.api.v1.SubjectFilter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.SubjectFilter other) { + if (other == com.authzed.api.v1.SubjectFilter.getDefaultInstance()) return this; + if (!other.getSubjectType().isEmpty()) { + subjectType_ = other.subjectType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOptionalSubjectId().isEmpty()) { + optionalSubjectId_ = other.optionalSubjectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasOptionalRelation()) { + mergeOptionalRelation(other.getOptionalRelation()); + } + 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: { + subjectType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + optionalSubjectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getOptionalRelationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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 subjectType_ = ""; + /** + * string subject_type = 1 [json_name = "subjectType", (.validate.rules) = { ... } + * @return The subjectType. + */ + public java.lang.String getSubjectType() { + java.lang.Object ref = subjectType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string subject_type = 1 [json_name = "subjectType", (.validate.rules) = { ... } + * @return The bytes for subjectType. + */ + public com.google.protobuf.ByteString + getSubjectTypeBytes() { + java.lang.Object ref = subjectType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string subject_type = 1 [json_name = "subjectType", (.validate.rules) = { ... } + * @param value The subjectType to set. + * @return This builder for chaining. + */ + public Builder setSubjectType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subjectType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string subject_type = 1 [json_name = "subjectType", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearSubjectType() { + subjectType_ = getDefaultInstance().getSubjectType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string subject_type = 1 [json_name = "subjectType", (.validate.rules) = { ... } + * @param value The bytes for subjectType to set. + * @return This builder for chaining. + */ + public Builder setSubjectTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subjectType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object optionalSubjectId_ = ""; + /** + * string optional_subject_id = 2 [json_name = "optionalSubjectId", (.validate.rules) = { ... } + * @return The optionalSubjectId. + */ + public java.lang.String getOptionalSubjectId() { + java.lang.Object ref = optionalSubjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalSubjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string optional_subject_id = 2 [json_name = "optionalSubjectId", (.validate.rules) = { ... } + * @return The bytes for optionalSubjectId. + */ + public com.google.protobuf.ByteString + getOptionalSubjectIdBytes() { + java.lang.Object ref = optionalSubjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalSubjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string optional_subject_id = 2 [json_name = "optionalSubjectId", (.validate.rules) = { ... } + * @param value The optionalSubjectId to set. + * @return This builder for chaining. + */ + public Builder setOptionalSubjectId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalSubjectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string optional_subject_id = 2 [json_name = "optionalSubjectId", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalSubjectId() { + optionalSubjectId_ = getDefaultInstance().getOptionalSubjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string optional_subject_id = 2 [json_name = "optionalSubjectId", (.validate.rules) = { ... } + * @param value The bytes for optionalSubjectId to set. + * @return This builder for chaining. + */ + public Builder setOptionalSubjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalSubjectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.authzed.api.v1.SubjectFilter.RelationFilter optionalRelation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectFilter.RelationFilter, com.authzed.api.v1.SubjectFilter.RelationFilter.Builder, com.authzed.api.v1.SubjectFilter.RelationFilterOrBuilder> optionalRelationBuilder_; + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + * @return Whether the optionalRelation field is set. + */ + public boolean hasOptionalRelation() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + * @return The optionalRelation. + */ + public com.authzed.api.v1.SubjectFilter.RelationFilter getOptionalRelation() { + if (optionalRelationBuilder_ == null) { + return optionalRelation_ == null ? com.authzed.api.v1.SubjectFilter.RelationFilter.getDefaultInstance() : optionalRelation_; + } else { + return optionalRelationBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + */ + public Builder setOptionalRelation(com.authzed.api.v1.SubjectFilter.RelationFilter value) { + if (optionalRelationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalRelation_ = value; + } else { + optionalRelationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + */ + public Builder setOptionalRelation( + com.authzed.api.v1.SubjectFilter.RelationFilter.Builder builderForValue) { + if (optionalRelationBuilder_ == null) { + optionalRelation_ = builderForValue.build(); + } else { + optionalRelationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + */ + public Builder mergeOptionalRelation(com.authzed.api.v1.SubjectFilter.RelationFilter value) { + if (optionalRelationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + optionalRelation_ != null && + optionalRelation_ != com.authzed.api.v1.SubjectFilter.RelationFilter.getDefaultInstance()) { + getOptionalRelationBuilder().mergeFrom(value); + } else { + optionalRelation_ = value; + } + } else { + optionalRelationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + */ + public Builder clearOptionalRelation() { + bitField0_ = (bitField0_ & ~0x00000004); + optionalRelation_ = null; + if (optionalRelationBuilder_ != null) { + optionalRelationBuilder_.dispose(); + optionalRelationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + */ + public com.authzed.api.v1.SubjectFilter.RelationFilter.Builder getOptionalRelationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOptionalRelationFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + */ + public com.authzed.api.v1.SubjectFilter.RelationFilterOrBuilder getOptionalRelationOrBuilder() { + if (optionalRelationBuilder_ != null) { + return optionalRelationBuilder_.getMessageOrBuilder(); + } else { + return optionalRelation_ == null ? + com.authzed.api.v1.SubjectFilter.RelationFilter.getDefaultInstance() : optionalRelation_; + } + } + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectFilter.RelationFilter, com.authzed.api.v1.SubjectFilter.RelationFilter.Builder, com.authzed.api.v1.SubjectFilter.RelationFilterOrBuilder> + getOptionalRelationFieldBuilder() { + if (optionalRelationBuilder_ == null) { + optionalRelationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectFilter.RelationFilter, com.authzed.api.v1.SubjectFilter.RelationFilter.Builder, com.authzed.api.v1.SubjectFilter.RelationFilterOrBuilder>( + getOptionalRelation(), + getParentForChildren(), + isClean()); + optionalRelation_ = null; + } + return optionalRelationBuilder_; + } + @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.SubjectFilter) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.SubjectFilter) + private static final com.authzed.api.v1.SubjectFilter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.SubjectFilter(); + } + + public static com.authzed.api.v1.SubjectFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectFilter 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.SubjectFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/SubjectFilterOrBuilder.java b/generated/com/authzed/api/v1/SubjectFilterOrBuilder.java new file mode 100644 index 00000000..d9cd9a70 --- /dev/null +++ b/generated/com/authzed/api/v1/SubjectFilterOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface SubjectFilterOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.SubjectFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * string subject_type = 1 [json_name = "subjectType", (.validate.rules) = { ... } + * @return The subjectType. + */ + java.lang.String getSubjectType(); + /** + * string subject_type = 1 [json_name = "subjectType", (.validate.rules) = { ... } + * @return The bytes for subjectType. + */ + com.google.protobuf.ByteString + getSubjectTypeBytes(); + + /** + * string optional_subject_id = 2 [json_name = "optionalSubjectId", (.validate.rules) = { ... } + * @return The optionalSubjectId. + */ + java.lang.String getOptionalSubjectId(); + /** + * string optional_subject_id = 2 [json_name = "optionalSubjectId", (.validate.rules) = { ... } + * @return The bytes for optionalSubjectId. + */ + com.google.protobuf.ByteString + getOptionalSubjectIdBytes(); + + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + * @return Whether the optionalRelation field is set. + */ + boolean hasOptionalRelation(); + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + * @return The optionalRelation. + */ + com.authzed.api.v1.SubjectFilter.RelationFilter getOptionalRelation(); + /** + * .authzed.api.v1.SubjectFilter.RelationFilter optional_relation = 3 [json_name = "optionalRelation"]; + */ + com.authzed.api.v1.SubjectFilter.RelationFilterOrBuilder getOptionalRelationOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/SubjectReference.java b/generated/com/authzed/api/v1/SubjectReference.java new file mode 100644 index 00000000..8c2b36f6 --- /dev/null +++ b/generated/com/authzed/api/v1/SubjectReference.java @@ -0,0 +1,737 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * 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 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.SubjectReference.class, com.authzed.api.v1.SubjectReference.Builder.class); + } + + public static final int OBJECT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ObjectReference object_; + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + * @return Whether the object field is set. + */ + @java.lang.Override + public boolean hasObject() { + return object_ != null; + } + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + * @return The object. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getObject() { + return object_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : object_; + } + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getObjectOrBuilder() { + return object_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : object_; + } + + public static final int OPTIONAL_RELATION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalRelation_ = ""; + /** + * string optional_relation = 2 [json_name = "optionalRelation", (.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 [json_name = "optionalRelation", (.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.SubjectReference)) { + return super.equals(obj); + } + com.authzed.api.v1.SubjectReference other = (com.authzed.api.v1.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.SubjectReference parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.SubjectReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.SubjectReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.SubjectReference parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.SubjectReference parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.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.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.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.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.SubjectReference.class, com.authzed.api.v1.SubjectReference.Builder.class); + } + + // Construct using com.authzed.api.v1.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.SubjectReference getDefaultInstanceForType() { + return com.authzed.api.v1.SubjectReference.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.SubjectReference build() { + com.authzed.api.v1.SubjectReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.SubjectReference buildPartial() { + com.authzed.api.v1.SubjectReference result = new com.authzed.api.v1.SubjectReference(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.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.SubjectReference) { + return mergeFrom((com.authzed.api.v1.SubjectReference)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.SubjectReference other) { + if (other == com.authzed.api.v1.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.ObjectReference object_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> objectBuilder_; + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + * @return Whether the object field is set. + */ + public boolean hasObject() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + * @return The object. + */ + public com.authzed.api.v1.ObjectReference getObject() { + if (objectBuilder_ == null) { + return object_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : object_; + } else { + return objectBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + */ + public Builder setObject(com.authzed.api.v1.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 [json_name = "object", (.validate.rules) = { ... } + */ + public Builder setObject( + com.authzed.api.v1.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 [json_name = "object", (.validate.rules) = { ... } + */ + public Builder mergeObject(com.authzed.api.v1.ObjectReference value) { + if (objectBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + object_ != null && + object_ != com.authzed.api.v1.ObjectReference.getDefaultInstance()) { + getObjectBuilder().mergeFrom(value); + } else { + object_ = value; + } + } else { + objectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.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 [json_name = "object", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReference.Builder getObjectBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getObjectFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getObjectOrBuilder() { + if (objectBuilder_ != null) { + return objectBuilder_.getMessageOrBuilder(); + } else { + return object_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : object_; + } + } + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getObjectFieldBuilder() { + if (objectBuilder_ == null) { + objectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder>( + getObject(), + getParentForChildren(), + isClean()); + object_ = null; + } + return objectBuilder_; + } + + private java.lang.Object optionalRelation_ = ""; + /** + * string optional_relation = 2 [json_name = "optionalRelation", (.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 [json_name = "optionalRelation", (.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 [json_name = "optionalRelation", (.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 [json_name = "optionalRelation", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalRelation() { + optionalRelation_ = getDefaultInstance().getOptionalRelation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string optional_relation = 2 [json_name = "optionalRelation", (.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.SubjectReference DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.SubjectReference(); + } + + public static com.authzed.api.v1.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.SubjectReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/SubjectReferenceOrBuilder.java b/generated/com/authzed/api/v1/SubjectReferenceOrBuilder.java new file mode 100644 index 00000000..30e51c2d --- /dev/null +++ b/generated/com/authzed/api/v1/SubjectReferenceOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +public interface SubjectReferenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.SubjectReference) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + * @return Whether the object field is set. + */ + boolean hasObject(); + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + * @return The object. + */ + com.authzed.api.v1.ObjectReference getObject(); + /** + * .authzed.api.v1.ObjectReference object = 1 [json_name = "object", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getObjectOrBuilder(); + + /** + * string optional_relation = 2 [json_name = "optionalRelation", (.validate.rules) = { ... } + * @return The optionalRelation. + */ + java.lang.String getOptionalRelation(); + /** + * string optional_relation = 2 [json_name = "optionalRelation", (.validate.rules) = { ... } + * @return The bytes for optionalRelation. + */ + com.google.protobuf.ByteString + getOptionalRelationBytes(); +} diff --git a/generated/com/authzed/api/v1/WatchRequest.java b/generated/com/authzed/api/v1/WatchRequest.java new file mode 100644 index 00000000..d8b3a03f --- /dev/null +++ b/generated/com/authzed/api/v1/WatchRequest.java @@ -0,0 +1,1518 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/watch_service.proto + +package com.authzed.api.v1; + +/** + *
+ * WatchRequest specifies the object definitions for which we want to start
+ * watching mutations, and an optional start snapshot for when to start
+ * watching.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.WatchRequest} + */ +public final class WatchRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.WatchRequest) + WatchRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use WatchRequest.newBuilder() to construct. + private WatchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WatchRequest() { + optionalObjectTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + optionalRelationshipFilters_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WatchRequest(); + } + + @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.WatchServiceOuterClass.internal_static_authzed_api_v1_WatchRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.WatchServiceOuterClass.internal_static_authzed_api_v1_WatchRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WatchRequest.class, com.authzed.api.v1.WatchRequest.Builder.class); + } + + public static final int OPTIONAL_OBJECT_TYPES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList optionalObjectTypes_; + /** + *
+   * optional_object_types is a filter of resource object types to watch for changes.
+   * If specified, only changes to the specified object types will be returned and
+   * optional_relationship_filters cannot be used.
+   * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @return A list containing the optionalObjectTypes. + */ + public com.google.protobuf.ProtocolStringList + getOptionalObjectTypesList() { + return optionalObjectTypes_; + } + /** + *
+   * optional_object_types is a filter of resource object types to watch for changes.
+   * If specified, only changes to the specified object types will be returned and
+   * optional_relationship_filters cannot be used.
+   * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @return The count of optionalObjectTypes. + */ + public int getOptionalObjectTypesCount() { + return optionalObjectTypes_.size(); + } + /** + *
+   * optional_object_types is a filter of resource object types to watch for changes.
+   * If specified, only changes to the specified object types will be returned and
+   * optional_relationship_filters cannot be used.
+   * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @param index The index of the element to return. + * @return The optionalObjectTypes at the given index. + */ + public java.lang.String getOptionalObjectTypes(int index) { + return optionalObjectTypes_.get(index); + } + /** + *
+   * optional_object_types is a filter of resource object types to watch for changes.
+   * If specified, only changes to the specified object types will be returned and
+   * optional_relationship_filters cannot be used.
+   * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @param index The index of the value to return. + * @return The bytes of the optionalObjectTypes at the given index. + */ + public com.google.protobuf.ByteString + getOptionalObjectTypesBytes(int index) { + return optionalObjectTypes_.getByteString(index); + } + + public static final int OPTIONAL_START_CURSOR_FIELD_NUMBER = 2; + private com.authzed.api.v1.ZedToken optionalStartCursor_; + /** + *
+   * optional_start_cursor is the ZedToken holding the point-in-time at
+   * which to start watching for changes.
+   * If not specified, the watch will begin at the current head revision
+   * of the datastore, returning any updates that occur after the caller
+   * makes the request.
+   * Note that if this cursor references a point-in-time containing data
+   * that has been garbage collected, an error will be returned.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + * @return Whether the optionalStartCursor field is set. + */ + @java.lang.Override + public boolean hasOptionalStartCursor() { + return optionalStartCursor_ != null; + } + /** + *
+   * optional_start_cursor is the ZedToken holding the point-in-time at
+   * which to start watching for changes.
+   * If not specified, the watch will begin at the current head revision
+   * of the datastore, returning any updates that occur after the caller
+   * makes the request.
+   * Note that if this cursor references a point-in-time containing data
+   * that has been garbage collected, an error will be returned.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + * @return The optionalStartCursor. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getOptionalStartCursor() { + return optionalStartCursor_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartCursor_; + } + /** + *
+   * optional_start_cursor is the ZedToken holding the point-in-time at
+   * which to start watching for changes.
+   * If not specified, the watch will begin at the current head revision
+   * of the datastore, returning any updates that occur after the caller
+   * makes the request.
+   * Note that if this cursor references a point-in-time containing data
+   * that has been garbage collected, an error will be returned.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartCursorOrBuilder() { + return optionalStartCursor_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartCursor_; + } + + public static final int OPTIONAL_RELATIONSHIP_FILTERS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List optionalRelationshipFilters_; + /** + *
+   * optional_relationship_filters, if specified, indicates the
+   * filter(s) to apply to each relationship to be returned by watch.
+   * The relationship will be returned as long as at least one filter matches,
+   * this allows clients to match relationships on multiple filters on a single watch call.
+   * If specified, optional_object_types cannot be used.
+   * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + @java.lang.Override + public java.util.List getOptionalRelationshipFiltersList() { + return optionalRelationshipFilters_; + } + /** + *
+   * optional_relationship_filters, if specified, indicates the
+   * filter(s) to apply to each relationship to be returned by watch.
+   * The relationship will be returned as long as at least one filter matches,
+   * this allows clients to match relationships on multiple filters on a single watch call.
+   * If specified, optional_object_types cannot be used.
+   * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + @java.lang.Override + public java.util.List + getOptionalRelationshipFiltersOrBuilderList() { + return optionalRelationshipFilters_; + } + /** + *
+   * optional_relationship_filters, if specified, indicates the
+   * filter(s) to apply to each relationship to be returned by watch.
+   * The relationship will be returned as long as at least one filter matches,
+   * this allows clients to match relationships on multiple filters on a single watch call.
+   * If specified, optional_object_types cannot be used.
+   * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + @java.lang.Override + public int getOptionalRelationshipFiltersCount() { + return optionalRelationshipFilters_.size(); + } + /** + *
+   * optional_relationship_filters, if specified, indicates the
+   * filter(s) to apply to each relationship to be returned by watch.
+   * The relationship will be returned as long as at least one filter matches,
+   * this allows clients to match relationships on multiple filters on a single watch call.
+   * If specified, optional_object_types cannot be used.
+   * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilter getOptionalRelationshipFilters(int index) { + return optionalRelationshipFilters_.get(index); + } + /** + *
+   * optional_relationship_filters, if specified, indicates the
+   * filter(s) to apply to each relationship to be returned by watch.
+   * The relationship will be returned as long as at least one filter matches,
+   * this allows clients to match relationships on multiple filters on a single watch call.
+   * If specified, optional_object_types cannot be used.
+   * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipFilterOrBuilder getOptionalRelationshipFiltersOrBuilder( + int index) { + return optionalRelationshipFilters_.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 < optionalObjectTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, optionalObjectTypes_.getRaw(i)); + } + if (optionalStartCursor_ != null) { + output.writeMessage(2, getOptionalStartCursor()); + } + for (int i = 0; i < optionalRelationshipFilters_.size(); i++) { + output.writeMessage(3, optionalRelationshipFilters_.get(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 < optionalObjectTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(optionalObjectTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getOptionalObjectTypesList().size(); + } + if (optionalStartCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOptionalStartCursor()); + } + for (int i = 0; i < optionalRelationshipFilters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, optionalRelationshipFilters_.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.WatchRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.WatchRequest other = (com.authzed.api.v1.WatchRequest) obj; + + if (!getOptionalObjectTypesList() + .equals(other.getOptionalObjectTypesList())) return false; + if (hasOptionalStartCursor() != other.hasOptionalStartCursor()) return false; + if (hasOptionalStartCursor()) { + if (!getOptionalStartCursor() + .equals(other.getOptionalStartCursor())) return false; + } + if (!getOptionalRelationshipFiltersList() + .equals(other.getOptionalRelationshipFiltersList())) 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 (getOptionalObjectTypesCount() > 0) { + hash = (37 * hash) + OPTIONAL_OBJECT_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getOptionalObjectTypesList().hashCode(); + } + if (hasOptionalStartCursor()) { + hash = (37 * hash) + OPTIONAL_START_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getOptionalStartCursor().hashCode(); + } + if (getOptionalRelationshipFiltersCount() > 0) { + hash = (37 * hash) + OPTIONAL_RELATIONSHIP_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getOptionalRelationshipFiltersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.WatchRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WatchRequest 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.WatchRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WatchRequest 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.WatchRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WatchRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.WatchRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WatchRequest 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.WatchRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WatchRequest 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.WatchRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WatchRequest 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.WatchRequest 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; + } + /** + *
+   * WatchRequest specifies the object definitions for which we want to start
+   * watching mutations, and an optional start snapshot for when to start
+   * watching.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.WatchRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.WatchRequest) + com.authzed.api.v1.WatchRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.WatchServiceOuterClass.internal_static_authzed_api_v1_WatchRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.WatchServiceOuterClass.internal_static_authzed_api_v1_WatchRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WatchRequest.class, com.authzed.api.v1.WatchRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.WatchRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + optionalObjectTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + optionalStartCursor_ = null; + if (optionalStartCursorBuilder_ != null) { + optionalStartCursorBuilder_.dispose(); + optionalStartCursorBuilder_ = null; + } + if (optionalRelationshipFiltersBuilder_ == null) { + optionalRelationshipFilters_ = java.util.Collections.emptyList(); + } else { + optionalRelationshipFilters_ = null; + optionalRelationshipFiltersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.WatchServiceOuterClass.internal_static_authzed_api_v1_WatchRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.WatchRequest getDefaultInstanceForType() { + return com.authzed.api.v1.WatchRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.WatchRequest build() { + com.authzed.api.v1.WatchRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.WatchRequest buildPartial() { + com.authzed.api.v1.WatchRequest result = new com.authzed.api.v1.WatchRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.WatchRequest result) { + if (((bitField0_ & 0x00000001) != 0)) { + optionalObjectTypes_ = optionalObjectTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.optionalObjectTypes_ = optionalObjectTypes_; + if (optionalRelationshipFiltersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + optionalRelationshipFilters_ = java.util.Collections.unmodifiableList(optionalRelationshipFilters_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.optionalRelationshipFilters_ = optionalRelationshipFilters_; + } else { + result.optionalRelationshipFilters_ = optionalRelationshipFiltersBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.WatchRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optionalStartCursor_ = optionalStartCursorBuilder_ == null + ? optionalStartCursor_ + : optionalStartCursorBuilder_.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.WatchRequest) { + return mergeFrom((com.authzed.api.v1.WatchRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.WatchRequest other) { + if (other == com.authzed.api.v1.WatchRequest.getDefaultInstance()) return this; + if (!other.optionalObjectTypes_.isEmpty()) { + if (optionalObjectTypes_.isEmpty()) { + optionalObjectTypes_ = other.optionalObjectTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOptionalObjectTypesIsMutable(); + optionalObjectTypes_.addAll(other.optionalObjectTypes_); + } + onChanged(); + } + if (other.hasOptionalStartCursor()) { + mergeOptionalStartCursor(other.getOptionalStartCursor()); + } + if (optionalRelationshipFiltersBuilder_ == null) { + if (!other.optionalRelationshipFilters_.isEmpty()) { + if (optionalRelationshipFilters_.isEmpty()) { + optionalRelationshipFilters_ = other.optionalRelationshipFilters_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOptionalRelationshipFiltersIsMutable(); + optionalRelationshipFilters_.addAll(other.optionalRelationshipFilters_); + } + onChanged(); + } + } else { + if (!other.optionalRelationshipFilters_.isEmpty()) { + if (optionalRelationshipFiltersBuilder_.isEmpty()) { + optionalRelationshipFiltersBuilder_.dispose(); + optionalRelationshipFiltersBuilder_ = null; + optionalRelationshipFilters_ = other.optionalRelationshipFilters_; + bitField0_ = (bitField0_ & ~0x00000004); + optionalRelationshipFiltersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOptionalRelationshipFiltersFieldBuilder() : null; + } else { + optionalRelationshipFiltersBuilder_.addAllMessages(other.optionalRelationshipFilters_); + } + } + } + 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(); + ensureOptionalObjectTypesIsMutable(); + optionalObjectTypes_.add(s); + break; + } // case 10 + case 18: { + input.readMessage( + getOptionalStartCursorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.authzed.api.v1.RelationshipFilter m = + input.readMessage( + com.authzed.api.v1.RelationshipFilter.parser(), + extensionRegistry); + if (optionalRelationshipFiltersBuilder_ == null) { + ensureOptionalRelationshipFiltersIsMutable(); + optionalRelationshipFilters_.add(m); + } else { + optionalRelationshipFiltersBuilder_.addMessage(m); + } + break; + } // case 26 + 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 optionalObjectTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureOptionalObjectTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + optionalObjectTypes_ = new com.google.protobuf.LazyStringArrayList(optionalObjectTypes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * optional_object_types is a filter of resource object types to watch for changes.
+     * If specified, only changes to the specified object types will be returned and
+     * optional_relationship_filters cannot be used.
+     * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @return A list containing the optionalObjectTypes. + */ + public com.google.protobuf.ProtocolStringList + getOptionalObjectTypesList() { + return optionalObjectTypes_.getUnmodifiableView(); + } + /** + *
+     * optional_object_types is a filter of resource object types to watch for changes.
+     * If specified, only changes to the specified object types will be returned and
+     * optional_relationship_filters cannot be used.
+     * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @return The count of optionalObjectTypes. + */ + public int getOptionalObjectTypesCount() { + return optionalObjectTypes_.size(); + } + /** + *
+     * optional_object_types is a filter of resource object types to watch for changes.
+     * If specified, only changes to the specified object types will be returned and
+     * optional_relationship_filters cannot be used.
+     * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @param index The index of the element to return. + * @return The optionalObjectTypes at the given index. + */ + public java.lang.String getOptionalObjectTypes(int index) { + return optionalObjectTypes_.get(index); + } + /** + *
+     * optional_object_types is a filter of resource object types to watch for changes.
+     * If specified, only changes to the specified object types will be returned and
+     * optional_relationship_filters cannot be used.
+     * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @param index The index of the value to return. + * @return The bytes of the optionalObjectTypes at the given index. + */ + public com.google.protobuf.ByteString + getOptionalObjectTypesBytes(int index) { + return optionalObjectTypes_.getByteString(index); + } + /** + *
+     * optional_object_types is a filter of resource object types to watch for changes.
+     * If specified, only changes to the specified object types will be returned and
+     * optional_relationship_filters cannot be used.
+     * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @param index The index to set the value at. + * @param value The optionalObjectTypes to set. + * @return This builder for chaining. + */ + public Builder setOptionalObjectTypes( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureOptionalObjectTypesIsMutable(); + optionalObjectTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * optional_object_types is a filter of resource object types to watch for changes.
+     * If specified, only changes to the specified object types will be returned and
+     * optional_relationship_filters cannot be used.
+     * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @param value The optionalObjectTypes to add. + * @return This builder for chaining. + */ + public Builder addOptionalObjectTypes( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureOptionalObjectTypesIsMutable(); + optionalObjectTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * optional_object_types is a filter of resource object types to watch for changes.
+     * If specified, only changes to the specified object types will be returned and
+     * optional_relationship_filters cannot be used.
+     * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @param values The optionalObjectTypes to add. + * @return This builder for chaining. + */ + public Builder addAllOptionalObjectTypes( + java.lang.Iterable values) { + ensureOptionalObjectTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, optionalObjectTypes_); + onChanged(); + return this; + } + /** + *
+     * optional_object_types is a filter of resource object types to watch for changes.
+     * If specified, only changes to the specified object types will be returned and
+     * optional_relationship_filters cannot be used.
+     * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearOptionalObjectTypes() { + optionalObjectTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * optional_object_types is a filter of resource object types to watch for changes.
+     * If specified, only changes to the specified object types will be returned and
+     * optional_relationship_filters cannot be used.
+     * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @param value The bytes of the optionalObjectTypes to add. + * @return This builder for chaining. + */ + public Builder addOptionalObjectTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureOptionalObjectTypesIsMutable(); + optionalObjectTypes_.add(value); + onChanged(); + return this; + } + + private com.authzed.api.v1.ZedToken optionalStartCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> optionalStartCursorBuilder_; + /** + *
+     * optional_start_cursor is the ZedToken holding the point-in-time at
+     * which to start watching for changes.
+     * If not specified, the watch will begin at the current head revision
+     * of the datastore, returning any updates that occur after the caller
+     * makes the request.
+     * Note that if this cursor references a point-in-time containing data
+     * that has been garbage collected, an error will be returned.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + * @return Whether the optionalStartCursor field is set. + */ + public boolean hasOptionalStartCursor() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * optional_start_cursor is the ZedToken holding the point-in-time at
+     * which to start watching for changes.
+     * If not specified, the watch will begin at the current head revision
+     * of the datastore, returning any updates that occur after the caller
+     * makes the request.
+     * Note that if this cursor references a point-in-time containing data
+     * that has been garbage collected, an error will be returned.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + * @return The optionalStartCursor. + */ + public com.authzed.api.v1.ZedToken getOptionalStartCursor() { + if (optionalStartCursorBuilder_ == null) { + return optionalStartCursor_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartCursor_; + } else { + return optionalStartCursorBuilder_.getMessage(); + } + } + /** + *
+     * optional_start_cursor is the ZedToken holding the point-in-time at
+     * which to start watching for changes.
+     * If not specified, the watch will begin at the current head revision
+     * of the datastore, returning any updates that occur after the caller
+     * makes the request.
+     * Note that if this cursor references a point-in-time containing data
+     * that has been garbage collected, an error will be returned.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + */ + public Builder setOptionalStartCursor(com.authzed.api.v1.ZedToken value) { + if (optionalStartCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalStartCursor_ = value; + } else { + optionalStartCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_start_cursor is the ZedToken holding the point-in-time at
+     * which to start watching for changes.
+     * If not specified, the watch will begin at the current head revision
+     * of the datastore, returning any updates that occur after the caller
+     * makes the request.
+     * Note that if this cursor references a point-in-time containing data
+     * that has been garbage collected, an error will be returned.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + */ + public Builder setOptionalStartCursor( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (optionalStartCursorBuilder_ == null) { + optionalStartCursor_ = builderForValue.build(); + } else { + optionalStartCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_start_cursor is the ZedToken holding the point-in-time at
+     * which to start watching for changes.
+     * If not specified, the watch will begin at the current head revision
+     * of the datastore, returning any updates that occur after the caller
+     * makes the request.
+     * Note that if this cursor references a point-in-time containing data
+     * that has been garbage collected, an error will be returned.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + */ + public Builder mergeOptionalStartCursor(com.authzed.api.v1.ZedToken value) { + if (optionalStartCursorBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + optionalStartCursor_ != null && + optionalStartCursor_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getOptionalStartCursorBuilder().mergeFrom(value); + } else { + optionalStartCursor_ = value; + } + } else { + optionalStartCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * optional_start_cursor is the ZedToken holding the point-in-time at
+     * which to start watching for changes.
+     * If not specified, the watch will begin at the current head revision
+     * of the datastore, returning any updates that occur after the caller
+     * makes the request.
+     * Note that if this cursor references a point-in-time containing data
+     * that has been garbage collected, an error will be returned.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + */ + public Builder clearOptionalStartCursor() { + bitField0_ = (bitField0_ & ~0x00000002); + optionalStartCursor_ = null; + if (optionalStartCursorBuilder_ != null) { + optionalStartCursorBuilder_.dispose(); + optionalStartCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * optional_start_cursor is the ZedToken holding the point-in-time at
+     * which to start watching for changes.
+     * If not specified, the watch will begin at the current head revision
+     * of the datastore, returning any updates that occur after the caller
+     * makes the request.
+     * Note that if this cursor references a point-in-time containing data
+     * that has been garbage collected, an error will be returned.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + */ + public com.authzed.api.v1.ZedToken.Builder getOptionalStartCursorBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOptionalStartCursorFieldBuilder().getBuilder(); + } + /** + *
+     * optional_start_cursor is the ZedToken holding the point-in-time at
+     * which to start watching for changes.
+     * If not specified, the watch will begin at the current head revision
+     * of the datastore, returning any updates that occur after the caller
+     * makes the request.
+     * Note that if this cursor references a point-in-time containing data
+     * that has been garbage collected, an error will be returned.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartCursorOrBuilder() { + if (optionalStartCursorBuilder_ != null) { + return optionalStartCursorBuilder_.getMessageOrBuilder(); + } else { + return optionalStartCursor_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartCursor_; + } + } + /** + *
+     * optional_start_cursor is the ZedToken holding the point-in-time at
+     * which to start watching for changes.
+     * If not specified, the watch will begin at the current head revision
+     * of the datastore, returning any updates that occur after the caller
+     * makes the request.
+     * Note that if this cursor references a point-in-time containing data
+     * that has been garbage collected, an error will be returned.
+     * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getOptionalStartCursorFieldBuilder() { + if (optionalStartCursorBuilder_ == null) { + optionalStartCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getOptionalStartCursor(), + getParentForChildren(), + isClean()); + optionalStartCursor_ = null; + } + return optionalStartCursorBuilder_; + } + + private java.util.List optionalRelationshipFilters_ = + java.util.Collections.emptyList(); + private void ensureOptionalRelationshipFiltersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + optionalRelationshipFilters_ = new java.util.ArrayList(optionalRelationshipFilters_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> optionalRelationshipFiltersBuilder_; + + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public java.util.List getOptionalRelationshipFiltersList() { + if (optionalRelationshipFiltersBuilder_ == null) { + return java.util.Collections.unmodifiableList(optionalRelationshipFilters_); + } else { + return optionalRelationshipFiltersBuilder_.getMessageList(); + } + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public int getOptionalRelationshipFiltersCount() { + if (optionalRelationshipFiltersBuilder_ == null) { + return optionalRelationshipFilters_.size(); + } else { + return optionalRelationshipFiltersBuilder_.getCount(); + } + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public com.authzed.api.v1.RelationshipFilter getOptionalRelationshipFilters(int index) { + if (optionalRelationshipFiltersBuilder_ == null) { + return optionalRelationshipFilters_.get(index); + } else { + return optionalRelationshipFiltersBuilder_.getMessage(index); + } + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public Builder setOptionalRelationshipFilters( + int index, com.authzed.api.v1.RelationshipFilter value) { + if (optionalRelationshipFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalRelationshipFiltersIsMutable(); + optionalRelationshipFilters_.set(index, value); + onChanged(); + } else { + optionalRelationshipFiltersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public Builder setOptionalRelationshipFilters( + int index, com.authzed.api.v1.RelationshipFilter.Builder builderForValue) { + if (optionalRelationshipFiltersBuilder_ == null) { + ensureOptionalRelationshipFiltersIsMutable(); + optionalRelationshipFilters_.set(index, builderForValue.build()); + onChanged(); + } else { + optionalRelationshipFiltersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public Builder addOptionalRelationshipFilters(com.authzed.api.v1.RelationshipFilter value) { + if (optionalRelationshipFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalRelationshipFiltersIsMutable(); + optionalRelationshipFilters_.add(value); + onChanged(); + } else { + optionalRelationshipFiltersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public Builder addOptionalRelationshipFilters( + int index, com.authzed.api.v1.RelationshipFilter value) { + if (optionalRelationshipFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalRelationshipFiltersIsMutable(); + optionalRelationshipFilters_.add(index, value); + onChanged(); + } else { + optionalRelationshipFiltersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public Builder addOptionalRelationshipFilters( + com.authzed.api.v1.RelationshipFilter.Builder builderForValue) { + if (optionalRelationshipFiltersBuilder_ == null) { + ensureOptionalRelationshipFiltersIsMutable(); + optionalRelationshipFilters_.add(builderForValue.build()); + onChanged(); + } else { + optionalRelationshipFiltersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public Builder addOptionalRelationshipFilters( + int index, com.authzed.api.v1.RelationshipFilter.Builder builderForValue) { + if (optionalRelationshipFiltersBuilder_ == null) { + ensureOptionalRelationshipFiltersIsMutable(); + optionalRelationshipFilters_.add(index, builderForValue.build()); + onChanged(); + } else { + optionalRelationshipFiltersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public Builder addAllOptionalRelationshipFilters( + java.lang.Iterable values) { + if (optionalRelationshipFiltersBuilder_ == null) { + ensureOptionalRelationshipFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, optionalRelationshipFilters_); + onChanged(); + } else { + optionalRelationshipFiltersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public Builder clearOptionalRelationshipFilters() { + if (optionalRelationshipFiltersBuilder_ == null) { + optionalRelationshipFilters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + optionalRelationshipFiltersBuilder_.clear(); + } + return this; + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public Builder removeOptionalRelationshipFilters(int index) { + if (optionalRelationshipFiltersBuilder_ == null) { + ensureOptionalRelationshipFiltersIsMutable(); + optionalRelationshipFilters_.remove(index); + onChanged(); + } else { + optionalRelationshipFiltersBuilder_.remove(index); + } + return this; + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public com.authzed.api.v1.RelationshipFilter.Builder getOptionalRelationshipFiltersBuilder( + int index) { + return getOptionalRelationshipFiltersFieldBuilder().getBuilder(index); + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public com.authzed.api.v1.RelationshipFilterOrBuilder getOptionalRelationshipFiltersOrBuilder( + int index) { + if (optionalRelationshipFiltersBuilder_ == null) { + return optionalRelationshipFilters_.get(index); } else { + return optionalRelationshipFiltersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public java.util.List + getOptionalRelationshipFiltersOrBuilderList() { + if (optionalRelationshipFiltersBuilder_ != null) { + return optionalRelationshipFiltersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(optionalRelationshipFilters_); + } + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public com.authzed.api.v1.RelationshipFilter.Builder addOptionalRelationshipFiltersBuilder() { + return getOptionalRelationshipFiltersFieldBuilder().addBuilder( + com.authzed.api.v1.RelationshipFilter.getDefaultInstance()); + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public com.authzed.api.v1.RelationshipFilter.Builder addOptionalRelationshipFiltersBuilder( + int index) { + return getOptionalRelationshipFiltersFieldBuilder().addBuilder( + index, com.authzed.api.v1.RelationshipFilter.getDefaultInstance()); + } + /** + *
+     * optional_relationship_filters, if specified, indicates the
+     * filter(s) to apply to each relationship to be returned by watch.
+     * The relationship will be returned as long as at least one filter matches,
+     * this allows clients to match relationships on multiple filters on a single watch call.
+     * If specified, optional_object_types cannot be used.
+     * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + public java.util.List + getOptionalRelationshipFiltersBuilderList() { + return getOptionalRelationshipFiltersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder> + getOptionalRelationshipFiltersFieldBuilder() { + if (optionalRelationshipFiltersBuilder_ == null) { + optionalRelationshipFiltersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.RelationshipFilter, com.authzed.api.v1.RelationshipFilter.Builder, com.authzed.api.v1.RelationshipFilterOrBuilder>( + optionalRelationshipFilters_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + optionalRelationshipFilters_ = null; + } + return optionalRelationshipFiltersBuilder_; + } + @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.WatchRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.WatchRequest) + private static final com.authzed.api.v1.WatchRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.WatchRequest(); + } + + public static com.authzed.api.v1.WatchRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WatchRequest 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.WatchRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/WatchRequestOrBuilder.java b/generated/com/authzed/api/v1/WatchRequestOrBuilder.java new file mode 100644 index 00000000..cc154b4b --- /dev/null +++ b/generated/com/authzed/api/v1/WatchRequestOrBuilder.java @@ -0,0 +1,167 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/watch_service.proto + +package com.authzed.api.v1; + +public interface WatchRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.WatchRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * optional_object_types is a filter of resource object types to watch for changes.
+   * If specified, only changes to the specified object types will be returned and
+   * optional_relationship_filters cannot be used.
+   * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @return A list containing the optionalObjectTypes. + */ + java.util.List + getOptionalObjectTypesList(); + /** + *
+   * optional_object_types is a filter of resource object types to watch for changes.
+   * If specified, only changes to the specified object types will be returned and
+   * optional_relationship_filters cannot be used.
+   * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @return The count of optionalObjectTypes. + */ + int getOptionalObjectTypesCount(); + /** + *
+   * optional_object_types is a filter of resource object types to watch for changes.
+   * If specified, only changes to the specified object types will be returned and
+   * optional_relationship_filters cannot be used.
+   * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @param index The index of the element to return. + * @return The optionalObjectTypes at the given index. + */ + java.lang.String getOptionalObjectTypes(int index); + /** + *
+   * optional_object_types is a filter of resource object types to watch for changes.
+   * If specified, only changes to the specified object types will be returned and
+   * optional_relationship_filters cannot be used.
+   * 
+ * + * repeated string optional_object_types = 1 [json_name = "optionalObjectTypes", (.validate.rules) = { ... } + * @param index The index of the value to return. + * @return The bytes of the optionalObjectTypes at the given index. + */ + com.google.protobuf.ByteString + getOptionalObjectTypesBytes(int index); + + /** + *
+   * optional_start_cursor is the ZedToken holding the point-in-time at
+   * which to start watching for changes.
+   * If not specified, the watch will begin at the current head revision
+   * of the datastore, returning any updates that occur after the caller
+   * makes the request.
+   * Note that if this cursor references a point-in-time containing data
+   * that has been garbage collected, an error will be returned.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + * @return Whether the optionalStartCursor field is set. + */ + boolean hasOptionalStartCursor(); + /** + *
+   * optional_start_cursor is the ZedToken holding the point-in-time at
+   * which to start watching for changes.
+   * If not specified, the watch will begin at the current head revision
+   * of the datastore, returning any updates that occur after the caller
+   * makes the request.
+   * Note that if this cursor references a point-in-time containing data
+   * that has been garbage collected, an error will be returned.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + * @return The optionalStartCursor. + */ + com.authzed.api.v1.ZedToken getOptionalStartCursor(); + /** + *
+   * optional_start_cursor is the ZedToken holding the point-in-time at
+   * which to start watching for changes.
+   * If not specified, the watch will begin at the current head revision
+   * of the datastore, returning any updates that occur after the caller
+   * makes the request.
+   * Note that if this cursor references a point-in-time containing data
+   * that has been garbage collected, an error will be returned.
+   * 
+ * + * .authzed.api.v1.ZedToken optional_start_cursor = 2 [json_name = "optionalStartCursor"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartCursorOrBuilder(); + + /** + *
+   * optional_relationship_filters, if specified, indicates the
+   * filter(s) to apply to each relationship to be returned by watch.
+   * The relationship will be returned as long as at least one filter matches,
+   * this allows clients to match relationships on multiple filters on a single watch call.
+   * If specified, optional_object_types cannot be used.
+   * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + java.util.List + getOptionalRelationshipFiltersList(); + /** + *
+   * optional_relationship_filters, if specified, indicates the
+   * filter(s) to apply to each relationship to be returned by watch.
+   * The relationship will be returned as long as at least one filter matches,
+   * this allows clients to match relationships on multiple filters on a single watch call.
+   * If specified, optional_object_types cannot be used.
+   * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + com.authzed.api.v1.RelationshipFilter getOptionalRelationshipFilters(int index); + /** + *
+   * optional_relationship_filters, if specified, indicates the
+   * filter(s) to apply to each relationship to be returned by watch.
+   * The relationship will be returned as long as at least one filter matches,
+   * this allows clients to match relationships on multiple filters on a single watch call.
+   * If specified, optional_object_types cannot be used.
+   * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + int getOptionalRelationshipFiltersCount(); + /** + *
+   * optional_relationship_filters, if specified, indicates the
+   * filter(s) to apply to each relationship to be returned by watch.
+   * The relationship will be returned as long as at least one filter matches,
+   * this allows clients to match relationships on multiple filters on a single watch call.
+   * If specified, optional_object_types cannot be used.
+   * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + java.util.List + getOptionalRelationshipFiltersOrBuilderList(); + /** + *
+   * optional_relationship_filters, if specified, indicates the
+   * filter(s) to apply to each relationship to be returned by watch.
+   * The relationship will be returned as long as at least one filter matches,
+   * this allows clients to match relationships on multiple filters on a single watch call.
+   * If specified, optional_object_types cannot be used.
+   * 
+ * + * repeated .authzed.api.v1.RelationshipFilter optional_relationship_filters = 3 [json_name = "optionalRelationshipFilters"]; + */ + com.authzed.api.v1.RelationshipFilterOrBuilder getOptionalRelationshipFiltersOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/WatchResponse.java b/generated/com/authzed/api/v1/WatchResponse.java new file mode 100644 index 00000000..04c1a9d5 --- /dev/null +++ b/generated/com/authzed/api/v1/WatchResponse.java @@ -0,0 +1,957 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/watch_service.proto + +package com.authzed.api.v1; + +/** + *
+ * WatchResponse contains all tuple modification events in ascending
+ * timestamp order, from the requested start snapshot to a snapshot
+ * encoded in the watch response. The client can use the snapshot to resume
+ * watching where the previous watch response left off.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.WatchResponse} + */ +public final class WatchResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.WatchResponse) + WatchResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use WatchResponse.newBuilder() to construct. + private WatchResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WatchResponse() { + updates_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WatchResponse(); + } + + @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.WatchServiceOuterClass.internal_static_authzed_api_v1_WatchResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.WatchServiceOuterClass.internal_static_authzed_api_v1_WatchResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WatchResponse.class, com.authzed.api.v1.WatchResponse.Builder.class); + } + + public static final int UPDATES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List updates_; + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + @java.lang.Override + public java.util.List getUpdatesList() { + return updates_; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + @java.lang.Override + public java.util.List + getUpdatesOrBuilderList() { + return updates_; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + @java.lang.Override + public int getUpdatesCount() { + return updates_.size(); + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipUpdate getUpdates(int index) { + return updates_.get(index); + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipUpdateOrBuilder getUpdatesOrBuilder( + int index) { + return updates_.get(index); + } + + public static final int CHANGES_THROUGH_FIELD_NUMBER = 2; + private com.authzed.api.v1.ZedToken changesThrough_; + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return Whether the changesThrough field is set. + */ + @java.lang.Override + public boolean hasChangesThrough() { + return changesThrough_ != null; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return The changesThrough. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getChangesThrough() { + return changesThrough_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : changesThrough_; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getChangesThroughOrBuilder() { + return changesThrough_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : changesThrough_; + } + + 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 < updates_.size(); i++) { + output.writeMessage(1, updates_.get(i)); + } + if (changesThrough_ != null) { + output.writeMessage(2, getChangesThrough()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < updates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, updates_.get(i)); + } + if (changesThrough_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getChangesThrough()); + } + 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.WatchResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.WatchResponse other = (com.authzed.api.v1.WatchResponse) obj; + + if (!getUpdatesList() + .equals(other.getUpdatesList())) return false; + if (hasChangesThrough() != other.hasChangesThrough()) return false; + if (hasChangesThrough()) { + if (!getChangesThrough() + .equals(other.getChangesThrough())) 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 (getUpdatesCount() > 0) { + hash = (37 * hash) + UPDATES_FIELD_NUMBER; + hash = (53 * hash) + getUpdatesList().hashCode(); + } + if (hasChangesThrough()) { + hash = (37 * hash) + CHANGES_THROUGH_FIELD_NUMBER; + hash = (53 * hash) + getChangesThrough().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.WatchResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WatchResponse 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.WatchResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WatchResponse 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.WatchResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WatchResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.WatchResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WatchResponse 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.WatchResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WatchResponse 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.WatchResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WatchResponse 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.WatchResponse 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; + } + /** + *
+   * WatchResponse contains all tuple modification events in ascending
+   * timestamp order, from the requested start snapshot to a snapshot
+   * encoded in the watch response. The client can use the snapshot to resume
+   * watching where the previous watch response left off.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.WatchResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.WatchResponse) + com.authzed.api.v1.WatchResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.WatchServiceOuterClass.internal_static_authzed_api_v1_WatchResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.WatchServiceOuterClass.internal_static_authzed_api_v1_WatchResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WatchResponse.class, com.authzed.api.v1.WatchResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.WatchResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (updatesBuilder_ == null) { + updates_ = java.util.Collections.emptyList(); + } else { + updates_ = null; + updatesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + changesThrough_ = null; + if (changesThroughBuilder_ != null) { + changesThroughBuilder_.dispose(); + changesThroughBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.WatchServiceOuterClass.internal_static_authzed_api_v1_WatchResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.WatchResponse getDefaultInstanceForType() { + return com.authzed.api.v1.WatchResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.WatchResponse build() { + com.authzed.api.v1.WatchResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.WatchResponse buildPartial() { + com.authzed.api.v1.WatchResponse result = new com.authzed.api.v1.WatchResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.WatchResponse result) { + if (updatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + updates_ = java.util.Collections.unmodifiableList(updates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.updates_ = updates_; + } else { + result.updates_ = updatesBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.WatchResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.changesThrough_ = changesThroughBuilder_ == null + ? changesThrough_ + : changesThroughBuilder_.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.WatchResponse) { + return mergeFrom((com.authzed.api.v1.WatchResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.WatchResponse other) { + if (other == com.authzed.api.v1.WatchResponse.getDefaultInstance()) return this; + if (updatesBuilder_ == null) { + if (!other.updates_.isEmpty()) { + if (updates_.isEmpty()) { + updates_ = other.updates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUpdatesIsMutable(); + updates_.addAll(other.updates_); + } + onChanged(); + } + } else { + if (!other.updates_.isEmpty()) { + if (updatesBuilder_.isEmpty()) { + updatesBuilder_.dispose(); + updatesBuilder_ = null; + updates_ = other.updates_; + bitField0_ = (bitField0_ & ~0x00000001); + updatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUpdatesFieldBuilder() : null; + } else { + updatesBuilder_.addAllMessages(other.updates_); + } + } + } + if (other.hasChangesThrough()) { + mergeChangesThrough(other.getChangesThrough()); + } + 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.RelationshipUpdate m = + input.readMessage( + com.authzed.api.v1.RelationshipUpdate.parser(), + extensionRegistry); + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(m); + } else { + updatesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + getChangesThroughFieldBuilder().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.util.List updates_ = + java.util.Collections.emptyList(); + private void ensureUpdatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + updates_ = new java.util.ArrayList(updates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.RelationshipUpdate, com.authzed.api.v1.RelationshipUpdate.Builder, com.authzed.api.v1.RelationshipUpdateOrBuilder> updatesBuilder_; + + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public java.util.List getUpdatesList() { + if (updatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(updates_); + } else { + return updatesBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public int getUpdatesCount() { + if (updatesBuilder_ == null) { + return updates_.size(); + } else { + return updatesBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public com.authzed.api.v1.RelationshipUpdate getUpdates(int index) { + if (updatesBuilder_ == null) { + return updates_.get(index); + } else { + return updatesBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public Builder setUpdates( + int index, com.authzed.api.v1.RelationshipUpdate value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.set(index, value); + onChanged(); + } else { + updatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public Builder setUpdates( + int index, com.authzed.api.v1.RelationshipUpdate.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.set(index, builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public Builder addUpdates(com.authzed.api.v1.RelationshipUpdate value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.add(value); + onChanged(); + } else { + updatesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public Builder addUpdates( + int index, com.authzed.api.v1.RelationshipUpdate value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.add(index, value); + onChanged(); + } else { + updatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public Builder addUpdates( + com.authzed.api.v1.RelationshipUpdate.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public Builder addUpdates( + int index, com.authzed.api.v1.RelationshipUpdate.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(index, builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public Builder addAllUpdates( + java.lang.Iterable values) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, updates_); + onChanged(); + } else { + updatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public Builder clearUpdates() { + if (updatesBuilder_ == null) { + updates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + updatesBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public Builder removeUpdates(int index) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.remove(index); + onChanged(); + } else { + updatesBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public com.authzed.api.v1.RelationshipUpdate.Builder getUpdatesBuilder( + int index) { + return getUpdatesFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public com.authzed.api.v1.RelationshipUpdateOrBuilder getUpdatesOrBuilder( + int index) { + if (updatesBuilder_ == null) { + return updates_.get(index); } else { + return updatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public java.util.List + getUpdatesOrBuilderList() { + if (updatesBuilder_ != null) { + return updatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(updates_); + } + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public com.authzed.api.v1.RelationshipUpdate.Builder addUpdatesBuilder() { + return getUpdatesFieldBuilder().addBuilder( + com.authzed.api.v1.RelationshipUpdate.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public com.authzed.api.v1.RelationshipUpdate.Builder addUpdatesBuilder( + int index) { + return getUpdatesFieldBuilder().addBuilder( + index, com.authzed.api.v1.RelationshipUpdate.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + public java.util.List + getUpdatesBuilderList() { + return getUpdatesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.RelationshipUpdate, com.authzed.api.v1.RelationshipUpdate.Builder, com.authzed.api.v1.RelationshipUpdateOrBuilder> + getUpdatesFieldBuilder() { + if (updatesBuilder_ == null) { + updatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.RelationshipUpdate, com.authzed.api.v1.RelationshipUpdate.Builder, com.authzed.api.v1.RelationshipUpdateOrBuilder>( + updates_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + updates_ = null; + } + return updatesBuilder_; + } + + private com.authzed.api.v1.ZedToken changesThrough_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> changesThroughBuilder_; + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return Whether the changesThrough field is set. + */ + public boolean hasChangesThrough() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return The changesThrough. + */ + public com.authzed.api.v1.ZedToken getChangesThrough() { + if (changesThroughBuilder_ == null) { + return changesThrough_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : changesThrough_; + } else { + return changesThroughBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public Builder setChangesThrough(com.authzed.api.v1.ZedToken value) { + if (changesThroughBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + changesThrough_ = value; + } else { + changesThroughBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public Builder setChangesThrough( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (changesThroughBuilder_ == null) { + changesThrough_ = builderForValue.build(); + } else { + changesThroughBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public Builder mergeChangesThrough(com.authzed.api.v1.ZedToken value) { + if (changesThroughBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + changesThrough_ != null && + changesThrough_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getChangesThroughBuilder().mergeFrom(value); + } else { + changesThrough_ = value; + } + } else { + changesThroughBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public Builder clearChangesThrough() { + bitField0_ = (bitField0_ & ~0x00000002); + changesThrough_ = null; + if (changesThroughBuilder_ != null) { + changesThroughBuilder_.dispose(); + changesThroughBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public com.authzed.api.v1.ZedToken.Builder getChangesThroughBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getChangesThroughFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getChangesThroughOrBuilder() { + if (changesThroughBuilder_ != null) { + return changesThroughBuilder_.getMessageOrBuilder(); + } else { + return changesThrough_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : changesThrough_; + } + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getChangesThroughFieldBuilder() { + if (changesThroughBuilder_ == null) { + changesThroughBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getChangesThrough(), + getParentForChildren(), + isClean()); + changesThrough_ = null; + } + return changesThroughBuilder_; + } + @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.WatchResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.WatchResponse) + private static final com.authzed.api.v1.WatchResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.WatchResponse(); + } + + public static com.authzed.api.v1.WatchResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WatchResponse 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.WatchResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/WatchResponseOrBuilder.java b/generated/com/authzed/api/v1/WatchResponseOrBuilder.java new file mode 100644 index 00000000..ead0e8a9 --- /dev/null +++ b/generated/com/authzed/api/v1/WatchResponseOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/watch_service.proto + +package com.authzed.api.v1; + +public interface WatchResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.WatchResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + java.util.List + getUpdatesList(); + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + com.authzed.api.v1.RelationshipUpdate getUpdates(int index); + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + int getUpdatesCount(); + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + java.util.List + getUpdatesOrBuilderList(); + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates"]; + */ + com.authzed.api.v1.RelationshipUpdateOrBuilder getUpdatesOrBuilder( + int index); + + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return Whether the changesThrough field is set. + */ + boolean hasChangesThrough(); + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return The changesThrough. + */ + com.authzed.api.v1.ZedToken getChangesThrough(); + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getChangesThroughOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/WatchServiceGrpc.java b/generated/com/authzed/api/v1/WatchServiceGrpc.java new file mode 100644 index 00000000..24e6438d --- /dev/null +++ b/generated/com/authzed/api/v1/WatchServiceGrpc.java @@ -0,0 +1,286 @@ +package com.authzed.api.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: authzed/api/v1/watch_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class WatchServiceGrpc { + + private WatchServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "authzed.api.v1.WatchService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getWatchMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Watch", + requestType = com.authzed.api.v1.WatchRequest.class, + responseType = com.authzed.api.v1.WatchResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getWatchMethod() { + io.grpc.MethodDescriptor getWatchMethod; + if ((getWatchMethod = WatchServiceGrpc.getWatchMethod) == null) { + synchronized (WatchServiceGrpc.class) { + if ((getWatchMethod = WatchServiceGrpc.getWatchMethod) == null) { + WatchServiceGrpc.getWatchMethod = getWatchMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Watch")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.WatchRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1.WatchResponse.getDefaultInstance())) + .setSchemaDescriptor(new WatchServiceMethodDescriptorSupplier("Watch")) + .build(); + } + } + } + return getWatchMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static WatchServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchServiceStub(channel, callOptions); + } + }; + return WatchServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static WatchServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchServiceBlockingStub(channel, callOptions); + } + }; + return WatchServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static WatchServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchServiceFutureStub(channel, callOptions); + } + }; + return WatchServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public interface AsyncService { + + /** + */ + default void watch(com.authzed.api.v1.WatchRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWatchMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service WatchService. + */ + public static abstract class WatchServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return WatchServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service WatchService. + */ + public static final class WatchServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private WatchServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchServiceStub(channel, callOptions); + } + + /** + */ + public void watch(com.authzed.api.v1.WatchRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getWatchMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service WatchService. + */ + public static final class WatchServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private WatchServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchServiceBlockingStub(channel, callOptions); + } + + /** + */ + public java.util.Iterator watch( + com.authzed.api.v1.WatchRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getWatchMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service WatchService. + */ + public static final class WatchServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private WatchServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_WATCH = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_WATCH: + serviceImpl.watch((com.authzed.api.v1.WatchRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getWatchMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.authzed.api.v1.WatchRequest, + com.authzed.api.v1.WatchResponse>( + service, METHODID_WATCH))) + .build(); + } + + private static abstract class WatchServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + WatchServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.authzed.api.v1.WatchServiceOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("WatchService"); + } + } + + private static final class WatchServiceFileDescriptorSupplier + extends WatchServiceBaseDescriptorSupplier { + WatchServiceFileDescriptorSupplier() {} + } + + private static final class WatchServiceMethodDescriptorSupplier + extends WatchServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + WatchServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (WatchServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new WatchServiceFileDescriptorSupplier()) + .addMethod(getWatchMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/generated/com/authzed/api/v1/WatchServiceOuterClass.java b/generated/com/authzed/api/v1/WatchServiceOuterClass.java new file mode 100644 index 00000000..4e5c2887 --- /dev/null +++ b/generated/com/authzed/api/v1/WatchServiceOuterClass.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/watch_service.proto + +package com.authzed.api.v1; + +public final class WatchServiceOuterClass { + private WatchServiceOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_WatchRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_WatchRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1_WatchResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1_WatchResponse_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\"authzed/api/v1/watch_service.proto\022\016au" + + "thzed.api.v1\032\034google/api/annotations.pro" + + "to\032\027validate/validate.proto\032\031authzed/api" + + "/v1/core.proto\032\'authzed/api/v1/permissio" + + "n_service.proto\"\312\002\n\014WatchRequest\022\203\001\n\025opt" + + "ional_object_types\030\001 \003(\tBO\372BL\222\001I\010\000\"ErC(\200" + + "\0012>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z" + + "][a-z0-9_]{1,62}[a-z0-9]$R\023optionalObjec" + + "tTypes\022L\n\025optional_start_cursor\030\002 \001(\0132\030." + + "authzed.api.v1.ZedTokenR\023optionalStartCu" + + "rsor\022f\n\035optional_relationship_filters\030\003 " + + "\003(\0132\".authzed.api.v1.RelationshipFilterR" + + "\033optionalRelationshipFilters\"\220\001\n\rWatchRe" + + "sponse\022<\n\007updates\030\001 \003(\0132\".authzed.api.v1" + + ".RelationshipUpdateR\007updates\022A\n\017changes_" + + "through\030\002 \001(\0132\030.authzed.api.v1.ZedTokenR" + + "\016changesThrough2l\n\014WatchService\022\\\n\005Watch" + + "\022\034.authzed.api.v1.WatchRequest\032\035.authzed" + + ".api.v1.WatchResponse\"\024\202\323\344\223\002\016:\001*\"\t/v1/wa" + + "tch0\001BJ\n\022com.authzed.api.v1P\001Z2github.co" + + "m/authzed/authzed-go/proto/authzed/api/v" + + "1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + io.envoyproxy.pgv.validate.Validate.getDescriptor(), + com.authzed.api.v1.Core.getDescriptor(), + com.authzed.api.v1.PermissionService.getDescriptor(), + }); + internal_static_authzed_api_v1_WatchRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_v1_WatchRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_WatchRequest_descriptor, + new java.lang.String[] { "OptionalObjectTypes", "OptionalStartCursor", "OptionalRelationshipFilters", }); + internal_static_authzed_api_v1_WatchResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_v1_WatchResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1_WatchResponse_descriptor, + new java.lang.String[] { "Updates", "ChangesThrough", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(io.envoyproxy.pgv.validate.Validate.rules); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + io.envoyproxy.pgv.validate.Validate.getDescriptor(); + com.authzed.api.v1.Core.getDescriptor(); + com.authzed.api.v1.PermissionService.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/v1/WriteRelationshipsRequest.java b/generated/com/authzed/api/v1/WriteRelationshipsRequest.java new file mode 100644 index 00000000..8a120e77 --- /dev/null +++ b/generated/com/authzed/api/v1/WriteRelationshipsRequest.java @@ -0,0 +1,1218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + *
+ * WriteRelationshipsRequest contains a list of Relationship mutations that
+ * should be applied to the service. If the optional_preconditions parameter
+ * is included, all of the specified preconditions must also be satisfied before
+ * the write will be committed.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.WriteRelationshipsRequest} + */ +public final class WriteRelationshipsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.WriteRelationshipsRequest) + WriteRelationshipsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use WriteRelationshipsRequest.newBuilder() to construct. + private WriteRelationshipsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WriteRelationshipsRequest() { + updates_ = java.util.Collections.emptyList(); + optionalPreconditions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WriteRelationshipsRequest(); + } + + @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.PermissionService.internal_static_authzed_api_v1_WriteRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_WriteRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WriteRelationshipsRequest.class, com.authzed.api.v1.WriteRelationshipsRequest.Builder.class); + } + + public static final int UPDATES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List updates_; + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List getUpdatesList() { + return updates_; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List + getUpdatesOrBuilderList() { + return updates_; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + @java.lang.Override + public int getUpdatesCount() { + return updates_.size(); + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipUpdate getUpdates(int index) { + return updates_.get(index); + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.RelationshipUpdateOrBuilder getUpdatesOrBuilder( + int index) { + return updates_.get(index); + } + + public static final int OPTIONAL_PRECONDITIONS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List optionalPreconditions_; + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List getOptionalPreconditionsList() { + return optionalPreconditions_; + } + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + @java.lang.Override + public java.util.List + getOptionalPreconditionsOrBuilderList() { + return optionalPreconditions_; + } + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + @java.lang.Override + public int getOptionalPreconditionsCount() { + return optionalPreconditions_.size(); + } + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.Precondition getOptionalPreconditions(int index) { + return optionalPreconditions_.get(index); + } + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.PreconditionOrBuilder getOptionalPreconditionsOrBuilder( + int index) { + return optionalPreconditions_.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 < updates_.size(); i++) { + output.writeMessage(1, updates_.get(i)); + } + for (int i = 0; i < optionalPreconditions_.size(); i++) { + output.writeMessage(2, optionalPreconditions_.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 < updates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, updates_.get(i)); + } + for (int i = 0; i < optionalPreconditions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, optionalPreconditions_.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.WriteRelationshipsRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.WriteRelationshipsRequest other = (com.authzed.api.v1.WriteRelationshipsRequest) obj; + + if (!getUpdatesList() + .equals(other.getUpdatesList())) return false; + if (!getOptionalPreconditionsList() + .equals(other.getOptionalPreconditionsList())) 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 (getUpdatesCount() > 0) { + hash = (37 * hash) + UPDATES_FIELD_NUMBER; + hash = (53 * hash) + getUpdatesList().hashCode(); + } + if (getOptionalPreconditionsCount() > 0) { + hash = (37 * hash) + OPTIONAL_PRECONDITIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptionalPreconditionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.WriteRelationshipsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteRelationshipsRequest 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.WriteRelationshipsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteRelationshipsRequest 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.WriteRelationshipsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteRelationshipsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.WriteRelationshipsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteRelationshipsRequest 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.WriteRelationshipsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteRelationshipsRequest 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.WriteRelationshipsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteRelationshipsRequest 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.WriteRelationshipsRequest 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; + } + /** + *
+   * WriteRelationshipsRequest contains a list of Relationship mutations that
+   * should be applied to the service. If the optional_preconditions parameter
+   * is included, all of the specified preconditions must also be satisfied before
+   * the write will be committed.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.WriteRelationshipsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.WriteRelationshipsRequest) + com.authzed.api.v1.WriteRelationshipsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_WriteRelationshipsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_WriteRelationshipsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WriteRelationshipsRequest.class, com.authzed.api.v1.WriteRelationshipsRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.WriteRelationshipsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (updatesBuilder_ == null) { + updates_ = java.util.Collections.emptyList(); + } else { + updates_ = null; + updatesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (optionalPreconditionsBuilder_ == null) { + optionalPreconditions_ = java.util.Collections.emptyList(); + } else { + optionalPreconditions_ = null; + optionalPreconditionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_WriteRelationshipsRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.WriteRelationshipsRequest getDefaultInstanceForType() { + return com.authzed.api.v1.WriteRelationshipsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.WriteRelationshipsRequest build() { + com.authzed.api.v1.WriteRelationshipsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.WriteRelationshipsRequest buildPartial() { + com.authzed.api.v1.WriteRelationshipsRequest result = new com.authzed.api.v1.WriteRelationshipsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1.WriteRelationshipsRequest result) { + if (updatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + updates_ = java.util.Collections.unmodifiableList(updates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.updates_ = updates_; + } else { + result.updates_ = updatesBuilder_.build(); + } + if (optionalPreconditionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + optionalPreconditions_ = java.util.Collections.unmodifiableList(optionalPreconditions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.optionalPreconditions_ = optionalPreconditions_; + } else { + result.optionalPreconditions_ = optionalPreconditionsBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1.WriteRelationshipsRequest 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.WriteRelationshipsRequest) { + return mergeFrom((com.authzed.api.v1.WriteRelationshipsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.WriteRelationshipsRequest other) { + if (other == com.authzed.api.v1.WriteRelationshipsRequest.getDefaultInstance()) return this; + if (updatesBuilder_ == null) { + if (!other.updates_.isEmpty()) { + if (updates_.isEmpty()) { + updates_ = other.updates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUpdatesIsMutable(); + updates_.addAll(other.updates_); + } + onChanged(); + } + } else { + if (!other.updates_.isEmpty()) { + if (updatesBuilder_.isEmpty()) { + updatesBuilder_.dispose(); + updatesBuilder_ = null; + updates_ = other.updates_; + bitField0_ = (bitField0_ & ~0x00000001); + updatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUpdatesFieldBuilder() : null; + } else { + updatesBuilder_.addAllMessages(other.updates_); + } + } + } + if (optionalPreconditionsBuilder_ == null) { + if (!other.optionalPreconditions_.isEmpty()) { + if (optionalPreconditions_.isEmpty()) { + optionalPreconditions_ = other.optionalPreconditions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.addAll(other.optionalPreconditions_); + } + onChanged(); + } + } else { + if (!other.optionalPreconditions_.isEmpty()) { + if (optionalPreconditionsBuilder_.isEmpty()) { + optionalPreconditionsBuilder_.dispose(); + optionalPreconditionsBuilder_ = null; + optionalPreconditions_ = other.optionalPreconditions_; + bitField0_ = (bitField0_ & ~0x00000002); + optionalPreconditionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOptionalPreconditionsFieldBuilder() : null; + } else { + optionalPreconditionsBuilder_.addAllMessages(other.optionalPreconditions_); + } + } + } + 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.RelationshipUpdate m = + input.readMessage( + com.authzed.api.v1.RelationshipUpdate.parser(), + extensionRegistry); + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(m); + } else { + updatesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.authzed.api.v1.Precondition m = + input.readMessage( + com.authzed.api.v1.Precondition.parser(), + extensionRegistry); + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.add(m); + } else { + optionalPreconditionsBuilder_.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 java.util.List updates_ = + java.util.Collections.emptyList(); + private void ensureUpdatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + updates_ = new java.util.ArrayList(updates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.RelationshipUpdate, com.authzed.api.v1.RelationshipUpdate.Builder, com.authzed.api.v1.RelationshipUpdateOrBuilder> updatesBuilder_; + + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public java.util.List getUpdatesList() { + if (updatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(updates_); + } else { + return updatesBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public int getUpdatesCount() { + if (updatesBuilder_ == null) { + return updates_.size(); + } else { + return updatesBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipUpdate getUpdates(int index) { + if (updatesBuilder_ == null) { + return updates_.get(index); + } else { + return updatesBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public Builder setUpdates( + int index, com.authzed.api.v1.RelationshipUpdate value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.set(index, value); + onChanged(); + } else { + updatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public Builder setUpdates( + int index, com.authzed.api.v1.RelationshipUpdate.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.set(index, builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public Builder addUpdates(com.authzed.api.v1.RelationshipUpdate value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.add(value); + onChanged(); + } else { + updatesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public Builder addUpdates( + int index, com.authzed.api.v1.RelationshipUpdate value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.add(index, value); + onChanged(); + } else { + updatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public Builder addUpdates( + com.authzed.api.v1.RelationshipUpdate.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public Builder addUpdates( + int index, com.authzed.api.v1.RelationshipUpdate.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(index, builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public Builder addAllUpdates( + java.lang.Iterable values) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, updates_); + onChanged(); + } else { + updatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public Builder clearUpdates() { + if (updatesBuilder_ == null) { + updates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + updatesBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public Builder removeUpdates(int index) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.remove(index); + onChanged(); + } else { + updatesBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipUpdate.Builder getUpdatesBuilder( + int index) { + return getUpdatesFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipUpdateOrBuilder getUpdatesOrBuilder( + int index) { + if (updatesBuilder_ == null) { + return updates_.get(index); } else { + return updatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public java.util.List + getUpdatesOrBuilderList() { + if (updatesBuilder_ != null) { + return updatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(updates_); + } + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipUpdate.Builder addUpdatesBuilder() { + return getUpdatesFieldBuilder().addBuilder( + com.authzed.api.v1.RelationshipUpdate.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.RelationshipUpdate.Builder addUpdatesBuilder( + int index) { + return getUpdatesFieldBuilder().addBuilder( + index, com.authzed.api.v1.RelationshipUpdate.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + public java.util.List + getUpdatesBuilderList() { + return getUpdatesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.RelationshipUpdate, com.authzed.api.v1.RelationshipUpdate.Builder, com.authzed.api.v1.RelationshipUpdateOrBuilder> + getUpdatesFieldBuilder() { + if (updatesBuilder_ == null) { + updatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.RelationshipUpdate, com.authzed.api.v1.RelationshipUpdate.Builder, com.authzed.api.v1.RelationshipUpdateOrBuilder>( + updates_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + updates_ = null; + } + return updatesBuilder_; + } + + private java.util.List optionalPreconditions_ = + java.util.Collections.emptyList(); + private void ensureOptionalPreconditionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + optionalPreconditions_ = new java.util.ArrayList(optionalPreconditions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Precondition, com.authzed.api.v1.Precondition.Builder, com.authzed.api.v1.PreconditionOrBuilder> optionalPreconditionsBuilder_; + + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public java.util.List getOptionalPreconditionsList() { + if (optionalPreconditionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(optionalPreconditions_); + } else { + return optionalPreconditionsBuilder_.getMessageList(); + } + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public int getOptionalPreconditionsCount() { + if (optionalPreconditionsBuilder_ == null) { + return optionalPreconditions_.size(); + } else { + return optionalPreconditionsBuilder_.getCount(); + } + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Precondition getOptionalPreconditions(int index) { + if (optionalPreconditionsBuilder_ == null) { + return optionalPreconditions_.get(index); + } else { + return optionalPreconditionsBuilder_.getMessage(index); + } + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder setOptionalPreconditions( + int index, com.authzed.api.v1.Precondition value) { + if (optionalPreconditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.set(index, value); + onChanged(); + } else { + optionalPreconditionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder setOptionalPreconditions( + int index, com.authzed.api.v1.Precondition.Builder builderForValue) { + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.set(index, builderForValue.build()); + onChanged(); + } else { + optionalPreconditionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder addOptionalPreconditions(com.authzed.api.v1.Precondition value) { + if (optionalPreconditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.add(value); + onChanged(); + } else { + optionalPreconditionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder addOptionalPreconditions( + int index, com.authzed.api.v1.Precondition value) { + if (optionalPreconditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.add(index, value); + onChanged(); + } else { + optionalPreconditionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder addOptionalPreconditions( + com.authzed.api.v1.Precondition.Builder builderForValue) { + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.add(builderForValue.build()); + onChanged(); + } else { + optionalPreconditionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder addOptionalPreconditions( + int index, com.authzed.api.v1.Precondition.Builder builderForValue) { + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.add(index, builderForValue.build()); + onChanged(); + } else { + optionalPreconditionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder addAllOptionalPreconditions( + java.lang.Iterable values) { + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, optionalPreconditions_); + onChanged(); + } else { + optionalPreconditionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder clearOptionalPreconditions() { + if (optionalPreconditionsBuilder_ == null) { + optionalPreconditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + optionalPreconditionsBuilder_.clear(); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public Builder removeOptionalPreconditions(int index) { + if (optionalPreconditionsBuilder_ == null) { + ensureOptionalPreconditionsIsMutable(); + optionalPreconditions_.remove(index); + onChanged(); + } else { + optionalPreconditionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Precondition.Builder getOptionalPreconditionsBuilder( + int index) { + return getOptionalPreconditionsFieldBuilder().getBuilder(index); + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.PreconditionOrBuilder getOptionalPreconditionsOrBuilder( + int index) { + if (optionalPreconditionsBuilder_ == null) { + return optionalPreconditions_.get(index); } else { + return optionalPreconditionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public java.util.List + getOptionalPreconditionsOrBuilderList() { + if (optionalPreconditionsBuilder_ != null) { + return optionalPreconditionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(optionalPreconditions_); + } + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Precondition.Builder addOptionalPreconditionsBuilder() { + return getOptionalPreconditionsFieldBuilder().addBuilder( + com.authzed.api.v1.Precondition.getDefaultInstance()); + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.Precondition.Builder addOptionalPreconditionsBuilder( + int index) { + return getOptionalPreconditionsFieldBuilder().addBuilder( + index, com.authzed.api.v1.Precondition.getDefaultInstance()); + } + /** + *
+     * To be bounded by configuration
+     * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + public java.util.List + getOptionalPreconditionsBuilderList() { + return getOptionalPreconditionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Precondition, com.authzed.api.v1.Precondition.Builder, com.authzed.api.v1.PreconditionOrBuilder> + getOptionalPreconditionsFieldBuilder() { + if (optionalPreconditionsBuilder_ == null) { + optionalPreconditionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1.Precondition, com.authzed.api.v1.Precondition.Builder, com.authzed.api.v1.PreconditionOrBuilder>( + optionalPreconditions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + optionalPreconditions_ = null; + } + return optionalPreconditionsBuilder_; + } + @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.WriteRelationshipsRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.WriteRelationshipsRequest) + private static final com.authzed.api.v1.WriteRelationshipsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.WriteRelationshipsRequest(); + } + + public static com.authzed.api.v1.WriteRelationshipsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteRelationshipsRequest 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.WriteRelationshipsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/WriteRelationshipsRequestOrBuilder.java b/generated/com/authzed/api/v1/WriteRelationshipsRequestOrBuilder.java new file mode 100644 index 00000000..67cd112d --- /dev/null +++ b/generated/com/authzed/api/v1/WriteRelationshipsRequestOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface WriteRelationshipsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.WriteRelationshipsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + java.util.List + getUpdatesList(); + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + com.authzed.api.v1.RelationshipUpdate getUpdates(int index); + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + int getUpdatesCount(); + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + java.util.List + getUpdatesOrBuilderList(); + /** + * repeated .authzed.api.v1.RelationshipUpdate updates = 1 [json_name = "updates", (.validate.rules) = { ... } + */ + com.authzed.api.v1.RelationshipUpdateOrBuilder getUpdatesOrBuilder( + int index); + + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + java.util.List + getOptionalPreconditionsList(); + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + com.authzed.api.v1.Precondition getOptionalPreconditions(int index); + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + int getOptionalPreconditionsCount(); + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + java.util.List + getOptionalPreconditionsOrBuilderList(); + /** + *
+   * To be bounded by configuration
+   * 
+ * + * repeated .authzed.api.v1.Precondition optional_preconditions = 2 [json_name = "optionalPreconditions", (.validate.rules) = { ... } + */ + com.authzed.api.v1.PreconditionOrBuilder getOptionalPreconditionsOrBuilder( + int index); +} diff --git a/generated/com/authzed/api/v1/WriteRelationshipsResponse.java b/generated/com/authzed/api/v1/WriteRelationshipsResponse.java new file mode 100644 index 00000000..b86338be --- /dev/null +++ b/generated/com/authzed/api/v1/WriteRelationshipsResponse.java @@ -0,0 +1,589 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +/** + * Protobuf type {@code authzed.api.v1.WriteRelationshipsResponse} + */ +public final class WriteRelationshipsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.WriteRelationshipsResponse) + WriteRelationshipsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use WriteRelationshipsResponse.newBuilder() to construct. + private WriteRelationshipsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WriteRelationshipsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WriteRelationshipsResponse(); + } + + @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.PermissionService.internal_static_authzed_api_v1_WriteRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_WriteRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WriteRelationshipsResponse.class, com.authzed.api.v1.WriteRelationshipsResponse.Builder.class); + } + + public static final int WRITTEN_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken writtenAt_; + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + * @return Whether the writtenAt field is set. + */ + @java.lang.Override + public boolean hasWrittenAt() { + return writtenAt_ != null; + } + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + * @return The writtenAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getWrittenAt() { + return writtenAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : writtenAt_; + } + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getWrittenAtOrBuilder() { + return writtenAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : writtenAt_; + } + + 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 (writtenAt_ != null) { + output.writeMessage(1, getWrittenAt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (writtenAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getWrittenAt()); + } + 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.WriteRelationshipsResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.WriteRelationshipsResponse other = (com.authzed.api.v1.WriteRelationshipsResponse) obj; + + if (hasWrittenAt() != other.hasWrittenAt()) return false; + if (hasWrittenAt()) { + if (!getWrittenAt() + .equals(other.getWrittenAt())) 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 (hasWrittenAt()) { + hash = (37 * hash) + WRITTEN_AT_FIELD_NUMBER; + hash = (53 * hash) + getWrittenAt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.WriteRelationshipsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteRelationshipsResponse 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.WriteRelationshipsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteRelationshipsResponse 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.WriteRelationshipsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteRelationshipsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.WriteRelationshipsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteRelationshipsResponse 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.WriteRelationshipsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteRelationshipsResponse 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.WriteRelationshipsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteRelationshipsResponse 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.WriteRelationshipsResponse 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; + } + /** + * Protobuf type {@code authzed.api.v1.WriteRelationshipsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.WriteRelationshipsResponse) + com.authzed.api.v1.WriteRelationshipsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_WriteRelationshipsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_WriteRelationshipsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WriteRelationshipsResponse.class, com.authzed.api.v1.WriteRelationshipsResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.WriteRelationshipsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + writtenAt_ = null; + if (writtenAtBuilder_ != null) { + writtenAtBuilder_.dispose(); + writtenAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.PermissionService.internal_static_authzed_api_v1_WriteRelationshipsResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.WriteRelationshipsResponse getDefaultInstanceForType() { + return com.authzed.api.v1.WriteRelationshipsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.WriteRelationshipsResponse build() { + com.authzed.api.v1.WriteRelationshipsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.WriteRelationshipsResponse buildPartial() { + com.authzed.api.v1.WriteRelationshipsResponse result = new com.authzed.api.v1.WriteRelationshipsResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.WriteRelationshipsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.writtenAt_ = writtenAtBuilder_ == null + ? writtenAt_ + : writtenAtBuilder_.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.WriteRelationshipsResponse) { + return mergeFrom((com.authzed.api.v1.WriteRelationshipsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.WriteRelationshipsResponse other) { + if (other == com.authzed.api.v1.WriteRelationshipsResponse.getDefaultInstance()) return this; + if (other.hasWrittenAt()) { + mergeWrittenAt(other.getWrittenAt()); + } + 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( + getWrittenAtFieldBuilder().getBuilder(), + extensionRegistry); + 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 com.authzed.api.v1.ZedToken writtenAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> writtenAtBuilder_; + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + * @return Whether the writtenAt field is set. + */ + public boolean hasWrittenAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + * @return The writtenAt. + */ + public com.authzed.api.v1.ZedToken getWrittenAt() { + if (writtenAtBuilder_ == null) { + return writtenAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : writtenAt_; + } else { + return writtenAtBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + */ + public Builder setWrittenAt(com.authzed.api.v1.ZedToken value) { + if (writtenAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + writtenAt_ = value; + } else { + writtenAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + */ + public Builder setWrittenAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (writtenAtBuilder_ == null) { + writtenAt_ = builderForValue.build(); + } else { + writtenAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + */ + public Builder mergeWrittenAt(com.authzed.api.v1.ZedToken value) { + if (writtenAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + writtenAt_ != null && + writtenAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getWrittenAtBuilder().mergeFrom(value); + } else { + writtenAt_ = value; + } + } else { + writtenAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + */ + public Builder clearWrittenAt() { + bitField0_ = (bitField0_ & ~0x00000001); + writtenAt_ = null; + if (writtenAtBuilder_ != null) { + writtenAtBuilder_.dispose(); + writtenAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + */ + public com.authzed.api.v1.ZedToken.Builder getWrittenAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getWrittenAtFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getWrittenAtOrBuilder() { + if (writtenAtBuilder_ != null) { + return writtenAtBuilder_.getMessageOrBuilder(); + } else { + return writtenAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : writtenAt_; + } + } + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getWrittenAtFieldBuilder() { + if (writtenAtBuilder_ == null) { + writtenAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getWrittenAt(), + getParentForChildren(), + isClean()); + writtenAt_ = null; + } + return writtenAtBuilder_; + } + @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.WriteRelationshipsResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.WriteRelationshipsResponse) + private static final com.authzed.api.v1.WriteRelationshipsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.WriteRelationshipsResponse(); + } + + public static com.authzed.api.v1.WriteRelationshipsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteRelationshipsResponse 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.WriteRelationshipsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/WriteRelationshipsResponseOrBuilder.java b/generated/com/authzed/api/v1/WriteRelationshipsResponseOrBuilder.java new file mode 100644 index 00000000..49f18b67 --- /dev/null +++ b/generated/com/authzed/api/v1/WriteRelationshipsResponseOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/permission_service.proto + +package com.authzed.api.v1; + +public interface WriteRelationshipsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.WriteRelationshipsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + * @return Whether the writtenAt field is set. + */ + boolean hasWrittenAt(); + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + * @return The writtenAt. + */ + com.authzed.api.v1.ZedToken getWrittenAt(); + /** + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getWrittenAtOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/WriteSchemaRequest.java b/generated/com/authzed/api/v1/WriteSchemaRequest.java new file mode 100644 index 00000000..3c513d94 --- /dev/null +++ b/generated/com/authzed/api/v1/WriteSchemaRequest.java @@ -0,0 +1,589 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/schema_service.proto + +package com.authzed.api.v1; + +/** + *
+ * WriteSchemaRequest is the required data used to "upsert" the Schema of a
+ * Permissions System.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.WriteSchemaRequest} + */ +public final class WriteSchemaRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.WriteSchemaRequest) + WriteSchemaRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use WriteSchemaRequest.newBuilder() to construct. + private WriteSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WriteSchemaRequest() { + schema_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WriteSchemaRequest(); + } + + @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.SchemaServiceOuterClass.internal_static_authzed_api_v1_WriteSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_WriteSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WriteSchemaRequest.class, com.authzed.api.v1.WriteSchemaRequest.Builder.class); + } + + public static final int SCHEMA_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object schema_ = ""; + /** + *
+   * The Schema containing one or more Object Definitions that will be written
+   * to the Permissions System.
+   * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The schema. + */ + @java.lang.Override + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + 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(); + schema_ = s; + return s; + } + } + /** + *
+   * The Schema containing one or more Object Definitions that will be written
+   * to the Permissions System.
+   * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The bytes for schema. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = 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(schema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_); + } + 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(schema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_); + } + 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.WriteSchemaRequest)) { + return super.equals(obj); + } + com.authzed.api.v1.WriteSchemaRequest other = (com.authzed.api.v1.WriteSchemaRequest) obj; + + if (!getSchema() + .equals(other.getSchema())) 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) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.WriteSchemaRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteSchemaRequest 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.WriteSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteSchemaRequest 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.WriteSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteSchemaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.WriteSchemaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteSchemaRequest 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.WriteSchemaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteSchemaRequest 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.WriteSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteSchemaRequest 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.WriteSchemaRequest 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; + } + /** + *
+   * WriteSchemaRequest is the required data used to "upsert" the Schema of a
+   * Permissions System.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.WriteSchemaRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.WriteSchemaRequest) + com.authzed.api.v1.WriteSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_WriteSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_WriteSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WriteSchemaRequest.class, com.authzed.api.v1.WriteSchemaRequest.Builder.class); + } + + // Construct using com.authzed.api.v1.WriteSchemaRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schema_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_WriteSchemaRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.WriteSchemaRequest getDefaultInstanceForType() { + return com.authzed.api.v1.WriteSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.WriteSchemaRequest build() { + com.authzed.api.v1.WriteSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.WriteSchemaRequest buildPartial() { + com.authzed.api.v1.WriteSchemaRequest result = new com.authzed.api.v1.WriteSchemaRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.WriteSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schema_ = schema_; + } + } + + @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.WriteSchemaRequest) { + return mergeFrom((com.authzed.api.v1.WriteSchemaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.WriteSchemaRequest other) { + if (other == com.authzed.api.v1.WriteSchemaRequest.getDefaultInstance()) return this; + if (!other.getSchema().isEmpty()) { + schema_ = other.schema_; + 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: { + schema_ = 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 schema_ = ""; + /** + *
+     * The Schema containing one or more Object Definitions that will be written
+     * to the Permissions System.
+     * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The schema. + */ + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Schema containing one or more Object Definitions that will be written
+     * to the Permissions System.
+     * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The bytes for schema. + */ + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Schema containing one or more Object Definitions that will be written
+     * to the Permissions System.
+     * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @param value The schema to set. + * @return This builder for chaining. + */ + public Builder setSchema( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Schema containing one or more Object Definitions that will be written
+     * to the Permissions System.
+     * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearSchema() { + schema_ = getDefaultInstance().getSchema(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The Schema containing one or more Object Definitions that will be written
+     * to the Permissions System.
+     * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @param value The bytes for schema to set. + * @return This builder for chaining. + */ + public Builder setSchemaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schema_ = 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.WriteSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.WriteSchemaRequest) + private static final com.authzed.api.v1.WriteSchemaRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.WriteSchemaRequest(); + } + + public static com.authzed.api.v1.WriteSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteSchemaRequest 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.WriteSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/WriteSchemaRequestOrBuilder.java b/generated/com/authzed/api/v1/WriteSchemaRequestOrBuilder.java new file mode 100644 index 00000000..3620d050 --- /dev/null +++ b/generated/com/authzed/api/v1/WriteSchemaRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/schema_service.proto + +package com.authzed.api.v1; + +public interface WriteSchemaRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.WriteSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Schema containing one or more Object Definitions that will be written
+   * to the Permissions System.
+   * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The schema. + */ + java.lang.String getSchema(); + /** + *
+   * The Schema containing one or more Object Definitions that will be written
+   * to the Permissions System.
+   * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The bytes for schema. + */ + com.google.protobuf.ByteString + getSchemaBytes(); +} diff --git a/generated/com/authzed/api/v1/WriteSchemaResponse.java b/generated/com/authzed/api/v1/WriteSchemaResponse.java new file mode 100644 index 00000000..6285e105 --- /dev/null +++ b/generated/com/authzed/api/v1/WriteSchemaResponse.java @@ -0,0 +1,647 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/schema_service.proto + +package com.authzed.api.v1; + +/** + *
+ * WriteSchemaResponse is the resulting data after having written a Schema to
+ * a Permissions System.
+ * 
+ * + * Protobuf type {@code authzed.api.v1.WriteSchemaResponse} + */ +public final class WriteSchemaResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1.WriteSchemaResponse) + WriteSchemaResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use WriteSchemaResponse.newBuilder() to construct. + private WriteSchemaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WriteSchemaResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WriteSchemaResponse(); + } + + @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.SchemaServiceOuterClass.internal_static_authzed_api_v1_WriteSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_WriteSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WriteSchemaResponse.class, com.authzed.api.v1.WriteSchemaResponse.Builder.class); + } + + public static final int WRITTEN_AT_FIELD_NUMBER = 1; + private com.authzed.api.v1.ZedToken writtenAt_; + /** + *
+   * written_at is the ZedToken at which the schema was written.
+   * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + * @return Whether the writtenAt field is set. + */ + @java.lang.Override + public boolean hasWrittenAt() { + return writtenAt_ != null; + } + /** + *
+   * written_at is the ZedToken at which the schema was written.
+   * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + * @return The writtenAt. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getWrittenAt() { + return writtenAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : writtenAt_; + } + /** + *
+   * written_at is the ZedToken at which the schema was written.
+   * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getWrittenAtOrBuilder() { + return writtenAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : writtenAt_; + } + + 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 (writtenAt_ != null) { + output.writeMessage(1, getWrittenAt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (writtenAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getWrittenAt()); + } + 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.WriteSchemaResponse)) { + return super.equals(obj); + } + com.authzed.api.v1.WriteSchemaResponse other = (com.authzed.api.v1.WriteSchemaResponse) obj; + + if (hasWrittenAt() != other.hasWrittenAt()) return false; + if (hasWrittenAt()) { + if (!getWrittenAt() + .equals(other.getWrittenAt())) 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 (hasWrittenAt()) { + hash = (37 * hash) + WRITTEN_AT_FIELD_NUMBER; + hash = (53 * hash) + getWrittenAt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1.WriteSchemaResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteSchemaResponse 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.WriteSchemaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteSchemaResponse 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.WriteSchemaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.WriteSchemaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1.WriteSchemaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteSchemaResponse 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.WriteSchemaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteSchemaResponse 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.WriteSchemaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.WriteSchemaResponse 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.WriteSchemaResponse 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; + } + /** + *
+   * WriteSchemaResponse is the resulting data after having written a Schema to
+   * a Permissions System.
+   * 
+ * + * Protobuf type {@code authzed.api.v1.WriteSchemaResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1.WriteSchemaResponse) + com.authzed.api.v1.WriteSchemaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_WriteSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_WriteSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1.WriteSchemaResponse.class, com.authzed.api.v1.WriteSchemaResponse.Builder.class); + } + + // Construct using com.authzed.api.v1.WriteSchemaResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + writtenAt_ = null; + if (writtenAtBuilder_ != null) { + writtenAtBuilder_.dispose(); + writtenAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1.SchemaServiceOuterClass.internal_static_authzed_api_v1_WriteSchemaResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1.WriteSchemaResponse getDefaultInstanceForType() { + return com.authzed.api.v1.WriteSchemaResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.WriteSchemaResponse build() { + com.authzed.api.v1.WriteSchemaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.WriteSchemaResponse buildPartial() { + com.authzed.api.v1.WriteSchemaResponse result = new com.authzed.api.v1.WriteSchemaResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.WriteSchemaResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.writtenAt_ = writtenAtBuilder_ == null + ? writtenAt_ + : writtenAtBuilder_.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.WriteSchemaResponse) { + return mergeFrom((com.authzed.api.v1.WriteSchemaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.WriteSchemaResponse other) { + if (other == com.authzed.api.v1.WriteSchemaResponse.getDefaultInstance()) return this; + if (other.hasWrittenAt()) { + mergeWrittenAt(other.getWrittenAt()); + } + 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( + getWrittenAtFieldBuilder().getBuilder(), + extensionRegistry); + 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 com.authzed.api.v1.ZedToken writtenAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> writtenAtBuilder_; + /** + *
+     * written_at is the ZedToken at which the schema was written.
+     * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + * @return Whether the writtenAt field is set. + */ + public boolean hasWrittenAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * written_at is the ZedToken at which the schema was written.
+     * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + * @return The writtenAt. + */ + public com.authzed.api.v1.ZedToken getWrittenAt() { + if (writtenAtBuilder_ == null) { + return writtenAt_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : writtenAt_; + } else { + return writtenAtBuilder_.getMessage(); + } + } + /** + *
+     * written_at is the ZedToken at which the schema was written.
+     * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + */ + public Builder setWrittenAt(com.authzed.api.v1.ZedToken value) { + if (writtenAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + writtenAt_ = value; + } else { + writtenAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * written_at is the ZedToken at which the schema was written.
+     * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + */ + public Builder setWrittenAt( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (writtenAtBuilder_ == null) { + writtenAt_ = builderForValue.build(); + } else { + writtenAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * written_at is the ZedToken at which the schema was written.
+     * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + */ + public Builder mergeWrittenAt(com.authzed.api.v1.ZedToken value) { + if (writtenAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + writtenAt_ != null && + writtenAt_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getWrittenAtBuilder().mergeFrom(value); + } else { + writtenAt_ = value; + } + } else { + writtenAtBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * written_at is the ZedToken at which the schema was written.
+     * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + */ + public Builder clearWrittenAt() { + bitField0_ = (bitField0_ & ~0x00000001); + writtenAt_ = null; + if (writtenAtBuilder_ != null) { + writtenAtBuilder_.dispose(); + writtenAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * written_at is the ZedToken at which the schema was written.
+     * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedToken.Builder getWrittenAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getWrittenAtFieldBuilder().getBuilder(); + } + /** + *
+     * written_at is the ZedToken at which the schema was written.
+     * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + */ + public com.authzed.api.v1.ZedTokenOrBuilder getWrittenAtOrBuilder() { + if (writtenAtBuilder_ != null) { + return writtenAtBuilder_.getMessageOrBuilder(); + } else { + return writtenAt_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : writtenAt_; + } + } + /** + *
+     * written_at is the ZedToken at which the schema was written.
+     * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getWrittenAtFieldBuilder() { + if (writtenAtBuilder_ == null) { + writtenAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getWrittenAt(), + getParentForChildren(), + isClean()); + writtenAt_ = null; + } + return writtenAtBuilder_; + } + @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.WriteSchemaResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1.WriteSchemaResponse) + private static final com.authzed.api.v1.WriteSchemaResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.WriteSchemaResponse(); + } + + public static com.authzed.api.v1.WriteSchemaResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteSchemaResponse 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.WriteSchemaResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/WriteSchemaResponseOrBuilder.java b/generated/com/authzed/api/v1/WriteSchemaResponseOrBuilder.java new file mode 100644 index 00000000..8a06b262 --- /dev/null +++ b/generated/com/authzed/api/v1/WriteSchemaResponseOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/schema_service.proto + +package com.authzed.api.v1; + +public interface WriteSchemaResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.WriteSchemaResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * written_at is the ZedToken at which the schema was written.
+   * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + * @return Whether the writtenAt field is set. + */ + boolean hasWrittenAt(); + /** + *
+   * written_at is the ZedToken at which the schema was written.
+   * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + * @return The writtenAt. + */ + com.authzed.api.v1.ZedToken getWrittenAt(); + /** + *
+   * written_at is the ZedToken at which the schema was written.
+   * 
+ * + * .authzed.api.v1.ZedToken written_at = 1 [json_name = "writtenAt", (.validate.rules) = { ... } + */ + com.authzed.api.v1.ZedTokenOrBuilder getWrittenAtOrBuilder(); +} diff --git a/generated/com/authzed/api/v1/ZedToken.java b/generated/com/authzed/api/v1/ZedToken.java new file mode 100644 index 00000000..cf7fb5e8 --- /dev/null +++ b/generated/com/authzed/api/v1/ZedToken.java @@ -0,0 +1,556 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +/** + *
+ * 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 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.ZedToken.class, com.authzed.api.v1.ZedToken.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + * string token = 1 [json_name = "token", (.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 [json_name = "token", (.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.ZedToken)) { + return super.equals(obj); + } + com.authzed.api.v1.ZedToken other = (com.authzed.api.v1.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.ZedToken parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.ZedToken parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.ZedToken parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1.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.ZedToken parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.ZedToken parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1.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.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.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.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.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.ZedToken.class, com.authzed.api.v1.ZedToken.Builder.class); + } + + // Construct using com.authzed.api.v1.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.ZedToken getDefaultInstanceForType() { + return com.authzed.api.v1.ZedToken.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1.ZedToken build() { + com.authzed.api.v1.ZedToken result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1.ZedToken buildPartial() { + com.authzed.api.v1.ZedToken result = new com.authzed.api.v1.ZedToken(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1.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.ZedToken) { + return mergeFrom((com.authzed.api.v1.ZedToken)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1.ZedToken other) { + if (other == com.authzed.api.v1.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 [json_name = "token", (.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 [json_name = "token", (.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 [json_name = "token", (.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 [json_name = "token", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string token = 1 [json_name = "token", (.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.ZedToken DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1.ZedToken(); + } + + public static com.authzed.api.v1.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.ZedToken getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/generated/com/authzed/api/v1/ZedTokenOrBuilder.java b/generated/com/authzed/api/v1/ZedTokenOrBuilder.java new file mode 100644 index 00000000..666c53f1 --- /dev/null +++ b/generated/com/authzed/api/v1/ZedTokenOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1/core.proto + +package com.authzed.api.v1; + +public interface ZedTokenOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1.ZedToken) + com.google.protobuf.MessageOrBuilder { + + /** + * string token = 1 [json_name = "token", (.validate.rules) = { ... } + * @return The token. + */ + java.lang.String getToken(); + /** + * string token = 1 [json_name = "token", (.validate.rules) = { ... } + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); +} diff --git a/generated/com/authzed/api/v1alpha1/Schema.java b/generated/com/authzed/api/v1alpha1/Schema.java new file mode 100644 index 00000000..8d44a03d --- /dev/null +++ b/generated/com/authzed/api/v1alpha1/Schema.java @@ -0,0 +1,3409 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1alpha1/schema.proto + +package com.authzed.api.v1alpha1; + +public final class Schema { + private Schema() {} + 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 ReadSchemaRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1alpha1.ReadSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The list of names of the Object Definitions that are being requested.
+     * These names must be fully qualified with their namespace (e.g.
+     * myblog/post).
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @return A list containing the objectDefinitionsNames. + */ + java.util.List + getObjectDefinitionsNamesList(); + /** + *
+     * The list of names of the Object Definitions that are being requested.
+     * These names must be fully qualified with their namespace (e.g.
+     * myblog/post).
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @return The count of objectDefinitionsNames. + */ + int getObjectDefinitionsNamesCount(); + /** + *
+     * The list of names of the Object Definitions that are being requested.
+     * These names must be fully qualified with their namespace (e.g.
+     * myblog/post).
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @param index The index of the element to return. + * @return The objectDefinitionsNames at the given index. + */ + java.lang.String getObjectDefinitionsNames(int index); + /** + *
+     * The list of names of the Object Definitions that are being requested.
+     * These names must be fully qualified with their namespace (e.g.
+     * myblog/post).
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @param index The index of the value to return. + * @return The bytes of the objectDefinitionsNames at the given index. + */ + com.google.protobuf.ByteString + getObjectDefinitionsNamesBytes(int index); + } + /** + *
+   * ReadSchemaRequest is the required data to read Object Definitions from
+   * a Schema.
+   * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.ReadSchemaRequest} + */ + public static final class ReadSchemaRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1alpha1.ReadSchemaRequest) + ReadSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadSchemaRequest.newBuilder() to construct. + private ReadSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReadSchemaRequest() { + objectDefinitionsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReadSchemaRequest(); + } + + @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.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_ReadSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_ReadSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.Schema.ReadSchemaRequest.class, com.authzed.api.v1alpha1.Schema.ReadSchemaRequest.Builder.class); + } + + public static final int OBJECT_DEFINITIONS_NAMES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList objectDefinitionsNames_; + /** + *
+     * The list of names of the Object Definitions that are being requested.
+     * These names must be fully qualified with their namespace (e.g.
+     * myblog/post).
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @return A list containing the objectDefinitionsNames. + */ + public com.google.protobuf.ProtocolStringList + getObjectDefinitionsNamesList() { + return objectDefinitionsNames_; + } + /** + *
+     * The list of names of the Object Definitions that are being requested.
+     * These names must be fully qualified with their namespace (e.g.
+     * myblog/post).
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @return The count of objectDefinitionsNames. + */ + public int getObjectDefinitionsNamesCount() { + return objectDefinitionsNames_.size(); + } + /** + *
+     * The list of names of the Object Definitions that are being requested.
+     * These names must be fully qualified with their namespace (e.g.
+     * myblog/post).
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @param index The index of the element to return. + * @return The objectDefinitionsNames at the given index. + */ + public java.lang.String getObjectDefinitionsNames(int index) { + return objectDefinitionsNames_.get(index); + } + /** + *
+     * The list of names of the Object Definitions that are being requested.
+     * These names must be fully qualified with their namespace (e.g.
+     * myblog/post).
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @param index The index of the value to return. + * @return The bytes of the objectDefinitionsNames at the given index. + */ + public com.google.protobuf.ByteString + getObjectDefinitionsNamesBytes(int index) { + return objectDefinitionsNames_.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 < objectDefinitionsNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectDefinitionsNames_.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 < objectDefinitionsNames_.size(); i++) { + dataSize += computeStringSizeNoTag(objectDefinitionsNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getObjectDefinitionsNamesList().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.v1alpha1.Schema.ReadSchemaRequest)) { + return super.equals(obj); + } + com.authzed.api.v1alpha1.Schema.ReadSchemaRequest other = (com.authzed.api.v1alpha1.Schema.ReadSchemaRequest) obj; + + if (!getObjectDefinitionsNamesList() + .equals(other.getObjectDefinitionsNamesList())) 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 (getObjectDefinitionsNamesCount() > 0) { + hash = (37 * hash) + OBJECT_DEFINITIONS_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getObjectDefinitionsNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1alpha1.Schema.ReadSchemaRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaRequest 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.v1alpha1.Schema.ReadSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaRequest 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.v1alpha1.Schema.ReadSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaRequest 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.v1alpha1.Schema.ReadSchemaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaRequest 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.v1alpha1.Schema.ReadSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaRequest 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.v1alpha1.Schema.ReadSchemaRequest 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; + } + /** + *
+     * ReadSchemaRequest is the required data to read Object Definitions from
+     * a Schema.
+     * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.ReadSchemaRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1alpha1.ReadSchemaRequest) + com.authzed.api.v1alpha1.Schema.ReadSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_ReadSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_ReadSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.Schema.ReadSchemaRequest.class, com.authzed.api.v1alpha1.Schema.ReadSchemaRequest.Builder.class); + } + + // Construct using com.authzed.api.v1alpha1.Schema.ReadSchemaRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + objectDefinitionsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_ReadSchemaRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.ReadSchemaRequest getDefaultInstanceForType() { + return com.authzed.api.v1alpha1.Schema.ReadSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.ReadSchemaRequest build() { + com.authzed.api.v1alpha1.Schema.ReadSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.ReadSchemaRequest buildPartial() { + com.authzed.api.v1alpha1.Schema.ReadSchemaRequest result = new com.authzed.api.v1alpha1.Schema.ReadSchemaRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1alpha1.Schema.ReadSchemaRequest result) { + if (((bitField0_ & 0x00000001) != 0)) { + objectDefinitionsNames_ = objectDefinitionsNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.objectDefinitionsNames_ = objectDefinitionsNames_; + } + + private void buildPartial0(com.authzed.api.v1alpha1.Schema.ReadSchemaRequest 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.v1alpha1.Schema.ReadSchemaRequest) { + return mergeFrom((com.authzed.api.v1alpha1.Schema.ReadSchemaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1alpha1.Schema.ReadSchemaRequest other) { + if (other == com.authzed.api.v1alpha1.Schema.ReadSchemaRequest.getDefaultInstance()) return this; + if (!other.objectDefinitionsNames_.isEmpty()) { + if (objectDefinitionsNames_.isEmpty()) { + objectDefinitionsNames_ = other.objectDefinitionsNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureObjectDefinitionsNamesIsMutable(); + objectDefinitionsNames_.addAll(other.objectDefinitionsNames_); + } + 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(); + ensureObjectDefinitionsNamesIsMutable(); + objectDefinitionsNames_.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 objectDefinitionsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureObjectDefinitionsNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + objectDefinitionsNames_ = new com.google.protobuf.LazyStringArrayList(objectDefinitionsNames_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * The list of names of the Object Definitions that are being requested.
+       * These names must be fully qualified with their namespace (e.g.
+       * myblog/post).
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @return A list containing the objectDefinitionsNames. + */ + public com.google.protobuf.ProtocolStringList + getObjectDefinitionsNamesList() { + return objectDefinitionsNames_.getUnmodifiableView(); + } + /** + *
+       * The list of names of the Object Definitions that are being requested.
+       * These names must be fully qualified with their namespace (e.g.
+       * myblog/post).
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @return The count of objectDefinitionsNames. + */ + public int getObjectDefinitionsNamesCount() { + return objectDefinitionsNames_.size(); + } + /** + *
+       * The list of names of the Object Definitions that are being requested.
+       * These names must be fully qualified with their namespace (e.g.
+       * myblog/post).
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @param index The index of the element to return. + * @return The objectDefinitionsNames at the given index. + */ + public java.lang.String getObjectDefinitionsNames(int index) { + return objectDefinitionsNames_.get(index); + } + /** + *
+       * The list of names of the Object Definitions that are being requested.
+       * These names must be fully qualified with their namespace (e.g.
+       * myblog/post).
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @param index The index of the value to return. + * @return The bytes of the objectDefinitionsNames at the given index. + */ + public com.google.protobuf.ByteString + getObjectDefinitionsNamesBytes(int index) { + return objectDefinitionsNames_.getByteString(index); + } + /** + *
+       * The list of names of the Object Definitions that are being requested.
+       * These names must be fully qualified with their namespace (e.g.
+       * myblog/post).
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @param index The index to set the value at. + * @param value The objectDefinitionsNames to set. + * @return This builder for chaining. + */ + public Builder setObjectDefinitionsNames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureObjectDefinitionsNamesIsMutable(); + objectDefinitionsNames_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * The list of names of the Object Definitions that are being requested.
+       * These names must be fully qualified with their namespace (e.g.
+       * myblog/post).
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @param value The objectDefinitionsNames to add. + * @return This builder for chaining. + */ + public Builder addObjectDefinitionsNames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureObjectDefinitionsNamesIsMutable(); + objectDefinitionsNames_.add(value); + onChanged(); + return this; + } + /** + *
+       * The list of names of the Object Definitions that are being requested.
+       * These names must be fully qualified with their namespace (e.g.
+       * myblog/post).
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @param values The objectDefinitionsNames to add. + * @return This builder for chaining. + */ + public Builder addAllObjectDefinitionsNames( + java.lang.Iterable values) { + ensureObjectDefinitionsNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objectDefinitionsNames_); + onChanged(); + return this; + } + /** + *
+       * The list of names of the Object Definitions that are being requested.
+       * These names must be fully qualified with their namespace (e.g.
+       * myblog/post).
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearObjectDefinitionsNames() { + objectDefinitionsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The list of names of the Object Definitions that are being requested.
+       * These names must be fully qualified with their namespace (e.g.
+       * myblog/post).
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames", (.validate.rules) = { ... } + * @param value The bytes of the objectDefinitionsNames to add. + * @return This builder for chaining. + */ + public Builder addObjectDefinitionsNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureObjectDefinitionsNamesIsMutable(); + objectDefinitionsNames_.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.v1alpha1.ReadSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1alpha1.ReadSchemaRequest) + private static final com.authzed.api.v1alpha1.Schema.ReadSchemaRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1alpha1.Schema.ReadSchemaRequest(); + } + + public static com.authzed.api.v1alpha1.Schema.ReadSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadSchemaRequest 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.v1alpha1.Schema.ReadSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ReadSchemaResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1alpha1.ReadSchemaResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The Object Definitions that were requested.
+     * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @return A list containing the objectDefinitions. + */ + java.util.List + getObjectDefinitionsList(); + /** + *
+     * The Object Definitions that were requested.
+     * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @return The count of objectDefinitions. + */ + int getObjectDefinitionsCount(); + /** + *
+     * The Object Definitions that were requested.
+     * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @param index The index of the element to return. + * @return The objectDefinitions at the given index. + */ + java.lang.String getObjectDefinitions(int index); + /** + *
+     * The Object Definitions that were requested.
+     * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @param index The index of the value to return. + * @return The bytes of the objectDefinitions at the given index. + */ + com.google.protobuf.ByteString + getObjectDefinitionsBytes(int index); + + /** + *
+     * The computed revision of the returned object definitions.
+     * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The computedDefinitionsRevision. + */ + java.lang.String getComputedDefinitionsRevision(); + /** + *
+     * The computed revision of the returned object definitions.
+     * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The bytes for computedDefinitionsRevision. + */ + com.google.protobuf.ByteString + getComputedDefinitionsRevisionBytes(); + } + /** + *
+   * ReadSchemaResponse is the resulting data after having read the Object
+   * Definitions from a Schema.
+   * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.ReadSchemaResponse} + */ + public static final class ReadSchemaResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1alpha1.ReadSchemaResponse) + ReadSchemaResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadSchemaResponse.newBuilder() to construct. + private ReadSchemaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReadSchemaResponse() { + objectDefinitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + computedDefinitionsRevision_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReadSchemaResponse(); + } + + @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.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_ReadSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_ReadSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.Schema.ReadSchemaResponse.class, com.authzed.api.v1alpha1.Schema.ReadSchemaResponse.Builder.class); + } + + public static final int OBJECT_DEFINITIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList objectDefinitions_; + /** + *
+     * The Object Definitions that were requested.
+     * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @return A list containing the objectDefinitions. + */ + public com.google.protobuf.ProtocolStringList + getObjectDefinitionsList() { + return objectDefinitions_; + } + /** + *
+     * The Object Definitions that were requested.
+     * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @return The count of objectDefinitions. + */ + public int getObjectDefinitionsCount() { + return objectDefinitions_.size(); + } + /** + *
+     * The Object Definitions that were requested.
+     * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @param index The index of the element to return. + * @return The objectDefinitions at the given index. + */ + public java.lang.String getObjectDefinitions(int index) { + return objectDefinitions_.get(index); + } + /** + *
+     * The Object Definitions that were requested.
+     * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @param index The index of the value to return. + * @return The bytes of the objectDefinitions at the given index. + */ + public com.google.protobuf.ByteString + getObjectDefinitionsBytes(int index) { + return objectDefinitions_.getByteString(index); + } + + public static final int COMPUTED_DEFINITIONS_REVISION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object computedDefinitionsRevision_ = ""; + /** + *
+     * The computed revision of the returned object definitions.
+     * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The computedDefinitionsRevision. + */ + @java.lang.Override + public java.lang.String getComputedDefinitionsRevision() { + java.lang.Object ref = computedDefinitionsRevision_; + 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(); + computedDefinitionsRevision_ = s; + return s; + } + } + /** + *
+     * The computed revision of the returned object definitions.
+     * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The bytes for computedDefinitionsRevision. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getComputedDefinitionsRevisionBytes() { + java.lang.Object ref = computedDefinitionsRevision_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + computedDefinitionsRevision_ = 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 { + for (int i = 0; i < objectDefinitions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectDefinitions_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(computedDefinitionsRevision_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, computedDefinitionsRevision_); + } + 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 < objectDefinitions_.size(); i++) { + dataSize += computeStringSizeNoTag(objectDefinitions_.getRaw(i)); + } + size += dataSize; + size += 1 * getObjectDefinitionsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(computedDefinitionsRevision_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, computedDefinitionsRevision_); + } + 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.v1alpha1.Schema.ReadSchemaResponse)) { + return super.equals(obj); + } + com.authzed.api.v1alpha1.Schema.ReadSchemaResponse other = (com.authzed.api.v1alpha1.Schema.ReadSchemaResponse) obj; + + if (!getObjectDefinitionsList() + .equals(other.getObjectDefinitionsList())) return false; + if (!getComputedDefinitionsRevision() + .equals(other.getComputedDefinitionsRevision())) 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 (getObjectDefinitionsCount() > 0) { + hash = (37 * hash) + OBJECT_DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getObjectDefinitionsList().hashCode(); + } + hash = (37 * hash) + COMPUTED_DEFINITIONS_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getComputedDefinitionsRevision().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1alpha1.Schema.ReadSchemaResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaResponse 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.v1alpha1.Schema.ReadSchemaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaResponse 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.v1alpha1.Schema.ReadSchemaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaResponse 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.v1alpha1.Schema.ReadSchemaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaResponse 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.v1alpha1.Schema.ReadSchemaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.ReadSchemaResponse 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.v1alpha1.Schema.ReadSchemaResponse 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; + } + /** + *
+     * ReadSchemaResponse is the resulting data after having read the Object
+     * Definitions from a Schema.
+     * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.ReadSchemaResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1alpha1.ReadSchemaResponse) + com.authzed.api.v1alpha1.Schema.ReadSchemaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_ReadSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_ReadSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.Schema.ReadSchemaResponse.class, com.authzed.api.v1alpha1.Schema.ReadSchemaResponse.Builder.class); + } + + // Construct using com.authzed.api.v1alpha1.Schema.ReadSchemaResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + objectDefinitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + computedDefinitionsRevision_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_ReadSchemaResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.ReadSchemaResponse getDefaultInstanceForType() { + return com.authzed.api.v1alpha1.Schema.ReadSchemaResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.ReadSchemaResponse build() { + com.authzed.api.v1alpha1.Schema.ReadSchemaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.ReadSchemaResponse buildPartial() { + com.authzed.api.v1alpha1.Schema.ReadSchemaResponse result = new com.authzed.api.v1alpha1.Schema.ReadSchemaResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1alpha1.Schema.ReadSchemaResponse result) { + if (((bitField0_ & 0x00000001) != 0)) { + objectDefinitions_ = objectDefinitions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.objectDefinitions_ = objectDefinitions_; + } + + private void buildPartial0(com.authzed.api.v1alpha1.Schema.ReadSchemaResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.computedDefinitionsRevision_ = computedDefinitionsRevision_; + } + } + + @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.v1alpha1.Schema.ReadSchemaResponse) { + return mergeFrom((com.authzed.api.v1alpha1.Schema.ReadSchemaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1alpha1.Schema.ReadSchemaResponse other) { + if (other == com.authzed.api.v1alpha1.Schema.ReadSchemaResponse.getDefaultInstance()) return this; + if (!other.objectDefinitions_.isEmpty()) { + if (objectDefinitions_.isEmpty()) { + objectDefinitions_ = other.objectDefinitions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureObjectDefinitionsIsMutable(); + objectDefinitions_.addAll(other.objectDefinitions_); + } + onChanged(); + } + if (!other.getComputedDefinitionsRevision().isEmpty()) { + computedDefinitionsRevision_ = other.computedDefinitionsRevision_; + 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: { + java.lang.String s = input.readStringRequireUtf8(); + ensureObjectDefinitionsIsMutable(); + objectDefinitions_.add(s); + break; + } // case 10 + case 18: { + computedDefinitionsRevision_ = 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.google.protobuf.LazyStringList objectDefinitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureObjectDefinitionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + objectDefinitions_ = new com.google.protobuf.LazyStringArrayList(objectDefinitions_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * The Object Definitions that were requested.
+       * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @return A list containing the objectDefinitions. + */ + public com.google.protobuf.ProtocolStringList + getObjectDefinitionsList() { + return objectDefinitions_.getUnmodifiableView(); + } + /** + *
+       * The Object Definitions that were requested.
+       * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @return The count of objectDefinitions. + */ + public int getObjectDefinitionsCount() { + return objectDefinitions_.size(); + } + /** + *
+       * The Object Definitions that were requested.
+       * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @param index The index of the element to return. + * @return The objectDefinitions at the given index. + */ + public java.lang.String getObjectDefinitions(int index) { + return objectDefinitions_.get(index); + } + /** + *
+       * The Object Definitions that were requested.
+       * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @param index The index of the value to return. + * @return The bytes of the objectDefinitions at the given index. + */ + public com.google.protobuf.ByteString + getObjectDefinitionsBytes(int index) { + return objectDefinitions_.getByteString(index); + } + /** + *
+       * The Object Definitions that were requested.
+       * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @param index The index to set the value at. + * @param value The objectDefinitions to set. + * @return This builder for chaining. + */ + public Builder setObjectDefinitions( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureObjectDefinitionsIsMutable(); + objectDefinitions_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * The Object Definitions that were requested.
+       * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @param value The objectDefinitions to add. + * @return This builder for chaining. + */ + public Builder addObjectDefinitions( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureObjectDefinitionsIsMutable(); + objectDefinitions_.add(value); + onChanged(); + return this; + } + /** + *
+       * The Object Definitions that were requested.
+       * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @param values The objectDefinitions to add. + * @return This builder for chaining. + */ + public Builder addAllObjectDefinitions( + java.lang.Iterable values) { + ensureObjectDefinitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objectDefinitions_); + onChanged(); + return this; + } + /** + *
+       * The Object Definitions that were requested.
+       * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @return This builder for chaining. + */ + public Builder clearObjectDefinitions() { + objectDefinitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The Object Definitions that were requested.
+       * 
+ * + * repeated string object_definitions = 1 [json_name = "objectDefinitions"]; + * @param value The bytes of the objectDefinitions to add. + * @return This builder for chaining. + */ + public Builder addObjectDefinitionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureObjectDefinitionsIsMutable(); + objectDefinitions_.add(value); + onChanged(); + return this; + } + + private java.lang.Object computedDefinitionsRevision_ = ""; + /** + *
+       * The computed revision of the returned object definitions.
+       * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The computedDefinitionsRevision. + */ + public java.lang.String getComputedDefinitionsRevision() { + java.lang.Object ref = computedDefinitionsRevision_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + computedDefinitionsRevision_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The computed revision of the returned object definitions.
+       * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The bytes for computedDefinitionsRevision. + */ + public com.google.protobuf.ByteString + getComputedDefinitionsRevisionBytes() { + java.lang.Object ref = computedDefinitionsRevision_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + computedDefinitionsRevision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The computed revision of the returned object definitions.
+       * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @param value The computedDefinitionsRevision to set. + * @return This builder for chaining. + */ + public Builder setComputedDefinitionsRevision( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + computedDefinitionsRevision_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The computed revision of the returned object definitions.
+       * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return This builder for chaining. + */ + public Builder clearComputedDefinitionsRevision() { + computedDefinitionsRevision_ = getDefaultInstance().getComputedDefinitionsRevision(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * The computed revision of the returned object definitions.
+       * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @param value The bytes for computedDefinitionsRevision to set. + * @return This builder for chaining. + */ + public Builder setComputedDefinitionsRevisionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + computedDefinitionsRevision_ = 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.v1alpha1.ReadSchemaResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1alpha1.ReadSchemaResponse) + private static final com.authzed.api.v1alpha1.Schema.ReadSchemaResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1alpha1.Schema.ReadSchemaResponse(); + } + + public static com.authzed.api.v1alpha1.Schema.ReadSchemaResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadSchemaResponse 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.v1alpha1.Schema.ReadSchemaResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WriteSchemaRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1alpha1.WriteSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The Schema containing one or more Object Definitions that will be written
+     * to the Permissions System.
+     * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The schema. + */ + java.lang.String getSchema(); + /** + *
+     * The Schema containing one or more Object Definitions that will be written
+     * to the Permissions System.
+     * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The bytes for schema. + */ + com.google.protobuf.ByteString + getSchemaBytes(); + + /** + *
+     * If specified, the existing revision of object definitions in the schema that must be present for
+     * the write to succeed. If the revision specified differs (i.e. the underlying schema has changed),
+     * the write call will fail with a FAILED_PRECONDITION error.
+     * 
+ * + * string optional_definitions_revision_precondition = 2 [json_name = "optionalDefinitionsRevisionPrecondition"]; + * @return The optionalDefinitionsRevisionPrecondition. + */ + java.lang.String getOptionalDefinitionsRevisionPrecondition(); + /** + *
+     * If specified, the existing revision of object definitions in the schema that must be present for
+     * the write to succeed. If the revision specified differs (i.e. the underlying schema has changed),
+     * the write call will fail with a FAILED_PRECONDITION error.
+     * 
+ * + * string optional_definitions_revision_precondition = 2 [json_name = "optionalDefinitionsRevisionPrecondition"]; + * @return The bytes for optionalDefinitionsRevisionPrecondition. + */ + com.google.protobuf.ByteString + getOptionalDefinitionsRevisionPreconditionBytes(); + } + /** + *
+   * WriteSchemaRequest is the required data used to "upsert" the Schema of a
+   * Permissions System.
+   * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.WriteSchemaRequest} + */ + public static final class WriteSchemaRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1alpha1.WriteSchemaRequest) + WriteSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use WriteSchemaRequest.newBuilder() to construct. + private WriteSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WriteSchemaRequest() { + schema_ = ""; + optionalDefinitionsRevisionPrecondition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WriteSchemaRequest(); + } + + @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.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_WriteSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_WriteSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.Schema.WriteSchemaRequest.class, com.authzed.api.v1alpha1.Schema.WriteSchemaRequest.Builder.class); + } + + public static final int SCHEMA_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object schema_ = ""; + /** + *
+     * The Schema containing one or more Object Definitions that will be written
+     * to the Permissions System.
+     * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The schema. + */ + @java.lang.Override + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + 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(); + schema_ = s; + return s; + } + } + /** + *
+     * The Schema containing one or more Object Definitions that will be written
+     * to the Permissions System.
+     * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The bytes for schema. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_DEFINITIONS_REVISION_PRECONDITION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalDefinitionsRevisionPrecondition_ = ""; + /** + *
+     * If specified, the existing revision of object definitions in the schema that must be present for
+     * the write to succeed. If the revision specified differs (i.e. the underlying schema has changed),
+     * the write call will fail with a FAILED_PRECONDITION error.
+     * 
+ * + * string optional_definitions_revision_precondition = 2 [json_name = "optionalDefinitionsRevisionPrecondition"]; + * @return The optionalDefinitionsRevisionPrecondition. + */ + @java.lang.Override + public java.lang.String getOptionalDefinitionsRevisionPrecondition() { + java.lang.Object ref = optionalDefinitionsRevisionPrecondition_; + 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(); + optionalDefinitionsRevisionPrecondition_ = s; + return s; + } + } + /** + *
+     * If specified, the existing revision of object definitions in the schema that must be present for
+     * the write to succeed. If the revision specified differs (i.e. the underlying schema has changed),
+     * the write call will fail with a FAILED_PRECONDITION error.
+     * 
+ * + * string optional_definitions_revision_precondition = 2 [json_name = "optionalDefinitionsRevisionPrecondition"]; + * @return The bytes for optionalDefinitionsRevisionPrecondition. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalDefinitionsRevisionPreconditionBytes() { + java.lang.Object ref = optionalDefinitionsRevisionPrecondition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalDefinitionsRevisionPrecondition_ = 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(schema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalDefinitionsRevisionPrecondition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, optionalDefinitionsRevisionPrecondition_); + } + 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(schema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalDefinitionsRevisionPrecondition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, optionalDefinitionsRevisionPrecondition_); + } + 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.v1alpha1.Schema.WriteSchemaRequest)) { + return super.equals(obj); + } + com.authzed.api.v1alpha1.Schema.WriteSchemaRequest other = (com.authzed.api.v1alpha1.Schema.WriteSchemaRequest) obj; + + if (!getSchema() + .equals(other.getSchema())) return false; + if (!getOptionalDefinitionsRevisionPrecondition() + .equals(other.getOptionalDefinitionsRevisionPrecondition())) 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) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + hash = (37 * hash) + OPTIONAL_DEFINITIONS_REVISION_PRECONDITION_FIELD_NUMBER; + hash = (53 * hash) + getOptionalDefinitionsRevisionPrecondition().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1alpha1.Schema.WriteSchemaRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaRequest 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.v1alpha1.Schema.WriteSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaRequest 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.v1alpha1.Schema.WriteSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaRequest 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.v1alpha1.Schema.WriteSchemaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaRequest 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.v1alpha1.Schema.WriteSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaRequest 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.v1alpha1.Schema.WriteSchemaRequest 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; + } + /** + *
+     * WriteSchemaRequest is the required data used to "upsert" the Schema of a
+     * Permissions System.
+     * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.WriteSchemaRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1alpha1.WriteSchemaRequest) + com.authzed.api.v1alpha1.Schema.WriteSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_WriteSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_WriteSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.Schema.WriteSchemaRequest.class, com.authzed.api.v1alpha1.Schema.WriteSchemaRequest.Builder.class); + } + + // Construct using com.authzed.api.v1alpha1.Schema.WriteSchemaRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schema_ = ""; + optionalDefinitionsRevisionPrecondition_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_WriteSchemaRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.WriteSchemaRequest getDefaultInstanceForType() { + return com.authzed.api.v1alpha1.Schema.WriteSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.WriteSchemaRequest build() { + com.authzed.api.v1alpha1.Schema.WriteSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.WriteSchemaRequest buildPartial() { + com.authzed.api.v1alpha1.Schema.WriteSchemaRequest result = new com.authzed.api.v1alpha1.Schema.WriteSchemaRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1alpha1.Schema.WriteSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schema_ = schema_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optionalDefinitionsRevisionPrecondition_ = optionalDefinitionsRevisionPrecondition_; + } + } + + @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.v1alpha1.Schema.WriteSchemaRequest) { + return mergeFrom((com.authzed.api.v1alpha1.Schema.WriteSchemaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1alpha1.Schema.WriteSchemaRequest other) { + if (other == com.authzed.api.v1alpha1.Schema.WriteSchemaRequest.getDefaultInstance()) return this; + if (!other.getSchema().isEmpty()) { + schema_ = other.schema_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOptionalDefinitionsRevisionPrecondition().isEmpty()) { + optionalDefinitionsRevisionPrecondition_ = other.optionalDefinitionsRevisionPrecondition_; + 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: { + schema_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + optionalDefinitionsRevisionPrecondition_ = 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 schema_ = ""; + /** + *
+       * The Schema containing one or more Object Definitions that will be written
+       * to the Permissions System.
+       * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The schema. + */ + public java.lang.String getSchema() { + java.lang.Object ref = schema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The Schema containing one or more Object Definitions that will be written
+       * to the Permissions System.
+       * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return The bytes for schema. + */ + public com.google.protobuf.ByteString + getSchemaBytes() { + java.lang.Object ref = schema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The Schema containing one or more Object Definitions that will be written
+       * to the Permissions System.
+       * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @param value The schema to set. + * @return This builder for chaining. + */ + public Builder setSchema( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The Schema containing one or more Object Definitions that will be written
+       * to the Permissions System.
+       * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearSchema() { + schema_ = getDefaultInstance().getSchema(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The Schema containing one or more Object Definitions that will be written
+       * to the Permissions System.
+       * 
+ * + * string schema = 1 [json_name = "schema", (.validate.rules) = { ... } + * @param value The bytes for schema to set. + * @return This builder for chaining. + */ + public Builder setSchemaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object optionalDefinitionsRevisionPrecondition_ = ""; + /** + *
+       * If specified, the existing revision of object definitions in the schema that must be present for
+       * the write to succeed. If the revision specified differs (i.e. the underlying schema has changed),
+       * the write call will fail with a FAILED_PRECONDITION error.
+       * 
+ * + * string optional_definitions_revision_precondition = 2 [json_name = "optionalDefinitionsRevisionPrecondition"]; + * @return The optionalDefinitionsRevisionPrecondition. + */ + public java.lang.String getOptionalDefinitionsRevisionPrecondition() { + java.lang.Object ref = optionalDefinitionsRevisionPrecondition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalDefinitionsRevisionPrecondition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * If specified, the existing revision of object definitions in the schema that must be present for
+       * the write to succeed. If the revision specified differs (i.e. the underlying schema has changed),
+       * the write call will fail with a FAILED_PRECONDITION error.
+       * 
+ * + * string optional_definitions_revision_precondition = 2 [json_name = "optionalDefinitionsRevisionPrecondition"]; + * @return The bytes for optionalDefinitionsRevisionPrecondition. + */ + public com.google.protobuf.ByteString + getOptionalDefinitionsRevisionPreconditionBytes() { + java.lang.Object ref = optionalDefinitionsRevisionPrecondition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalDefinitionsRevisionPrecondition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * If specified, the existing revision of object definitions in the schema that must be present for
+       * the write to succeed. If the revision specified differs (i.e. the underlying schema has changed),
+       * the write call will fail with a FAILED_PRECONDITION error.
+       * 
+ * + * string optional_definitions_revision_precondition = 2 [json_name = "optionalDefinitionsRevisionPrecondition"]; + * @param value The optionalDefinitionsRevisionPrecondition to set. + * @return This builder for chaining. + */ + public Builder setOptionalDefinitionsRevisionPrecondition( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalDefinitionsRevisionPrecondition_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * If specified, the existing revision of object definitions in the schema that must be present for
+       * the write to succeed. If the revision specified differs (i.e. the underlying schema has changed),
+       * the write call will fail with a FAILED_PRECONDITION error.
+       * 
+ * + * string optional_definitions_revision_precondition = 2 [json_name = "optionalDefinitionsRevisionPrecondition"]; + * @return This builder for chaining. + */ + public Builder clearOptionalDefinitionsRevisionPrecondition() { + optionalDefinitionsRevisionPrecondition_ = getDefaultInstance().getOptionalDefinitionsRevisionPrecondition(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * If specified, the existing revision of object definitions in the schema that must be present for
+       * the write to succeed. If the revision specified differs (i.e. the underlying schema has changed),
+       * the write call will fail with a FAILED_PRECONDITION error.
+       * 
+ * + * string optional_definitions_revision_precondition = 2 [json_name = "optionalDefinitionsRevisionPrecondition"]; + * @param value The bytes for optionalDefinitionsRevisionPrecondition to set. + * @return This builder for chaining. + */ + public Builder setOptionalDefinitionsRevisionPreconditionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalDefinitionsRevisionPrecondition_ = 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.v1alpha1.WriteSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1alpha1.WriteSchemaRequest) + private static final com.authzed.api.v1alpha1.Schema.WriteSchemaRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1alpha1.Schema.WriteSchemaRequest(); + } + + public static com.authzed.api.v1alpha1.Schema.WriteSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteSchemaRequest 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.v1alpha1.Schema.WriteSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WriteSchemaResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1alpha1.WriteSchemaResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The names of the Object Definitions that were written.
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @return A list containing the objectDefinitionsNames. + */ + java.util.List + getObjectDefinitionsNamesList(); + /** + *
+     * The names of the Object Definitions that were written.
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @return The count of objectDefinitionsNames. + */ + int getObjectDefinitionsNamesCount(); + /** + *
+     * The names of the Object Definitions that were written.
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @param index The index of the element to return. + * @return The objectDefinitionsNames at the given index. + */ + java.lang.String getObjectDefinitionsNames(int index); + /** + *
+     * The names of the Object Definitions that were written.
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @param index The index of the value to return. + * @return The bytes of the objectDefinitionsNames at the given index. + */ + com.google.protobuf.ByteString + getObjectDefinitionsNamesBytes(int index); + + /** + *
+     * The computed revision of the written object definitions.
+     * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The computedDefinitionsRevision. + */ + java.lang.String getComputedDefinitionsRevision(); + /** + *
+     * The computed revision of the written object definitions.
+     * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The bytes for computedDefinitionsRevision. + */ + com.google.protobuf.ByteString + getComputedDefinitionsRevisionBytes(); + } + /** + *
+   * WriteSchemaResponse is the resulting data after having written a Schema to
+   * a Permissions System.
+   * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.WriteSchemaResponse} + */ + public static final class WriteSchemaResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1alpha1.WriteSchemaResponse) + WriteSchemaResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use WriteSchemaResponse.newBuilder() to construct. + private WriteSchemaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WriteSchemaResponse() { + objectDefinitionsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + computedDefinitionsRevision_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WriteSchemaResponse(); + } + + @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.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_WriteSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_WriteSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.Schema.WriteSchemaResponse.class, com.authzed.api.v1alpha1.Schema.WriteSchemaResponse.Builder.class); + } + + public static final int OBJECT_DEFINITIONS_NAMES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList objectDefinitionsNames_; + /** + *
+     * The names of the Object Definitions that were written.
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @return A list containing the objectDefinitionsNames. + */ + public com.google.protobuf.ProtocolStringList + getObjectDefinitionsNamesList() { + return objectDefinitionsNames_; + } + /** + *
+     * The names of the Object Definitions that were written.
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @return The count of objectDefinitionsNames. + */ + public int getObjectDefinitionsNamesCount() { + return objectDefinitionsNames_.size(); + } + /** + *
+     * The names of the Object Definitions that were written.
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @param index The index of the element to return. + * @return The objectDefinitionsNames at the given index. + */ + public java.lang.String getObjectDefinitionsNames(int index) { + return objectDefinitionsNames_.get(index); + } + /** + *
+     * The names of the Object Definitions that were written.
+     * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @param index The index of the value to return. + * @return The bytes of the objectDefinitionsNames at the given index. + */ + public com.google.protobuf.ByteString + getObjectDefinitionsNamesBytes(int index) { + return objectDefinitionsNames_.getByteString(index); + } + + public static final int COMPUTED_DEFINITIONS_REVISION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object computedDefinitionsRevision_ = ""; + /** + *
+     * The computed revision of the written object definitions.
+     * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The computedDefinitionsRevision. + */ + @java.lang.Override + public java.lang.String getComputedDefinitionsRevision() { + java.lang.Object ref = computedDefinitionsRevision_; + 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(); + computedDefinitionsRevision_ = s; + return s; + } + } + /** + *
+     * The computed revision of the written object definitions.
+     * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The bytes for computedDefinitionsRevision. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getComputedDefinitionsRevisionBytes() { + java.lang.Object ref = computedDefinitionsRevision_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + computedDefinitionsRevision_ = 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 { + for (int i = 0; i < objectDefinitionsNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectDefinitionsNames_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(computedDefinitionsRevision_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, computedDefinitionsRevision_); + } + 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 < objectDefinitionsNames_.size(); i++) { + dataSize += computeStringSizeNoTag(objectDefinitionsNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getObjectDefinitionsNamesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(computedDefinitionsRevision_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, computedDefinitionsRevision_); + } + 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.v1alpha1.Schema.WriteSchemaResponse)) { + return super.equals(obj); + } + com.authzed.api.v1alpha1.Schema.WriteSchemaResponse other = (com.authzed.api.v1alpha1.Schema.WriteSchemaResponse) obj; + + if (!getObjectDefinitionsNamesList() + .equals(other.getObjectDefinitionsNamesList())) return false; + if (!getComputedDefinitionsRevision() + .equals(other.getComputedDefinitionsRevision())) 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 (getObjectDefinitionsNamesCount() > 0) { + hash = (37 * hash) + OBJECT_DEFINITIONS_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getObjectDefinitionsNamesList().hashCode(); + } + hash = (37 * hash) + COMPUTED_DEFINITIONS_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getComputedDefinitionsRevision().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1alpha1.Schema.WriteSchemaResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaResponse 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.v1alpha1.Schema.WriteSchemaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaResponse 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.v1alpha1.Schema.WriteSchemaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaResponse 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.v1alpha1.Schema.WriteSchemaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaResponse 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.v1alpha1.Schema.WriteSchemaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.Schema.WriteSchemaResponse 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.v1alpha1.Schema.WriteSchemaResponse 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; + } + /** + *
+     * WriteSchemaResponse is the resulting data after having written a Schema to
+     * a Permissions System.
+     * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.WriteSchemaResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1alpha1.WriteSchemaResponse) + com.authzed.api.v1alpha1.Schema.WriteSchemaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_WriteSchemaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_WriteSchemaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.Schema.WriteSchemaResponse.class, com.authzed.api.v1alpha1.Schema.WriteSchemaResponse.Builder.class); + } + + // Construct using com.authzed.api.v1alpha1.Schema.WriteSchemaResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + objectDefinitionsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + computedDefinitionsRevision_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1alpha1.Schema.internal_static_authzed_api_v1alpha1_WriteSchemaResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.WriteSchemaResponse getDefaultInstanceForType() { + return com.authzed.api.v1alpha1.Schema.WriteSchemaResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.WriteSchemaResponse build() { + com.authzed.api.v1alpha1.Schema.WriteSchemaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.Schema.WriteSchemaResponse buildPartial() { + com.authzed.api.v1alpha1.Schema.WriteSchemaResponse result = new com.authzed.api.v1alpha1.Schema.WriteSchemaResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1alpha1.Schema.WriteSchemaResponse result) { + if (((bitField0_ & 0x00000001) != 0)) { + objectDefinitionsNames_ = objectDefinitionsNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.objectDefinitionsNames_ = objectDefinitionsNames_; + } + + private void buildPartial0(com.authzed.api.v1alpha1.Schema.WriteSchemaResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.computedDefinitionsRevision_ = computedDefinitionsRevision_; + } + } + + @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.v1alpha1.Schema.WriteSchemaResponse) { + return mergeFrom((com.authzed.api.v1alpha1.Schema.WriteSchemaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1alpha1.Schema.WriteSchemaResponse other) { + if (other == com.authzed.api.v1alpha1.Schema.WriteSchemaResponse.getDefaultInstance()) return this; + if (!other.objectDefinitionsNames_.isEmpty()) { + if (objectDefinitionsNames_.isEmpty()) { + objectDefinitionsNames_ = other.objectDefinitionsNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureObjectDefinitionsNamesIsMutable(); + objectDefinitionsNames_.addAll(other.objectDefinitionsNames_); + } + onChanged(); + } + if (!other.getComputedDefinitionsRevision().isEmpty()) { + computedDefinitionsRevision_ = other.computedDefinitionsRevision_; + 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: { + java.lang.String s = input.readStringRequireUtf8(); + ensureObjectDefinitionsNamesIsMutable(); + objectDefinitionsNames_.add(s); + break; + } // case 10 + case 18: { + computedDefinitionsRevision_ = 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.google.protobuf.LazyStringList objectDefinitionsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureObjectDefinitionsNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + objectDefinitionsNames_ = new com.google.protobuf.LazyStringArrayList(objectDefinitionsNames_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * The names of the Object Definitions that were written.
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @return A list containing the objectDefinitionsNames. + */ + public com.google.protobuf.ProtocolStringList + getObjectDefinitionsNamesList() { + return objectDefinitionsNames_.getUnmodifiableView(); + } + /** + *
+       * The names of the Object Definitions that were written.
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @return The count of objectDefinitionsNames. + */ + public int getObjectDefinitionsNamesCount() { + return objectDefinitionsNames_.size(); + } + /** + *
+       * The names of the Object Definitions that were written.
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @param index The index of the element to return. + * @return The objectDefinitionsNames at the given index. + */ + public java.lang.String getObjectDefinitionsNames(int index) { + return objectDefinitionsNames_.get(index); + } + /** + *
+       * The names of the Object Definitions that were written.
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @param index The index of the value to return. + * @return The bytes of the objectDefinitionsNames at the given index. + */ + public com.google.protobuf.ByteString + getObjectDefinitionsNamesBytes(int index) { + return objectDefinitionsNames_.getByteString(index); + } + /** + *
+       * The names of the Object Definitions that were written.
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @param index The index to set the value at. + * @param value The objectDefinitionsNames to set. + * @return This builder for chaining. + */ + public Builder setObjectDefinitionsNames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureObjectDefinitionsNamesIsMutable(); + objectDefinitionsNames_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * The names of the Object Definitions that were written.
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @param value The objectDefinitionsNames to add. + * @return This builder for chaining. + */ + public Builder addObjectDefinitionsNames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureObjectDefinitionsNamesIsMutable(); + objectDefinitionsNames_.add(value); + onChanged(); + return this; + } + /** + *
+       * The names of the Object Definitions that were written.
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @param values The objectDefinitionsNames to add. + * @return This builder for chaining. + */ + public Builder addAllObjectDefinitionsNames( + java.lang.Iterable values) { + ensureObjectDefinitionsNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objectDefinitionsNames_); + onChanged(); + return this; + } + /** + *
+       * The names of the Object Definitions that were written.
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @return This builder for chaining. + */ + public Builder clearObjectDefinitionsNames() { + objectDefinitionsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The names of the Object Definitions that were written.
+       * 
+ * + * repeated string object_definitions_names = 1 [json_name = "objectDefinitionsNames"]; + * @param value The bytes of the objectDefinitionsNames to add. + * @return This builder for chaining. + */ + public Builder addObjectDefinitionsNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureObjectDefinitionsNamesIsMutable(); + objectDefinitionsNames_.add(value); + onChanged(); + return this; + } + + private java.lang.Object computedDefinitionsRevision_ = ""; + /** + *
+       * The computed revision of the written object definitions.
+       * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The computedDefinitionsRevision. + */ + public java.lang.String getComputedDefinitionsRevision() { + java.lang.Object ref = computedDefinitionsRevision_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + computedDefinitionsRevision_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The computed revision of the written object definitions.
+       * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return The bytes for computedDefinitionsRevision. + */ + public com.google.protobuf.ByteString + getComputedDefinitionsRevisionBytes() { + java.lang.Object ref = computedDefinitionsRevision_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + computedDefinitionsRevision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The computed revision of the written object definitions.
+       * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @param value The computedDefinitionsRevision to set. + * @return This builder for chaining. + */ + public Builder setComputedDefinitionsRevision( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + computedDefinitionsRevision_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The computed revision of the written object definitions.
+       * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @return This builder for chaining. + */ + public Builder clearComputedDefinitionsRevision() { + computedDefinitionsRevision_ = getDefaultInstance().getComputedDefinitionsRevision(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * The computed revision of the written object definitions.
+       * 
+ * + * string computed_definitions_revision = 2 [json_name = "computedDefinitionsRevision"]; + * @param value The bytes for computedDefinitionsRevision to set. + * @return This builder for chaining. + */ + public Builder setComputedDefinitionsRevisionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + computedDefinitionsRevision_ = 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.v1alpha1.WriteSchemaResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1alpha1.WriteSchemaResponse) + private static final com.authzed.api.v1alpha1.Schema.WriteSchemaResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1alpha1.Schema.WriteSchemaResponse(); + } + + public static com.authzed.api.v1alpha1.Schema.WriteSchemaResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteSchemaResponse 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.v1alpha1.Schema.WriteSchemaResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1alpha1_ReadSchemaRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1alpha1_ReadSchemaRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1alpha1_ReadSchemaResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1alpha1_ReadSchemaResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1alpha1_WriteSchemaRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1alpha1_WriteSchemaRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1alpha1_WriteSchemaResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1alpha1_WriteSchemaResponse_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!authzed/api/v1alpha1/schema.proto\022\024aut" + + "hzed.api.v1alpha1\032\027validate/validate.pro" + + "to\"\235\001\n\021ReadSchemaRequest\022\207\001\n\030object_defi" + + "nitions_names\030\001 \003(\tBM\372BJ\222\001G\"ErC(\200\0012>^([a" + + "-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-" + + "9_]{1,62}[a-z0-9]$R\026objectDefinitionsNam" + + "es\"\207\001\n\022ReadSchemaResponse\022-\n\022object_defi" + + "nitions\030\001 \003(\tR\021objectDefinitions\022B\n\035comp" + + "uted_definitions_revision\030\002 \001(\tR\033compute" + + "dDefinitionsRevision\"\224\001\n\022WriteSchemaRequ" + + "est\022!\n\006schema\030\001 \001(\tB\t\372B\006r\004(\200\200\020R\006schema\022[" + + "\n*optional_definitions_revision_precondi" + + "tion\030\002 \001(\tR\'optionalDefinitionsRevisionP" + + "recondition\"\223\001\n\023WriteSchemaResponse\0228\n\030o" + + "bject_definitions_names\030\001 \003(\tR\026objectDef" + + "initionsNames\022B\n\035computed_definitions_re" + + "vision\030\002 \001(\tR\033computedDefinitionsRevisio" + + "n2\330\001\n\rSchemaService\022a\n\nReadSchema\022\'.auth" + + "zed.api.v1alpha1.ReadSchemaRequest\032(.aut" + + "hzed.api.v1alpha1.ReadSchemaResponse\"\000\022d" + + "\n\013WriteSchema\022(.authzed.api.v1alpha1.Wri" + + "teSchemaRequest\032).authzed.api.v1alpha1.W" + + "riteSchemaResponse\"\000BT\n\030com.authzed.api." + + "v1alpha1Z8github.com/authzed/authzed-go/" + + "proto/authzed/api/v1alpha1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + io.envoyproxy.pgv.validate.Validate.getDescriptor(), + }); + internal_static_authzed_api_v1alpha1_ReadSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_v1alpha1_ReadSchemaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1alpha1_ReadSchemaRequest_descriptor, + new java.lang.String[] { "ObjectDefinitionsNames", }); + internal_static_authzed_api_v1alpha1_ReadSchemaResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_v1alpha1_ReadSchemaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1alpha1_ReadSchemaResponse_descriptor, + new java.lang.String[] { "ObjectDefinitions", "ComputedDefinitionsRevision", }); + internal_static_authzed_api_v1alpha1_WriteSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authzed_api_v1alpha1_WriteSchemaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1alpha1_WriteSchemaRequest_descriptor, + new java.lang.String[] { "Schema", "OptionalDefinitionsRevisionPrecondition", }); + internal_static_authzed_api_v1alpha1_WriteSchemaResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_authzed_api_v1alpha1_WriteSchemaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1alpha1_WriteSchemaResponse_descriptor, + new java.lang.String[] { "ObjectDefinitionsNames", "ComputedDefinitionsRevision", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(io.envoyproxy.pgv.validate.Validate.rules); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + io.envoyproxy.pgv.validate.Validate.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/generated/com/authzed/api/v1alpha1/SchemaServiceGrpc.java b/generated/com/authzed/api/v1alpha1/SchemaServiceGrpc.java new file mode 100644 index 00000000..9b7e0c7f --- /dev/null +++ b/generated/com/authzed/api/v1alpha1/SchemaServiceGrpc.java @@ -0,0 +1,425 @@ +package com.authzed.api.v1alpha1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * SchemaService implements operations on a Permissions System's Schema.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: authzed/api/v1alpha1/schema.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SchemaServiceGrpc { + + private SchemaServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "authzed.api.v1alpha1.SchemaService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getReadSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReadSchema", + requestType = com.authzed.api.v1alpha1.Schema.ReadSchemaRequest.class, + responseType = com.authzed.api.v1alpha1.Schema.ReadSchemaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getReadSchemaMethod() { + io.grpc.MethodDescriptor getReadSchemaMethod; + if ((getReadSchemaMethod = SchemaServiceGrpc.getReadSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getReadSchemaMethod = SchemaServiceGrpc.getReadSchemaMethod) == null) { + SchemaServiceGrpc.getReadSchemaMethod = getReadSchemaMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReadSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1alpha1.Schema.ReadSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1alpha1.Schema.ReadSchemaResponse.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("ReadSchema")) + .build(); + } + } + } + return getReadSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor getWriteSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WriteSchema", + requestType = com.authzed.api.v1alpha1.Schema.WriteSchemaRequest.class, + responseType = com.authzed.api.v1alpha1.Schema.WriteSchemaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getWriteSchemaMethod() { + io.grpc.MethodDescriptor getWriteSchemaMethod; + if ((getWriteSchemaMethod = SchemaServiceGrpc.getWriteSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getWriteSchemaMethod = SchemaServiceGrpc.getWriteSchemaMethod) == null) { + SchemaServiceGrpc.getWriteSchemaMethod = getWriteSchemaMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WriteSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1alpha1.Schema.WriteSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1alpha1.Schema.WriteSchemaResponse.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("WriteSchema")) + .build(); + } + } + } + return getWriteSchemaMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static SchemaServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SchemaServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceStub(channel, callOptions); + } + }; + return SchemaServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SchemaServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SchemaServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceBlockingStub(channel, callOptions); + } + }; + return SchemaServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static SchemaServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SchemaServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceFutureStub(channel, callOptions); + } + }; + return SchemaServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   * SchemaService implements operations on a Permissions System's Schema.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Read returns the current Object Definitions for a Permissions System.
+     * Errors include:
+     * - INVALID_ARGUMENT: a provided value has failed to semantically validate
+     * - NOT_FOUND: one of the Object Definitions being requested does not exist
+     * 
+ */ + default void readSchema(com.authzed.api.v1alpha1.Schema.ReadSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReadSchemaMethod(), responseObserver); + } + + /** + *
+     * Write overwrites the current Object Definitions for a Permissions System.
+     * Any Object Definitions that exist, but are not included will be deleted.
+     * 
+ */ + default void writeSchema(com.authzed.api.v1alpha1.Schema.WriteSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWriteSchemaMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service SchemaService. + *
+   * SchemaService implements operations on a Permissions System's Schema.
+   * 
+ */ + public static abstract class SchemaServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return SchemaServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service SchemaService. + *
+   * SchemaService implements operations on a Permissions System's Schema.
+   * 
+ */ + public static final class SchemaServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private SchemaServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SchemaServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceStub(channel, callOptions); + } + + /** + *
+     * Read returns the current Object Definitions for a Permissions System.
+     * Errors include:
+     * - INVALID_ARGUMENT: a provided value has failed to semantically validate
+     * - NOT_FOUND: one of the Object Definitions being requested does not exist
+     * 
+ */ + public void readSchema(com.authzed.api.v1alpha1.Schema.ReadSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReadSchemaMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Write overwrites the current Object Definitions for a Permissions System.
+     * Any Object Definitions that exist, but are not included will be deleted.
+     * 
+ */ + public void writeSchema(com.authzed.api.v1alpha1.Schema.WriteSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getWriteSchemaMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service SchemaService. + *
+   * SchemaService implements operations on a Permissions System's Schema.
+   * 
+ */ + public static final class SchemaServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SchemaServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SchemaServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * Read returns the current Object Definitions for a Permissions System.
+     * Errors include:
+     * - INVALID_ARGUMENT: a provided value has failed to semantically validate
+     * - NOT_FOUND: one of the Object Definitions being requested does not exist
+     * 
+ */ + public com.authzed.api.v1alpha1.Schema.ReadSchemaResponse readSchema(com.authzed.api.v1alpha1.Schema.ReadSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReadSchemaMethod(), getCallOptions(), request); + } + + /** + *
+     * Write overwrites the current Object Definitions for a Permissions System.
+     * Any Object Definitions that exist, but are not included will be deleted.
+     * 
+ */ + public com.authzed.api.v1alpha1.Schema.WriteSchemaResponse writeSchema(com.authzed.api.v1alpha1.Schema.WriteSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getWriteSchemaMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service SchemaService. + *
+   * SchemaService implements operations on a Permissions System's Schema.
+   * 
+ */ + public static final class SchemaServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private SchemaServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SchemaServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceFutureStub(channel, callOptions); + } + + /** + *
+     * Read returns the current Object Definitions for a Permissions System.
+     * Errors include:
+     * - INVALID_ARGUMENT: a provided value has failed to semantically validate
+     * - NOT_FOUND: one of the Object Definitions being requested does not exist
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture readSchema( + com.authzed.api.v1alpha1.Schema.ReadSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReadSchemaMethod(), getCallOptions()), request); + } + + /** + *
+     * Write overwrites the current Object Definitions for a Permissions System.
+     * Any Object Definitions that exist, but are not included will be deleted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture writeSchema( + com.authzed.api.v1alpha1.Schema.WriteSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getWriteSchemaMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_READ_SCHEMA = 0; + private static final int METHODID_WRITE_SCHEMA = 1; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_READ_SCHEMA: + serviceImpl.readSchema((com.authzed.api.v1alpha1.Schema.ReadSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_WRITE_SCHEMA: + serviceImpl.writeSchema((com.authzed.api.v1alpha1.Schema.WriteSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getReadSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1alpha1.Schema.ReadSchemaRequest, + com.authzed.api.v1alpha1.Schema.ReadSchemaResponse>( + service, METHODID_READ_SCHEMA))) + .addMethod( + getWriteSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.authzed.api.v1alpha1.Schema.WriteSchemaRequest, + com.authzed.api.v1alpha1.Schema.WriteSchemaResponse>( + service, METHODID_WRITE_SCHEMA))) + .build(); + } + + private static abstract class SchemaServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SchemaServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.authzed.api.v1alpha1.Schema.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SchemaService"); + } + } + + private static final class SchemaServiceFileDescriptorSupplier + extends SchemaServiceBaseDescriptorSupplier { + SchemaServiceFileDescriptorSupplier() {} + } + + private static final class SchemaServiceMethodDescriptorSupplier + extends SchemaServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + SchemaServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SchemaServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SchemaServiceFileDescriptorSupplier()) + .addMethod(getReadSchemaMethod()) + .addMethod(getWriteSchemaMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/generated/com/authzed/api/v1alpha1/WatchResourcesServiceGrpc.java b/generated/com/authzed/api/v1alpha1/WatchResourcesServiceGrpc.java new file mode 100644 index 00000000..1b7709a6 --- /dev/null +++ b/generated/com/authzed/api/v1alpha1/WatchResourcesServiceGrpc.java @@ -0,0 +1,322 @@ +package com.authzed.api.v1alpha1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * WatchResourcesService is used to receive a stream of updates for resources of a
+ * specific (resource type, permission, subject) combination.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: authzed/api/v1alpha1/watchresources_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class WatchResourcesServiceGrpc { + + private WatchResourcesServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "authzed.api.v1alpha1.WatchResourcesService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getWatchResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WatchResources", + requestType = com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest.class, + responseType = com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getWatchResourcesMethod() { + io.grpc.MethodDescriptor getWatchResourcesMethod; + if ((getWatchResourcesMethod = WatchResourcesServiceGrpc.getWatchResourcesMethod) == null) { + synchronized (WatchResourcesServiceGrpc.class) { + if ((getWatchResourcesMethod = WatchResourcesServiceGrpc.getWatchResourcesMethod) == null) { + WatchResourcesServiceGrpc.getWatchResourcesMethod = getWatchResourcesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WatchResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse.getDefaultInstance())) + .setSchemaDescriptor(new WatchResourcesServiceMethodDescriptorSupplier("WatchResources")) + .build(); + } + } + } + return getWatchResourcesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static WatchResourcesServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchResourcesServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchResourcesServiceStub(channel, callOptions); + } + }; + return WatchResourcesServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static WatchResourcesServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchResourcesServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchResourcesServiceBlockingStub(channel, callOptions); + } + }; + return WatchResourcesServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static WatchResourcesServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WatchResourcesServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchResourcesServiceFutureStub(channel, callOptions); + } + }; + return WatchResourcesServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   * WatchResourcesService is used to receive a stream of updates for resources of a
+   * specific (resource type, permission, subject) combination.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * WatchResources initiates a watch for permission changes for the provided
+     * (resource type, permission, subject) pair.
+     * 
+ */ + default void watchResources(com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWatchResourcesMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service WatchResourcesService. + *
+   * WatchResourcesService is used to receive a stream of updates for resources of a
+   * specific (resource type, permission, subject) combination.
+   * 
+ */ + public static abstract class WatchResourcesServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return WatchResourcesServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service WatchResourcesService. + *
+   * WatchResourcesService is used to receive a stream of updates for resources of a
+   * specific (resource type, permission, subject) combination.
+   * 
+ */ + public static final class WatchResourcesServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private WatchResourcesServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchResourcesServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchResourcesServiceStub(channel, callOptions); + } + + /** + *
+     * WatchResources initiates a watch for permission changes for the provided
+     * (resource type, permission, subject) pair.
+     * 
+ */ + public void watchResources(com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getWatchResourcesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service WatchResourcesService. + *
+   * WatchResourcesService is used to receive a stream of updates for resources of a
+   * specific (resource type, permission, subject) combination.
+   * 
+ */ + public static final class WatchResourcesServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private WatchResourcesServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchResourcesServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchResourcesServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * WatchResources initiates a watch for permission changes for the provided
+     * (resource type, permission, subject) pair.
+     * 
+ */ + public java.util.Iterator watchResources( + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getWatchResourcesMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service WatchResourcesService. + *
+   * WatchResourcesService is used to receive a stream of updates for resources of a
+   * specific (resource type, permission, subject) combination.
+   * 
+ */ + public static final class WatchResourcesServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private WatchResourcesServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WatchResourcesServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WatchResourcesServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_WATCH_RESOURCES = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_WATCH_RESOURCES: + serviceImpl.watchResources((com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getWatchResourcesMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest, + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse>( + service, METHODID_WATCH_RESOURCES))) + .build(); + } + + private static abstract class WatchResourcesServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + WatchResourcesServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.authzed.api.v1alpha1.WatchresourcesService.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("WatchResourcesService"); + } + } + + private static final class WatchResourcesServiceFileDescriptorSupplier + extends WatchResourcesServiceBaseDescriptorSupplier { + WatchResourcesServiceFileDescriptorSupplier() {} + } + + private static final class WatchResourcesServiceMethodDescriptorSupplier + extends WatchResourcesServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + WatchResourcesServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (WatchResourcesServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new WatchResourcesServiceFileDescriptorSupplier()) + .addMethod(getWatchResourcesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/generated/com/authzed/api/v1alpha1/WatchresourcesService.java b/generated/com/authzed/api/v1alpha1/WatchresourcesService.java new file mode 100644 index 00000000..8a9b17f8 --- /dev/null +++ b/generated/com/authzed/api/v1alpha1/WatchresourcesService.java @@ -0,0 +1,3794 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authzed/api/v1alpha1/watchresources_service.proto + +package com.authzed.api.v1alpha1; + +public final class WatchresourcesService { + private WatchresourcesService() {} + 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 WatchResourcesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1alpha1.WatchResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * resource_object_type is the type of resource object for which we will
+     * watch for changes.
+     * 
+ * + * string resource_object_type = 1 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The resourceObjectType. + */ + java.lang.String getResourceObjectType(); + /** + *
+     * resource_object_type is the type of resource object for which we will
+     * watch for changes.
+     * 
+ * + * string resource_object_type = 1 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The bytes for resourceObjectType. + */ + com.google.protobuf.ByteString + getResourceObjectTypeBytes(); + + /** + *
+     * permission is the name of the permission or relation for which we will
+     * watch for changes.
+     * 
+ * + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + java.lang.String getPermission(); + /** + *
+     * permission is the name of the permission or relation for which we will
+     * watch for changes.
+     * 
+ * + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + *
+     * subject_object_type is the type of the subject resource for which we will
+     * watch for changes.
+     * 
+ * + * string subject_object_type = 3 [json_name = "subjectObjectType"]; + * @return The subjectObjectType. + */ + java.lang.String getSubjectObjectType(); + /** + *
+     * subject_object_type is the type of the subject resource for which we will
+     * watch for changes.
+     * 
+ * + * string subject_object_type = 3 [json_name = "subjectObjectType"]; + * @return The bytes for subjectObjectType. + */ + com.google.protobuf.ByteString + getSubjectObjectTypeBytes(); + + /** + *
+     * optional_subject_relation allows you to specify a group of subjects to watch
+     * for a given subject type.
+     * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The optionalSubjectRelation. + */ + java.lang.String getOptionalSubjectRelation(); + /** + *
+     * optional_subject_relation allows you to specify a group of subjects to watch
+     * for a given subject type.
+     * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The bytes for optionalSubjectRelation. + */ + com.google.protobuf.ByteString + getOptionalSubjectRelationBytes(); + + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + * @return Whether the optionalStartCursor field is set. + */ + boolean hasOptionalStartCursor(); + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + * @return The optionalStartCursor. + */ + com.authzed.api.v1.ZedToken getOptionalStartCursor(); + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartCursorOrBuilder(); + } + /** + *
+   * WatchResourcesRequest starts a watch for specific permission updates
+   * for the given resource and subject types.
+   * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.WatchResourcesRequest} + */ + public static final class WatchResourcesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1alpha1.WatchResourcesRequest) + WatchResourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use WatchResourcesRequest.newBuilder() to construct. + private WatchResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WatchResourcesRequest() { + resourceObjectType_ = ""; + permission_ = ""; + subjectObjectType_ = ""; + optionalSubjectRelation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WatchResourcesRequest(); + } + + @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.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_WatchResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_WatchResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest.class, com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest.Builder.class); + } + + public static final int RESOURCE_OBJECT_TYPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceObjectType_ = ""; + /** + *
+     * resource_object_type is the type of resource object for which we will
+     * watch for changes.
+     * 
+ * + * string resource_object_type = 1 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The resourceObjectType. + */ + @java.lang.Override + public java.lang.String getResourceObjectType() { + java.lang.Object ref = resourceObjectType_; + 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(); + resourceObjectType_ = s; + return s; + } + } + /** + *
+     * resource_object_type is the type of resource object for which we will
+     * watch for changes.
+     * 
+ * + * string resource_object_type = 1 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The bytes for resourceObjectType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceObjectTypeBytes() { + java.lang.Object ref = resourceObjectType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceObjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object permission_ = ""; + /** + *
+     * permission is the name of the permission or relation for which we will
+     * watch for changes.
+     * 
+ * + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + 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(); + permission_ = s; + return s; + } + } + /** + *
+     * permission is the name of the permission or relation for which we will
+     * watch for changes.
+     * 
+ * + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_OBJECT_TYPE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object subjectObjectType_ = ""; + /** + *
+     * subject_object_type is the type of the subject resource for which we will
+     * watch for changes.
+     * 
+ * + * string subject_object_type = 3 [json_name = "subjectObjectType"]; + * @return The subjectObjectType. + */ + @java.lang.Override + public java.lang.String getSubjectObjectType() { + java.lang.Object ref = subjectObjectType_; + 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(); + subjectObjectType_ = s; + return s; + } + } + /** + *
+     * subject_object_type is the type of the subject resource for which we will
+     * watch for changes.
+     * 
+ * + * string subject_object_type = 3 [json_name = "subjectObjectType"]; + * @return The bytes for subjectObjectType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectObjectTypeBytes() { + java.lang.Object ref = subjectObjectType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectObjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_SUBJECT_RELATION_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object optionalSubjectRelation_ = ""; + /** + *
+     * optional_subject_relation allows you to specify a group of subjects to watch
+     * for a given subject type.
+     * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The optionalSubjectRelation. + */ + @java.lang.Override + public java.lang.String getOptionalSubjectRelation() { + java.lang.Object ref = optionalSubjectRelation_; + 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(); + optionalSubjectRelation_ = s; + return s; + } + } + /** + *
+     * optional_subject_relation allows you to specify a group of subjects to watch
+     * for a given subject type.
+     * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The bytes for optionalSubjectRelation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOptionalSubjectRelationBytes() { + java.lang.Object ref = optionalSubjectRelation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalSubjectRelation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONAL_START_CURSOR_FIELD_NUMBER = 5; + private com.authzed.api.v1.ZedToken optionalStartCursor_; + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + * @return Whether the optionalStartCursor field is set. + */ + @java.lang.Override + public boolean hasOptionalStartCursor() { + return optionalStartCursor_ != null; + } + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + * @return The optionalStartCursor. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getOptionalStartCursor() { + return optionalStartCursor_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartCursor_; + } + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartCursorOrBuilder() { + return optionalStartCursor_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartCursor_; + } + + 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(resourceObjectType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceObjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permission_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectObjectType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subjectObjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalSubjectRelation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, optionalSubjectRelation_); + } + if (optionalStartCursor_ != null) { + output.writeMessage(5, getOptionalStartCursor()); + } + 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(resourceObjectType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceObjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(permission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, permission_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectObjectType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subjectObjectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optionalSubjectRelation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, optionalSubjectRelation_); + } + if (optionalStartCursor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getOptionalStartCursor()); + } + 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.v1alpha1.WatchresourcesService.WatchResourcesRequest)) { + return super.equals(obj); + } + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest other = (com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest) obj; + + if (!getResourceObjectType() + .equals(other.getResourceObjectType())) return false; + if (!getPermission() + .equals(other.getPermission())) return false; + if (!getSubjectObjectType() + .equals(other.getSubjectObjectType())) return false; + if (!getOptionalSubjectRelation() + .equals(other.getOptionalSubjectRelation())) return false; + if (hasOptionalStartCursor() != other.hasOptionalStartCursor()) return false; + if (hasOptionalStartCursor()) { + if (!getOptionalStartCursor() + .equals(other.getOptionalStartCursor())) 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) + RESOURCE_OBJECT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceObjectType().hashCode(); + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + hash = (37 * hash) + SUBJECT_OBJECT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getSubjectObjectType().hashCode(); + hash = (37 * hash) + OPTIONAL_SUBJECT_RELATION_FIELD_NUMBER; + hash = (53 * hash) + getOptionalSubjectRelation().hashCode(); + if (hasOptionalStartCursor()) { + hash = (37 * hash) + OPTIONAL_START_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getOptionalStartCursor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest 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.v1alpha1.WatchresourcesService.WatchResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest 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.v1alpha1.WatchresourcesService.WatchResourcesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest 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.v1alpha1.WatchresourcesService.WatchResourcesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest 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.v1alpha1.WatchresourcesService.WatchResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest 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.v1alpha1.WatchresourcesService.WatchResourcesRequest 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; + } + /** + *
+     * WatchResourcesRequest starts a watch for specific permission updates
+     * for the given resource and subject types.
+     * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.WatchResourcesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1alpha1.WatchResourcesRequest) + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_WatchResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_WatchResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest.class, com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest.Builder.class); + } + + // Construct using com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceObjectType_ = ""; + permission_ = ""; + subjectObjectType_ = ""; + optionalSubjectRelation_ = ""; + optionalStartCursor_ = null; + if (optionalStartCursorBuilder_ != null) { + optionalStartCursorBuilder_.dispose(); + optionalStartCursorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_WatchResourcesRequest_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest getDefaultInstanceForType() { + return com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest build() { + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest buildPartial() { + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest result = new com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceObjectType_ = resourceObjectType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.permission_ = permission_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subjectObjectType_ = subjectObjectType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.optionalSubjectRelation_ = optionalSubjectRelation_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.optionalStartCursor_ = optionalStartCursorBuilder_ == null + ? optionalStartCursor_ + : optionalStartCursorBuilder_.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.v1alpha1.WatchresourcesService.WatchResourcesRequest) { + return mergeFrom((com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest other) { + if (other == com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest.getDefaultInstance()) return this; + if (!other.getResourceObjectType().isEmpty()) { + resourceObjectType_ = other.resourceObjectType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSubjectObjectType().isEmpty()) { + subjectObjectType_ = other.subjectObjectType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOptionalSubjectRelation().isEmpty()) { + optionalSubjectRelation_ = other.optionalSubjectRelation_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasOptionalStartCursor()) { + mergeOptionalStartCursor(other.getOptionalStartCursor()); + } + 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: { + resourceObjectType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + permission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + subjectObjectType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + optionalSubjectRelation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getOptionalStartCursorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 resourceObjectType_ = ""; + /** + *
+       * resource_object_type is the type of resource object for which we will
+       * watch for changes.
+       * 
+ * + * string resource_object_type = 1 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The resourceObjectType. + */ + public java.lang.String getResourceObjectType() { + java.lang.Object ref = resourceObjectType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceObjectType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * resource_object_type is the type of resource object for which we will
+       * watch for changes.
+       * 
+ * + * string resource_object_type = 1 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return The bytes for resourceObjectType. + */ + public com.google.protobuf.ByteString + getResourceObjectTypeBytes() { + java.lang.Object ref = resourceObjectType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceObjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * resource_object_type is the type of resource object for which we will
+       * watch for changes.
+       * 
+ * + * string resource_object_type = 1 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @param value The resourceObjectType to set. + * @return This builder for chaining. + */ + public Builder setResourceObjectType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceObjectType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * resource_object_type is the type of resource object for which we will
+       * watch for changes.
+       * 
+ * + * string resource_object_type = 1 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearResourceObjectType() { + resourceObjectType_ = getDefaultInstance().getResourceObjectType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * resource_object_type is the type of resource object for which we will
+       * watch for changes.
+       * 
+ * + * string resource_object_type = 1 [json_name = "resourceObjectType", (.validate.rules) = { ... } + * @param value The bytes for resourceObjectType to set. + * @return This builder for chaining. + */ + public Builder setResourceObjectTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceObjectType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object permission_ = ""; + /** + *
+       * permission is the name of the permission or relation for which we will
+       * watch for changes.
+       * 
+ * + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * permission is the name of the permission or relation for which we will
+       * watch for changes.
+       * 
+ * + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * permission is the name of the permission or relation for which we will
+       * watch for changes.
+       * 
+ * + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + permission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * permission is the name of the permission or relation for which we will
+       * watch for changes.
+       * 
+ * + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @return This builder for chaining. + */ + public Builder clearPermission() { + permission_ = getDefaultInstance().getPermission(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * permission is the name of the permission or relation for which we will
+       * watch for changes.
+       * 
+ * + * string permission = 2 [json_name = "permission", (.validate.rules) = { ... } + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + permission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object subjectObjectType_ = ""; + /** + *
+       * subject_object_type is the type of the subject resource for which we will
+       * watch for changes.
+       * 
+ * + * string subject_object_type = 3 [json_name = "subjectObjectType"]; + * @return The subjectObjectType. + */ + public java.lang.String getSubjectObjectType() { + java.lang.Object ref = subjectObjectType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectObjectType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * subject_object_type is the type of the subject resource for which we will
+       * watch for changes.
+       * 
+ * + * string subject_object_type = 3 [json_name = "subjectObjectType"]; + * @return The bytes for subjectObjectType. + */ + public com.google.protobuf.ByteString + getSubjectObjectTypeBytes() { + java.lang.Object ref = subjectObjectType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectObjectType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * subject_object_type is the type of the subject resource for which we will
+       * watch for changes.
+       * 
+ * + * string subject_object_type = 3 [json_name = "subjectObjectType"]; + * @param value The subjectObjectType to set. + * @return This builder for chaining. + */ + public Builder setSubjectObjectType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subjectObjectType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * subject_object_type is the type of the subject resource for which we will
+       * watch for changes.
+       * 
+ * + * string subject_object_type = 3 [json_name = "subjectObjectType"]; + * @return This builder for chaining. + */ + public Builder clearSubjectObjectType() { + subjectObjectType_ = getDefaultInstance().getSubjectObjectType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * subject_object_type is the type of the subject resource for which we will
+       * watch for changes.
+       * 
+ * + * string subject_object_type = 3 [json_name = "subjectObjectType"]; + * @param value The bytes for subjectObjectType to set. + * @return This builder for chaining. + */ + public Builder setSubjectObjectTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subjectObjectType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object optionalSubjectRelation_ = ""; + /** + *
+       * optional_subject_relation allows you to specify a group of subjects to watch
+       * for a given subject type.
+       * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The optionalSubjectRelation. + */ + public java.lang.String getOptionalSubjectRelation() { + java.lang.Object ref = optionalSubjectRelation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionalSubjectRelation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * optional_subject_relation allows you to specify a group of subjects to watch
+       * for a given subject type.
+       * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return The bytes for optionalSubjectRelation. + */ + public com.google.protobuf.ByteString + getOptionalSubjectRelationBytes() { + java.lang.Object ref = optionalSubjectRelation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionalSubjectRelation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * optional_subject_relation allows you to specify a group of subjects to watch
+       * for a given subject type.
+       * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @param value The optionalSubjectRelation to set. + * @return This builder for chaining. + */ + public Builder setOptionalSubjectRelation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + optionalSubjectRelation_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * optional_subject_relation allows you to specify a group of subjects to watch
+       * for a given subject type.
+       * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @return This builder for chaining. + */ + public Builder clearOptionalSubjectRelation() { + optionalSubjectRelation_ = getDefaultInstance().getOptionalSubjectRelation(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+       * optional_subject_relation allows you to specify a group of subjects to watch
+       * for a given subject type.
+       * 
+ * + * string optional_subject_relation = 4 [json_name = "optionalSubjectRelation"]; + * @param value The bytes for optionalSubjectRelation to set. + * @return This builder for chaining. + */ + public Builder setOptionalSubjectRelationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + optionalSubjectRelation_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.authzed.api.v1.ZedToken optionalStartCursor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> optionalStartCursorBuilder_; + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + * @return Whether the optionalStartCursor field is set. + */ + public boolean hasOptionalStartCursor() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + * @return The optionalStartCursor. + */ + public com.authzed.api.v1.ZedToken getOptionalStartCursor() { + if (optionalStartCursorBuilder_ == null) { + return optionalStartCursor_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartCursor_; + } else { + return optionalStartCursorBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + */ + public Builder setOptionalStartCursor(com.authzed.api.v1.ZedToken value) { + if (optionalStartCursorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optionalStartCursor_ = value; + } else { + optionalStartCursorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + */ + public Builder setOptionalStartCursor( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (optionalStartCursorBuilder_ == null) { + optionalStartCursor_ = builderForValue.build(); + } else { + optionalStartCursorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + */ + public Builder mergeOptionalStartCursor(com.authzed.api.v1.ZedToken value) { + if (optionalStartCursorBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + optionalStartCursor_ != null && + optionalStartCursor_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getOptionalStartCursorBuilder().mergeFrom(value); + } else { + optionalStartCursor_ = value; + } + } else { + optionalStartCursorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + */ + public Builder clearOptionalStartCursor() { + bitField0_ = (bitField0_ & ~0x00000010); + optionalStartCursor_ = null; + if (optionalStartCursorBuilder_ != null) { + optionalStartCursorBuilder_.dispose(); + optionalStartCursorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + */ + public com.authzed.api.v1.ZedToken.Builder getOptionalStartCursorBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getOptionalStartCursorFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getOptionalStartCursorOrBuilder() { + if (optionalStartCursorBuilder_ != null) { + return optionalStartCursorBuilder_.getMessageOrBuilder(); + } else { + return optionalStartCursor_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : optionalStartCursor_; + } + } + /** + * .authzed.api.v1.ZedToken optional_start_cursor = 5 [json_name = "optionalStartCursor"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getOptionalStartCursorFieldBuilder() { + if (optionalStartCursorBuilder_ == null) { + optionalStartCursorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getOptionalStartCursor(), + getParentForChildren(), + isClean()); + optionalStartCursor_ = null; + } + return optionalStartCursorBuilder_; + } + @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.v1alpha1.WatchResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1alpha1.WatchResourcesRequest) + private static final com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest(); + } + + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WatchResourcesRequest 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.v1alpha1.WatchresourcesService.WatchResourcesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PermissionUpdateOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1alpha1.PermissionUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * subject defines the subject resource whose permissions have changed.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + * @return Whether the subject field is set. + */ + boolean hasSubject(); + /** + *
+     * subject defines the subject resource whose permissions have changed.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + * @return The subject. + */ + com.authzed.api.v1.SubjectReference getSubject(); + /** + *
+     * subject defines the subject resource whose permissions have changed.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + */ + com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder(); + + /** + *
+     * resource defines the specific object in the system.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+     * resource defines the specific object in the system.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return The resource. + */ + com.authzed.api.v1.ObjectReference getResource(); + /** + *
+     * resource defines the specific object in the system.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder(); + + /** + * string relation = 3 [json_name = "relation"]; + * @return The relation. + */ + java.lang.String getRelation(); + /** + * string relation = 3 [json_name = "relation"]; + * @return The bytes for relation. + */ + com.google.protobuf.ByteString + getRelationBytes(); + + /** + * .authzed.api.v1alpha1.PermissionUpdate.Permissionship updated_permission = 4 [json_name = "updatedPermission"]; + * @return The enum numeric value on the wire for updatedPermission. + */ + int getUpdatedPermissionValue(); + /** + * .authzed.api.v1alpha1.PermissionUpdate.Permissionship updated_permission = 4 [json_name = "updatedPermission"]; + * @return The updatedPermission. + */ + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship getUpdatedPermission(); + } + /** + *
+   * PermissionUpdate represents a single permission update for a specific
+   * subject's permissions.
+   * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.PermissionUpdate} + */ + public static final class PermissionUpdate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1alpha1.PermissionUpdate) + PermissionUpdateOrBuilder { + private static final long serialVersionUID = 0L; + // Use PermissionUpdate.newBuilder() to construct. + private PermissionUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PermissionUpdate() { + relation_ = ""; + updatedPermission_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PermissionUpdate(); + } + + @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.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_PermissionUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_PermissionUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.class, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder.class); + } + + /** + *
+     * todo: work this into the v1 core API at some point since it's used
+     * across services.
+     * 
+ * + * Protobuf enum {@code authzed.api.v1alpha1.PermissionUpdate.Permissionship} + */ + public enum Permissionship + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PERMISSIONSHIP_UNSPECIFIED = 0; + */ + PERMISSIONSHIP_UNSPECIFIED(0), + /** + * PERMISSIONSHIP_NO_PERMISSION = 1; + */ + PERMISSIONSHIP_NO_PERMISSION(1), + /** + * PERMISSIONSHIP_HAS_PERMISSION = 2; + */ + PERMISSIONSHIP_HAS_PERMISSION(2), + UNRECOGNIZED(-1), + ; + + /** + * PERMISSIONSHIP_UNSPECIFIED = 0; + */ + public static final int PERMISSIONSHIP_UNSPECIFIED_VALUE = 0; + /** + * PERMISSIONSHIP_NO_PERMISSION = 1; + */ + public static final int PERMISSIONSHIP_NO_PERMISSION_VALUE = 1; + /** + * PERMISSIONSHIP_HAS_PERMISSION = 2; + */ + public static final int PERMISSIONSHIP_HAS_PERMISSION_VALUE = 2; + + + 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 Permissionship 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 Permissionship forNumber(int value) { + switch (value) { + case 0: return PERMISSIONSHIP_UNSPECIFIED; + case 1: return PERMISSIONSHIP_NO_PERMISSION; + case 2: return PERMISSIONSHIP_HAS_PERMISSION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Permissionship> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Permissionship findValueByNumber(int number) { + return Permissionship.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.v1alpha1.WatchresourcesService.PermissionUpdate.getDescriptor().getEnumTypes().get(0); + } + + private static final Permissionship[] VALUES = values(); + + public static Permissionship 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 Permissionship(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authzed.api.v1alpha1.PermissionUpdate.Permissionship) + } + + public static final int SUBJECT_FIELD_NUMBER = 1; + private com.authzed.api.v1.SubjectReference subject_; + /** + *
+     * subject defines the subject resource whose permissions have changed.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + * @return Whether the subject field is set. + */ + @java.lang.Override + public boolean hasSubject() { + return subject_ != null; + } + /** + *
+     * subject defines the subject resource whose permissions have changed.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + * @return The subject. + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReference getSubject() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + /** + *
+     * subject defines the subject resource whose permissions have changed.
+     * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + */ + @java.lang.Override + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + + public static final int RESOURCE_FIELD_NUMBER = 2; + private com.authzed.api.v1.ObjectReference resource_; + /** + *
+     * resource defines the specific object in the system.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+     * resource defines the specific object in the system.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return The resource. + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReference getResource() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + /** + *
+     * resource defines the specific object in the system.
+     * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + @java.lang.Override + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + + public static final int RELATION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object relation_ = ""; + /** + * string relation = 3 [json_name = "relation"]; + * @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; + } + } + /** + * string relation = 3 [json_name = "relation"]; + * @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 UPDATED_PERMISSION_FIELD_NUMBER = 4; + private int updatedPermission_ = 0; + /** + * .authzed.api.v1alpha1.PermissionUpdate.Permissionship updated_permission = 4 [json_name = "updatedPermission"]; + * @return The enum numeric value on the wire for updatedPermission. + */ + @java.lang.Override public int getUpdatedPermissionValue() { + return updatedPermission_; + } + /** + * .authzed.api.v1alpha1.PermissionUpdate.Permissionship updated_permission = 4 [json_name = "updatedPermission"]; + * @return The updatedPermission. + */ + @java.lang.Override public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship getUpdatedPermission() { + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship result = com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship.forNumber(updatedPermission_); + return result == null ? com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship.UNRECOGNIZED : result; + } + + 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 (subject_ != null) { + output.writeMessage(1, getSubject()); + } + if (resource_ != null) { + output.writeMessage(2, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, relation_); + } + if (updatedPermission_ != com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + output.writeEnum(4, updatedPermission_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (subject_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSubject()); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getResource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, relation_); + } + if (updatedPermission_ != com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship.PERMISSIONSHIP_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, updatedPermission_); + } + 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.v1alpha1.WatchresourcesService.PermissionUpdate)) { + return super.equals(obj); + } + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate other = (com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate) obj; + + if (hasSubject() != other.hasSubject()) return false; + if (hasSubject()) { + if (!getSubject() + .equals(other.getSubject())) return false; + } + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (!getRelation() + .equals(other.getRelation())) return false; + if (updatedPermission_ != other.updatedPermission_) 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 (hasSubject()) { + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().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(); + hash = (37 * hash) + UPDATED_PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + updatedPermission_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate 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.v1alpha1.WatchresourcesService.PermissionUpdate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate 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.v1alpha1.WatchresourcesService.PermissionUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate 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.v1alpha1.WatchresourcesService.PermissionUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate 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.v1alpha1.WatchresourcesService.PermissionUpdate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate 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.v1alpha1.WatchresourcesService.PermissionUpdate 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; + } + /** + *
+     * PermissionUpdate represents a single permission update for a specific
+     * subject's permissions.
+     * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.PermissionUpdate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1alpha1.PermissionUpdate) + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_PermissionUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_PermissionUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.class, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder.class); + } + + // Construct using com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + relation_ = ""; + updatedPermission_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_PermissionUpdate_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate getDefaultInstanceForType() { + return com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate build() { + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate buildPartial() { + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate result = new com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subject_ = subjectBuilder_ == null + ? subject_ + : subjectBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resource_ = resourceBuilder_ == null + ? resource_ + : resourceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.relation_ = relation_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updatedPermission_ = updatedPermission_; + } + } + + @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.v1alpha1.WatchresourcesService.PermissionUpdate) { + return mergeFrom((com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate other) { + if (other == com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.getDefaultInstance()) return this; + if (other.hasSubject()) { + mergeSubject(other.getSubject()); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (!other.getRelation().isEmpty()) { + relation_ = other.relation_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.updatedPermission_ != 0) { + setUpdatedPermissionValue(other.getUpdatedPermissionValue()); + } + 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( + getSubjectFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getResourceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + relation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + updatedPermission_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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.SubjectReference subject_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> subjectBuilder_; + /** + *
+       * subject defines the subject resource whose permissions have changed.
+       * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + * @return Whether the subject field is set. + */ + public boolean hasSubject() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+       * subject defines the subject resource whose permissions have changed.
+       * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + * @return The subject. + */ + public com.authzed.api.v1.SubjectReference getSubject() { + if (subjectBuilder_ == null) { + return subject_ == null ? com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } else { + return subjectBuilder_.getMessage(); + } + } + /** + *
+       * subject defines the subject resource whose permissions have changed.
+       * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + */ + public Builder setSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subject_ = value; + } else { + subjectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * subject defines the subject resource whose permissions have changed.
+       * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + */ + public Builder setSubject( + com.authzed.api.v1.SubjectReference.Builder builderForValue) { + if (subjectBuilder_ == null) { + subject_ = builderForValue.build(); + } else { + subjectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * subject defines the subject resource whose permissions have changed.
+       * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + */ + public Builder mergeSubject(com.authzed.api.v1.SubjectReference value) { + if (subjectBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subject_ != null && + subject_ != com.authzed.api.v1.SubjectReference.getDefaultInstance()) { + getSubjectBuilder().mergeFrom(value); + } else { + subject_ = value; + } + } else { + subjectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * subject defines the subject resource whose permissions have changed.
+       * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + */ + public Builder clearSubject() { + bitField0_ = (bitField0_ & ~0x00000001); + subject_ = null; + if (subjectBuilder_ != null) { + subjectBuilder_.dispose(); + subjectBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * subject defines the subject resource whose permissions have changed.
+       * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + */ + public com.authzed.api.v1.SubjectReference.Builder getSubjectBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectFieldBuilder().getBuilder(); + } + /** + *
+       * subject defines the subject resource whose permissions have changed.
+       * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + */ + public com.authzed.api.v1.SubjectReferenceOrBuilder getSubjectOrBuilder() { + if (subjectBuilder_ != null) { + return subjectBuilder_.getMessageOrBuilder(); + } else { + return subject_ == null ? + com.authzed.api.v1.SubjectReference.getDefaultInstance() : subject_; + } + } + /** + *
+       * subject defines the subject resource whose permissions have changed.
+       * 
+ * + * .authzed.api.v1.SubjectReference subject = 1 [json_name = "subject"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder> + getSubjectFieldBuilder() { + if (subjectBuilder_ == null) { + subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.SubjectReference, com.authzed.api.v1.SubjectReference.Builder, com.authzed.api.v1.SubjectReferenceOrBuilder>( + getSubject(), + getParentForChildren(), + isClean()); + subject_ = null; + } + return subjectBuilder_; + } + + private com.authzed.api.v1.ObjectReference resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> resourceBuilder_; + /** + *
+       * resource defines the specific object in the system.
+       * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * resource defines the specific object in the system.
+       * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + * @return The resource. + */ + public com.authzed.api.v1.ObjectReference getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+       * resource defines the specific object in the system.
+       * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public Builder setResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + } else { + resourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * resource defines the specific object in the system.
+       * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public Builder setResource( + com.authzed.api.v1.ObjectReference.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * resource defines the specific object in the system.
+       * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public Builder mergeResource(com.authzed.api.v1.ObjectReference value) { + if (resourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + resource_ != null && + resource_ != com.authzed.api.v1.ObjectReference.getDefaultInstance()) { + getResourceBuilder().mergeFrom(value); + } else { + resource_ = value; + } + } else { + resourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * resource defines the specific object in the system.
+       * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public Builder clearResource() { + bitField0_ = (bitField0_ & ~0x00000002); + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * resource defines the specific object in the system.
+       * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public com.authzed.api.v1.ObjectReference.Builder getResourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+       * resource defines the specific object in the system.
+       * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + public com.authzed.api.v1.ObjectReferenceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.authzed.api.v1.ObjectReference.getDefaultInstance() : resource_; + } + } + /** + *
+       * resource defines the specific object in the system.
+       * 
+ * + * .authzed.api.v1.ObjectReference resource = 2 [json_name = "resource"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ObjectReference, com.authzed.api.v1.ObjectReference.Builder, com.authzed.api.v1.ObjectReferenceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private java.lang.Object relation_ = ""; + /** + * string relation = 3 [json_name = "relation"]; + * @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; + } + } + /** + * string relation = 3 [json_name = "relation"]; + * @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; + } + } + /** + * string relation = 3 [json_name = "relation"]; + * @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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string relation = 3 [json_name = "relation"]; + * @return This builder for chaining. + */ + public Builder clearRelation() { + relation_ = getDefaultInstance().getRelation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string relation = 3 [json_name = "relation"]; + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private int updatedPermission_ = 0; + /** + * .authzed.api.v1alpha1.PermissionUpdate.Permissionship updated_permission = 4 [json_name = "updatedPermission"]; + * @return The enum numeric value on the wire for updatedPermission. + */ + @java.lang.Override public int getUpdatedPermissionValue() { + return updatedPermission_; + } + /** + * .authzed.api.v1alpha1.PermissionUpdate.Permissionship updated_permission = 4 [json_name = "updatedPermission"]; + * @param value The enum numeric value on the wire for updatedPermission to set. + * @return This builder for chaining. + */ + public Builder setUpdatedPermissionValue(int value) { + updatedPermission_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .authzed.api.v1alpha1.PermissionUpdate.Permissionship updated_permission = 4 [json_name = "updatedPermission"]; + * @return The updatedPermission. + */ + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship getUpdatedPermission() { + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship result = com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship.forNumber(updatedPermission_); + return result == null ? com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship.UNRECOGNIZED : result; + } + /** + * .authzed.api.v1alpha1.PermissionUpdate.Permissionship updated_permission = 4 [json_name = "updatedPermission"]; + * @param value The updatedPermission to set. + * @return This builder for chaining. + */ + public Builder setUpdatedPermission(com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Permissionship value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + updatedPermission_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .authzed.api.v1alpha1.PermissionUpdate.Permissionship updated_permission = 4 [json_name = "updatedPermission"]; + * @return This builder for chaining. + */ + public Builder clearUpdatedPermission() { + bitField0_ = (bitField0_ & ~0x00000008); + updatedPermission_ = 0; + 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.v1alpha1.PermissionUpdate) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1alpha1.PermissionUpdate) + private static final com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate(); + } + + public static com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PermissionUpdate 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.v1alpha1.WatchresourcesService.PermissionUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WatchResourcesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authzed.api.v1alpha1.WatchResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + java.util.List + getUpdatesList(); + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate getUpdates(int index); + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + int getUpdatesCount(); + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + java.util.List + getUpdatesOrBuilderList(); + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdateOrBuilder getUpdatesOrBuilder( + int index); + + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return Whether the changesThrough field is set. + */ + boolean hasChangesThrough(); + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return The changesThrough. + */ + com.authzed.api.v1.ZedToken getChangesThrough(); + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + com.authzed.api.v1.ZedTokenOrBuilder getChangesThroughOrBuilder(); + } + /** + *
+   * WatchResourcesResponse enumerates the list of permission updates that have
+   * occurred as a result of one or more relationship updates.
+   * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.WatchResourcesResponse} + */ + public static final class WatchResourcesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authzed.api.v1alpha1.WatchResourcesResponse) + WatchResourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use WatchResourcesResponse.newBuilder() to construct. + private WatchResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WatchResourcesResponse() { + updates_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WatchResourcesResponse(); + } + + @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.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_WatchResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_WatchResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse.class, com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse.Builder.class); + } + + public static final int UPDATES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List updates_; + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + @java.lang.Override + public java.util.List getUpdatesList() { + return updates_; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + @java.lang.Override + public java.util.List + getUpdatesOrBuilderList() { + return updates_; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + @java.lang.Override + public int getUpdatesCount() { + return updates_.size(); + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate getUpdates(int index) { + return updates_.get(index); + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdateOrBuilder getUpdatesOrBuilder( + int index) { + return updates_.get(index); + } + + public static final int CHANGES_THROUGH_FIELD_NUMBER = 2; + private com.authzed.api.v1.ZedToken changesThrough_; + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return Whether the changesThrough field is set. + */ + @java.lang.Override + public boolean hasChangesThrough() { + return changesThrough_ != null; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return The changesThrough. + */ + @java.lang.Override + public com.authzed.api.v1.ZedToken getChangesThrough() { + return changesThrough_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : changesThrough_; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + @java.lang.Override + public com.authzed.api.v1.ZedTokenOrBuilder getChangesThroughOrBuilder() { + return changesThrough_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : changesThrough_; + } + + 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 < updates_.size(); i++) { + output.writeMessage(1, updates_.get(i)); + } + if (changesThrough_ != null) { + output.writeMessage(2, getChangesThrough()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < updates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, updates_.get(i)); + } + if (changesThrough_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getChangesThrough()); + } + 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.v1alpha1.WatchresourcesService.WatchResourcesResponse)) { + return super.equals(obj); + } + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse other = (com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse) obj; + + if (!getUpdatesList() + .equals(other.getUpdatesList())) return false; + if (hasChangesThrough() != other.hasChangesThrough()) return false; + if (hasChangesThrough()) { + if (!getChangesThrough() + .equals(other.getChangesThrough())) 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 (getUpdatesCount() > 0) { + hash = (37 * hash) + UPDATES_FIELD_NUMBER; + hash = (53 * hash) + getUpdatesList().hashCode(); + } + if (hasChangesThrough()) { + hash = (37 * hash) + CHANGES_THROUGH_FIELD_NUMBER; + hash = (53 * hash) + getChangesThrough().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse 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.v1alpha1.WatchresourcesService.WatchResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse 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.v1alpha1.WatchresourcesService.WatchResourcesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse 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.v1alpha1.WatchresourcesService.WatchResourcesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse 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.v1alpha1.WatchresourcesService.WatchResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse 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.v1alpha1.WatchresourcesService.WatchResourcesResponse 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; + } + /** + *
+     * WatchResourcesResponse enumerates the list of permission updates that have
+     * occurred as a result of one or more relationship updates.
+     * 
+ * + * Protobuf type {@code authzed.api.v1alpha1.WatchResourcesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authzed.api.v1alpha1.WatchResourcesResponse) + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_WatchResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_WatchResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse.class, com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse.Builder.class); + } + + // Construct using com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (updatesBuilder_ == null) { + updates_ = java.util.Collections.emptyList(); + } else { + updates_ = null; + updatesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + changesThrough_ = null; + if (changesThroughBuilder_ != null) { + changesThroughBuilder_.dispose(); + changesThroughBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.authzed.api.v1alpha1.WatchresourcesService.internal_static_authzed_api_v1alpha1_WatchResourcesResponse_descriptor; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse getDefaultInstanceForType() { + return com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse build() { + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse buildPartial() { + com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse result = new com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse result) { + if (updatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + updates_ = java.util.Collections.unmodifiableList(updates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.updates_ = updates_; + } else { + result.updates_ = updatesBuilder_.build(); + } + } + + private void buildPartial0(com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.changesThrough_ = changesThroughBuilder_ == null + ? changesThrough_ + : changesThroughBuilder_.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.v1alpha1.WatchresourcesService.WatchResourcesResponse) { + return mergeFrom((com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse other) { + if (other == com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse.getDefaultInstance()) return this; + if (updatesBuilder_ == null) { + if (!other.updates_.isEmpty()) { + if (updates_.isEmpty()) { + updates_ = other.updates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUpdatesIsMutable(); + updates_.addAll(other.updates_); + } + onChanged(); + } + } else { + if (!other.updates_.isEmpty()) { + if (updatesBuilder_.isEmpty()) { + updatesBuilder_.dispose(); + updatesBuilder_ = null; + updates_ = other.updates_; + bitField0_ = (bitField0_ & ~0x00000001); + updatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUpdatesFieldBuilder() : null; + } else { + updatesBuilder_.addAllMessages(other.updates_); + } + } + } + if (other.hasChangesThrough()) { + mergeChangesThrough(other.getChangesThrough()); + } + 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.v1alpha1.WatchresourcesService.PermissionUpdate m = + input.readMessage( + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.parser(), + extensionRegistry); + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(m); + } else { + updatesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + getChangesThroughFieldBuilder().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.util.List updates_ = + java.util.Collections.emptyList(); + private void ensureUpdatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + updates_ = new java.util.ArrayList(updates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdateOrBuilder> updatesBuilder_; + + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public java.util.List getUpdatesList() { + if (updatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(updates_); + } else { + return updatesBuilder_.getMessageList(); + } + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public int getUpdatesCount() { + if (updatesBuilder_ == null) { + return updates_.size(); + } else { + return updatesBuilder_.getCount(); + } + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate getUpdates(int index) { + if (updatesBuilder_ == null) { + return updates_.get(index); + } else { + return updatesBuilder_.getMessage(index); + } + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public Builder setUpdates( + int index, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.set(index, value); + onChanged(); + } else { + updatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public Builder setUpdates( + int index, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.set(index, builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public Builder addUpdates(com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.add(value); + onChanged(); + } else { + updatesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public Builder addUpdates( + int index, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.add(index, value); + onChanged(); + } else { + updatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public Builder addUpdates( + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public Builder addUpdates( + int index, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(index, builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public Builder addAllUpdates( + java.lang.Iterable values) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, updates_); + onChanged(); + } else { + updatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public Builder clearUpdates() { + if (updatesBuilder_ == null) { + updates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + updatesBuilder_.clear(); + } + return this; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public Builder removeUpdates(int index) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.remove(index); + onChanged(); + } else { + updatesBuilder_.remove(index); + } + return this; + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder getUpdatesBuilder( + int index) { + return getUpdatesFieldBuilder().getBuilder(index); + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdateOrBuilder getUpdatesOrBuilder( + int index) { + if (updatesBuilder_ == null) { + return updates_.get(index); } else { + return updatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public java.util.List + getUpdatesOrBuilderList() { + if (updatesBuilder_ != null) { + return updatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(updates_); + } + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder addUpdatesBuilder() { + return getUpdatesFieldBuilder().addBuilder( + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder addUpdatesBuilder( + int index) { + return getUpdatesFieldBuilder().addBuilder( + index, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.getDefaultInstance()); + } + /** + * repeated .authzed.api.v1alpha1.PermissionUpdate updates = 1 [json_name = "updates"]; + */ + public java.util.List + getUpdatesBuilderList() { + return getUpdatesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdateOrBuilder> + getUpdatesFieldBuilder() { + if (updatesBuilder_ == null) { + updatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdate.Builder, com.authzed.api.v1alpha1.WatchresourcesService.PermissionUpdateOrBuilder>( + updates_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + updates_ = null; + } + return updatesBuilder_; + } + + private com.authzed.api.v1.ZedToken changesThrough_; + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> changesThroughBuilder_; + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return Whether the changesThrough field is set. + */ + public boolean hasChangesThrough() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + * @return The changesThrough. + */ + public com.authzed.api.v1.ZedToken getChangesThrough() { + if (changesThroughBuilder_ == null) { + return changesThrough_ == null ? com.authzed.api.v1.ZedToken.getDefaultInstance() : changesThrough_; + } else { + return changesThroughBuilder_.getMessage(); + } + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public Builder setChangesThrough(com.authzed.api.v1.ZedToken value) { + if (changesThroughBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + changesThrough_ = value; + } else { + changesThroughBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public Builder setChangesThrough( + com.authzed.api.v1.ZedToken.Builder builderForValue) { + if (changesThroughBuilder_ == null) { + changesThrough_ = builderForValue.build(); + } else { + changesThroughBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public Builder mergeChangesThrough(com.authzed.api.v1.ZedToken value) { + if (changesThroughBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + changesThrough_ != null && + changesThrough_ != com.authzed.api.v1.ZedToken.getDefaultInstance()) { + getChangesThroughBuilder().mergeFrom(value); + } else { + changesThrough_ = value; + } + } else { + changesThroughBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public Builder clearChangesThrough() { + bitField0_ = (bitField0_ & ~0x00000002); + changesThrough_ = null; + if (changesThroughBuilder_ != null) { + changesThroughBuilder_.dispose(); + changesThroughBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public com.authzed.api.v1.ZedToken.Builder getChangesThroughBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getChangesThroughFieldBuilder().getBuilder(); + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + public com.authzed.api.v1.ZedTokenOrBuilder getChangesThroughOrBuilder() { + if (changesThroughBuilder_ != null) { + return changesThroughBuilder_.getMessageOrBuilder(); + } else { + return changesThrough_ == null ? + com.authzed.api.v1.ZedToken.getDefaultInstance() : changesThrough_; + } + } + /** + * .authzed.api.v1.ZedToken changes_through = 2 [json_name = "changesThrough"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder> + getChangesThroughFieldBuilder() { + if (changesThroughBuilder_ == null) { + changesThroughBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.authzed.api.v1.ZedToken, com.authzed.api.v1.ZedToken.Builder, com.authzed.api.v1.ZedTokenOrBuilder>( + getChangesThrough(), + getParentForChildren(), + isClean()); + changesThrough_ = null; + } + return changesThroughBuilder_; + } + @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.v1alpha1.WatchResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:authzed.api.v1alpha1.WatchResourcesResponse) + private static final com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse(); + } + + public static com.authzed.api.v1alpha1.WatchresourcesService.WatchResourcesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WatchResourcesResponse 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.v1alpha1.WatchresourcesService.WatchResourcesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1alpha1_WatchResourcesRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1alpha1_WatchResourcesRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1alpha1_PermissionUpdate_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1alpha1_PermissionUpdate_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_authzed_api_v1alpha1_WatchResourcesResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authzed_api_v1alpha1_WatchResourcesResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1authzed/api/v1alpha1/watchresources_se" + + "rvice.proto\022\024authzed.api.v1alpha1\032\034googl" + + "e/api/annotations.proto\032\027validate/valida" + + "te.proto\032\031authzed/api/v1/core.proto\"\226\003\n\025" + + "WatchResourcesRequest\022z\n\024resource_object" + + "_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-z" + + "0-9]$R\022resourceObjectType\022G\n\npermission\030" + + "\002 \001(\tB\'\372B$r\"(@2\036^[a-z][a-z0-9_]{1,62}[a-" + + "z0-9]$R\npermission\022.\n\023subject_object_typ" + + "e\030\003 \001(\tR\021subjectObjectType\022:\n\031optional_s" + + "ubject_relation\030\004 \001(\tR\027optionalSubjectRe" + + "lation\022L\n\025optional_start_cursor\030\005 \001(\0132\030." + + "authzed.api.v1.ZedTokenR\023optionalStartCu" + + "rsor\"\204\003\n\020PermissionUpdate\022:\n\007subject\030\001 \001" + + "(\0132 .authzed.api.v1.SubjectReferenceR\007su" + + "bject\022;\n\010resource\030\002 \001(\0132\037.authzed.api.v1" + + ".ObjectReferenceR\010resource\022\032\n\010relation\030\003" + + " \001(\tR\010relation\022d\n\022updated_permission\030\004 \001" + + "(\01625.authzed.api.v1alpha1.PermissionUpda" + + "te.PermissionshipR\021updatedPermission\"u\n\016" + + "Permissionship\022\036\n\032PERMISSIONSHIP_UNSPECI" + + "FIED\020\000\022 \n\034PERMISSIONSHIP_NO_PERMISSION\020\001" + + "\022!\n\035PERMISSIONSHIP_HAS_PERMISSION\020\002\"\235\001\n\026" + + "WatchResourcesResponse\022@\n\007updates\030\001 \003(\0132" + + "&.authzed.api.v1alpha1.PermissionUpdateR" + + "\007updates\022A\n\017changes_through\030\002 \001(\0132\030.auth" + + "zed.api.v1.ZedTokenR\016changesThrough2\251\001\n\025" + + "WatchResourcesService\022\217\001\n\016WatchResources" + + "\022+.authzed.api.v1alpha1.WatchResourcesRe" + + "quest\032,.authzed.api.v1alpha1.WatchResour" + + "cesResponse\" \202\323\344\223\002\032:\001*\"\025/v1alpha1/lookup" + + "watch0\001BT\n\030com.authzed.api.v1alpha1Z8git" + + "hub.com/authzed/authzed-go/proto/authzed" + + "/api/v1alpha1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + io.envoyproxy.pgv.validate.Validate.getDescriptor(), + com.authzed.api.v1.Core.getDescriptor(), + }); + internal_static_authzed_api_v1alpha1_WatchResourcesRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authzed_api_v1alpha1_WatchResourcesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1alpha1_WatchResourcesRequest_descriptor, + new java.lang.String[] { "ResourceObjectType", "Permission", "SubjectObjectType", "OptionalSubjectRelation", "OptionalStartCursor", }); + internal_static_authzed_api_v1alpha1_PermissionUpdate_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authzed_api_v1alpha1_PermissionUpdate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1alpha1_PermissionUpdate_descriptor, + new java.lang.String[] { "Subject", "Resource", "Relation", "UpdatedPermission", }); + internal_static_authzed_api_v1alpha1_WatchResourcesResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authzed_api_v1alpha1_WatchResourcesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authzed_api_v1alpha1_WatchResourcesResponse_descriptor, + new java.lang.String[] { "Updates", "ChangesThrough", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(io.envoyproxy.pgv.validate.Validate.rules); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + io.envoyproxy.pgv.validate.Validate.getDescriptor(); + com.authzed.api.v1.Core.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +}