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
+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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
+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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+ * 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 extends com.authzed.api.materialize.v0.WatchedPermissionOrBuilder>
+ 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+ * 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+ * 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 extends com.authzed.api.materialize.v0.WatchedPermission> 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 extends com.authzed.api.materialize.v0.WatchedPermissionOrBuilder>
+ 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+ * 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+ * 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+ * 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 extends com.authzed.api.materialize.v0.WatchedPermissionOrBuilder>
+ 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+ * 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+ * 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+ * 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
+ * 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
+ * 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
+ * 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+ * 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+ * 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+ * 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.Parserstring 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.Builderstring 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.Parserstring 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.Builderstring 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.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.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.Parserstring 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.Builderstring 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.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.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.Parserrepeated string namespace_configs = 1 [json_name = "namespaceConfigs"];
+ * @return A list containing the namespaceConfigs.
+ */
+ java.util.Listrepeated 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.Builderrepeated 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.Iterablerepeated 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.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.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.Parserstring 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.Builderstring 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.Parserstring 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.Builderstring 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.Parserstring 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.Builderstring 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.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.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.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.Parserstring 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.Listrepeated .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 extends com.authzed.api.v0.Core.RelationTupleOrBuilder>
+ 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.Listrepeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"];
+ */
+ @java.lang.Override
+ public java.util.Listrepeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"];
+ */
+ @java.lang.Override
+ public java.util.List extends com.authzed.api.v0.Core.RelationTupleOrBuilder>
+ 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.Builderstring 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.Listrepeated .authzed.api.v0.RelationTuple relationships = 2 [json_name = "relationships"];
+ */
+ public java.util.Listrepeated .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 extends com.authzed.api.v0.Core.RelationTuple> 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 extends com.authzed.api.v0.Core.RelationTupleOrBuilder>
+ 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.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.Listrepeated .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 extends com.authzed.api.v0.Core.RelationTupleOrBuilder>
+ 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.Listrepeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"];
+ */
+ @java.lang.Override
+ public java.util.Listrepeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"];
+ */
+ @java.lang.Override
+ public java.util.List extends com.authzed.api.v0.Core.RelationTupleOrBuilder>
+ 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.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.Listrepeated .authzed.api.v0.RelationTuple check_relationships = 2 [json_name = "checkRelationships"];
+ */
+ public java.util.Listrepeated .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 extends com.authzed.api.v0.Core.RelationTuple> 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 extends com.authzed.api.v0.Core.RelationTupleOrBuilder>
+ 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.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.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.Parserrepeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"];
+ */
+ java.util.Listrepeated .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 extends com.authzed.api.v0.Developer.DeveloperErrorOrBuilder>
+ 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.Listrepeated .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 extends com.authzed.api.v0.Developer.EditCheckResultOrBuilder>
+ 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.Listrepeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"];
+ */
+ @java.lang.Override
+ public java.util.Listrepeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"];
+ */
+ @java.lang.Override
+ public java.util.List extends com.authzed.api.v0.Developer.DeveloperErrorOrBuilder>
+ 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.Listrepeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"];
+ */
+ @java.lang.Override
+ public java.util.Listrepeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"];
+ */
+ @java.lang.Override
+ public java.util.List extends com.authzed.api.v0.Developer.EditCheckResultOrBuilder>
+ 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.Builderrepeated .authzed.api.v0.DeveloperError request_errors = 1 [json_name = "requestErrors"];
+ */
+ public java.util.Listrepeated .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 extends com.authzed.api.v0.Developer.DeveloperError> 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 extends com.authzed.api.v0.Developer.DeveloperErrorOrBuilder>
+ 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.Listrepeated .authzed.api.v0.EditCheckResult check_results = 2 [json_name = "checkResults"];
+ */
+ public java.util.Listrepeated .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 extends com.authzed.api.v0.Developer.EditCheckResult> 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 extends com.authzed.api.v0.Developer.EditCheckResultOrBuilder>
+ 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.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.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