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

cz.proto.access.GrantEntity Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: privilege.proto

package cz.proto.access;

/**
 * Protobuf type {@code cz.proto.access.GrantEntity}
 */
public final class GrantEntity extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:cz.proto.access.GrantEntity)
    GrantEntityOrBuilder {
private static final long serialVersionUID = 0L;
  // Use GrantEntity.newBuilder() to construct.
  private GrantEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private GrantEntity() {
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new GrantEntity();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private GrantEntity(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            cz.proto.access.Subject.Builder subBuilder = null;
            if (subject_ != null) {
              subBuilder = subject_.toBuilder();
            }
            subject_ = input.readMessage(cz.proto.access.Subject.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(subject_);
              subject_ = subBuilder.buildPartial();
            }

            break;
          }
          case 82: {
            cz.proto.access.GrantRole.Builder subBuilder = null;
            if (derivedCase_ == 10) {
              subBuilder = ((cz.proto.access.GrantRole) derived_).toBuilder();
            }
            derived_ =
                input.readMessage(cz.proto.access.GrantRole.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((cz.proto.access.GrantRole) derived_);
              derived_ = subBuilder.buildPartial();
            }
            derivedCase_ = 10;
            break;
          }
          case 90: {
            cz.proto.access.GrantPrivilege.Builder subBuilder = null;
            if (derivedCase_ == 11) {
              subBuilder = ((cz.proto.access.GrantPrivilege) derived_).toBuilder();
            }
            derived_ =
                input.readMessage(cz.proto.access.GrantPrivilege.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((cz.proto.access.GrantPrivilege) derived_);
              derived_ = subBuilder.buildPartial();
            }
            derivedCase_ = 11;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return cz.proto.access.PrivilegeOuterClass.internal_static_cz_proto_access_GrantEntity_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return cz.proto.access.PrivilegeOuterClass.internal_static_cz_proto_access_GrantEntity_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            cz.proto.access.GrantEntity.class, cz.proto.access.GrantEntity.Builder.class);
  }

  private int derivedCase_ = 0;
  private java.lang.Object derived_;
  public enum DerivedCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    ROLE(10),
    PRIVILEGE(11),
    DERIVED_NOT_SET(0);
    private final int value;
    private DerivedCase(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 DerivedCase valueOf(int value) {
      return forNumber(value);
    }

    public static DerivedCase forNumber(int value) {
      switch (value) {
        case 10: return ROLE;
        case 11: return PRIVILEGE;
        case 0: return DERIVED_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public DerivedCase
  getDerivedCase() {
    return DerivedCase.forNumber(
        derivedCase_);
  }

  public static final int SUBJECT_FIELD_NUMBER = 1;
  private cz.proto.access.Subject subject_;
  /**
   * .cz.proto.access.Subject subject = 1;
   * @return Whether the subject field is set.
   */
  @java.lang.Override
  public boolean hasSubject() {
    return subject_ != null;
  }
  /**
   * .cz.proto.access.Subject subject = 1;
   * @return The subject.
   */
  @java.lang.Override
  public cz.proto.access.Subject getSubject() {
    return subject_ == null ? cz.proto.access.Subject.getDefaultInstance() : subject_;
  }
  /**
   * .cz.proto.access.Subject subject = 1;
   */
  @java.lang.Override
  public cz.proto.access.SubjectOrBuilder getSubjectOrBuilder() {
    return getSubject();
  }

  public static final int ROLE_FIELD_NUMBER = 10;
  /**
   * .cz.proto.access.GrantRole role = 10;
   * @return Whether the role field is set.
   */
  @java.lang.Override
  public boolean hasRole() {
    return derivedCase_ == 10;
  }
  /**
   * .cz.proto.access.GrantRole role = 10;
   * @return The role.
   */
  @java.lang.Override
  public cz.proto.access.GrantRole getRole() {
    if (derivedCase_ == 10) {
       return (cz.proto.access.GrantRole) derived_;
    }
    return cz.proto.access.GrantRole.getDefaultInstance();
  }
  /**
   * .cz.proto.access.GrantRole role = 10;
   */
  @java.lang.Override
  public cz.proto.access.GrantRoleOrBuilder getRoleOrBuilder() {
    if (derivedCase_ == 10) {
       return (cz.proto.access.GrantRole) derived_;
    }
    return cz.proto.access.GrantRole.getDefaultInstance();
  }

  public static final int PRIVILEGE_FIELD_NUMBER = 11;
  /**
   * .cz.proto.access.GrantPrivilege privilege = 11;
   * @return Whether the privilege field is set.
   */
  @java.lang.Override
  public boolean hasPrivilege() {
    return derivedCase_ == 11;
  }
  /**
   * .cz.proto.access.GrantPrivilege privilege = 11;
   * @return The privilege.
   */
  @java.lang.Override
  public cz.proto.access.GrantPrivilege getPrivilege() {
    if (derivedCase_ == 11) {
       return (cz.proto.access.GrantPrivilege) derived_;
    }
    return cz.proto.access.GrantPrivilege.getDefaultInstance();
  }
  /**
   * .cz.proto.access.GrantPrivilege privilege = 11;
   */
  @java.lang.Override
  public cz.proto.access.GrantPrivilegeOrBuilder getPrivilegeOrBuilder() {
    if (derivedCase_ == 11) {
       return (cz.proto.access.GrantPrivilege) derived_;
    }
    return cz.proto.access.GrantPrivilege.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 (subject_ != null) {
      output.writeMessage(1, getSubject());
    }
    if (derivedCase_ == 10) {
      output.writeMessage(10, (cz.proto.access.GrantRole) derived_);
    }
    if (derivedCase_ == 11) {
      output.writeMessage(11, (cz.proto.access.GrantPrivilege) derived_);
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (subject_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getSubject());
    }
    if (derivedCase_ == 10) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(10, (cz.proto.access.GrantRole) derived_);
    }
    if (derivedCase_ == 11) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(11, (cz.proto.access.GrantPrivilege) derived_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof cz.proto.access.GrantEntity)) {
      return super.equals(obj);
    }
    cz.proto.access.GrantEntity other = (cz.proto.access.GrantEntity) obj;

    if (hasSubject() != other.hasSubject()) return false;
    if (hasSubject()) {
      if (!getSubject()
          .equals(other.getSubject())) return false;
    }
    if (!getDerivedCase().equals(other.getDerivedCase())) return false;
    switch (derivedCase_) {
      case 10:
        if (!getRole()
            .equals(other.getRole())) return false;
        break;
      case 11:
        if (!getPrivilege()
            .equals(other.getPrivilege())) return false;
        break;
      case 0:
      default:
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasSubject()) {
      hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
      hash = (53 * hash) + getSubject().hashCode();
    }
    switch (derivedCase_) {
      case 10:
        hash = (37 * hash) + ROLE_FIELD_NUMBER;
        hash = (53 * hash) + getRole().hashCode();
        break;
      case 11:
        hash = (37 * hash) + PRIVILEGE_FIELD_NUMBER;
        hash = (53 * hash) + getPrivilege().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static cz.proto.access.GrantEntity parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static cz.proto.access.GrantEntity parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static cz.proto.access.GrantEntity parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static cz.proto.access.GrantEntity parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static cz.proto.access.GrantEntity parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static cz.proto.access.GrantEntity parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static cz.proto.access.GrantEntity parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static cz.proto.access.GrantEntity 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 cz.proto.access.GrantEntity parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static cz.proto.access.GrantEntity 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 cz.proto.access.GrantEntity parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static cz.proto.access.GrantEntity 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(cz.proto.access.GrantEntity 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 cz.proto.access.GrantEntity}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:cz.proto.access.GrantEntity)
      cz.proto.access.GrantEntityOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return cz.proto.access.PrivilegeOuterClass.internal_static_cz_proto_access_GrantEntity_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return cz.proto.access.PrivilegeOuterClass.internal_static_cz_proto_access_GrantEntity_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              cz.proto.access.GrantEntity.class, cz.proto.access.GrantEntity.Builder.class);
    }

    // Construct using cz.proto.access.GrantEntity.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (subjectBuilder_ == null) {
        subject_ = null;
      } else {
        subject_ = null;
        subjectBuilder_ = null;
      }
      derivedCase_ = 0;
      derived_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return cz.proto.access.PrivilegeOuterClass.internal_static_cz_proto_access_GrantEntity_descriptor;
    }

    @java.lang.Override
    public cz.proto.access.GrantEntity getDefaultInstanceForType() {
      return cz.proto.access.GrantEntity.getDefaultInstance();
    }

    @java.lang.Override
    public cz.proto.access.GrantEntity build() {
      cz.proto.access.GrantEntity result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public cz.proto.access.GrantEntity buildPartial() {
      cz.proto.access.GrantEntity result = new cz.proto.access.GrantEntity(this);
      if (subjectBuilder_ == null) {
        result.subject_ = subject_;
      } else {
        result.subject_ = subjectBuilder_.build();
      }
      if (derivedCase_ == 10) {
        if (roleBuilder_ == null) {
          result.derived_ = derived_;
        } else {
          result.derived_ = roleBuilder_.build();
        }
      }
      if (derivedCase_ == 11) {
        if (privilegeBuilder_ == null) {
          result.derived_ = derived_;
        } else {
          result.derived_ = privilegeBuilder_.build();
        }
      }
      result.derivedCase_ = derivedCase_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof cz.proto.access.GrantEntity) {
        return mergeFrom((cz.proto.access.GrantEntity)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(cz.proto.access.GrantEntity other) {
      if (other == cz.proto.access.GrantEntity.getDefaultInstance()) return this;
      if (other.hasSubject()) {
        mergeSubject(other.getSubject());
      }
      switch (other.getDerivedCase()) {
        case ROLE: {
          mergeRole(other.getRole());
          break;
        }
        case PRIVILEGE: {
          mergePrivilege(other.getPrivilege());
          break;
        }
        case DERIVED_NOT_SET: {
          break;
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      cz.proto.access.GrantEntity parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (cz.proto.access.GrantEntity) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int derivedCase_ = 0;
    private java.lang.Object derived_;
    public DerivedCase
        getDerivedCase() {
      return DerivedCase.forNumber(
          derivedCase_);
    }

    public Builder clearDerived() {
      derivedCase_ = 0;
      derived_ = null;
      onChanged();
      return this;
    }


    private cz.proto.access.Subject subject_;
    private com.google.protobuf.SingleFieldBuilderV3<
        cz.proto.access.Subject, cz.proto.access.Subject.Builder, cz.proto.access.SubjectOrBuilder> subjectBuilder_;
    /**
     * .cz.proto.access.Subject subject = 1;
     * @return Whether the subject field is set.
     */
    public boolean hasSubject() {
      return subjectBuilder_ != null || subject_ != null;
    }
    /**
     * .cz.proto.access.Subject subject = 1;
     * @return The subject.
     */
    public cz.proto.access.Subject getSubject() {
      if (subjectBuilder_ == null) {
        return subject_ == null ? cz.proto.access.Subject.getDefaultInstance() : subject_;
      } else {
        return subjectBuilder_.getMessage();
      }
    }
    /**
     * .cz.proto.access.Subject subject = 1;
     */
    public Builder setSubject(cz.proto.access.Subject value) {
      if (subjectBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        subject_ = value;
        onChanged();
      } else {
        subjectBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * .cz.proto.access.Subject subject = 1;
     */
    public Builder setSubject(
        cz.proto.access.Subject.Builder builderForValue) {
      if (subjectBuilder_ == null) {
        subject_ = builderForValue.build();
        onChanged();
      } else {
        subjectBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * .cz.proto.access.Subject subject = 1;
     */
    public Builder mergeSubject(cz.proto.access.Subject value) {
      if (subjectBuilder_ == null) {
        if (subject_ != null) {
          subject_ =
            cz.proto.access.Subject.newBuilder(subject_).mergeFrom(value).buildPartial();
        } else {
          subject_ = value;
        }
        onChanged();
      } else {
        subjectBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * .cz.proto.access.Subject subject = 1;
     */
    public Builder clearSubject() {
      if (subjectBuilder_ == null) {
        subject_ = null;
        onChanged();
      } else {
        subject_ = null;
        subjectBuilder_ = null;
      }

      return this;
    }
    /**
     * .cz.proto.access.Subject subject = 1;
     */
    public cz.proto.access.Subject.Builder getSubjectBuilder() {
      
      onChanged();
      return getSubjectFieldBuilder().getBuilder();
    }
    /**
     * .cz.proto.access.Subject subject = 1;
     */
    public cz.proto.access.SubjectOrBuilder getSubjectOrBuilder() {
      if (subjectBuilder_ != null) {
        return subjectBuilder_.getMessageOrBuilder();
      } else {
        return subject_ == null ?
            cz.proto.access.Subject.getDefaultInstance() : subject_;
      }
    }
    /**
     * .cz.proto.access.Subject subject = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        cz.proto.access.Subject, cz.proto.access.Subject.Builder, cz.proto.access.SubjectOrBuilder> 
        getSubjectFieldBuilder() {
      if (subjectBuilder_ == null) {
        subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            cz.proto.access.Subject, cz.proto.access.Subject.Builder, cz.proto.access.SubjectOrBuilder>(
                getSubject(),
                getParentForChildren(),
                isClean());
        subject_ = null;
      }
      return subjectBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        cz.proto.access.GrantRole, cz.proto.access.GrantRole.Builder, cz.proto.access.GrantRoleOrBuilder> roleBuilder_;
    /**
     * .cz.proto.access.GrantRole role = 10;
     * @return Whether the role field is set.
     */
    @java.lang.Override
    public boolean hasRole() {
      return derivedCase_ == 10;
    }
    /**
     * .cz.proto.access.GrantRole role = 10;
     * @return The role.
     */
    @java.lang.Override
    public cz.proto.access.GrantRole getRole() {
      if (roleBuilder_ == null) {
        if (derivedCase_ == 10) {
          return (cz.proto.access.GrantRole) derived_;
        }
        return cz.proto.access.GrantRole.getDefaultInstance();
      } else {
        if (derivedCase_ == 10) {
          return roleBuilder_.getMessage();
        }
        return cz.proto.access.GrantRole.getDefaultInstance();
      }
    }
    /**
     * .cz.proto.access.GrantRole role = 10;
     */
    public Builder setRole(cz.proto.access.GrantRole value) {
      if (roleBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        derived_ = value;
        onChanged();
      } else {
        roleBuilder_.setMessage(value);
      }
      derivedCase_ = 10;
      return this;
    }
    /**
     * .cz.proto.access.GrantRole role = 10;
     */
    public Builder setRole(
        cz.proto.access.GrantRole.Builder builderForValue) {
      if (roleBuilder_ == null) {
        derived_ = builderForValue.build();
        onChanged();
      } else {
        roleBuilder_.setMessage(builderForValue.build());
      }
      derivedCase_ = 10;
      return this;
    }
    /**
     * .cz.proto.access.GrantRole role = 10;
     */
    public Builder mergeRole(cz.proto.access.GrantRole value) {
      if (roleBuilder_ == null) {
        if (derivedCase_ == 10 &&
            derived_ != cz.proto.access.GrantRole.getDefaultInstance()) {
          derived_ = cz.proto.access.GrantRole.newBuilder((cz.proto.access.GrantRole) derived_)
              .mergeFrom(value).buildPartial();
        } else {
          derived_ = value;
        }
        onChanged();
      } else {
        if (derivedCase_ == 10) {
          roleBuilder_.mergeFrom(value);
        }
        roleBuilder_.setMessage(value);
      }
      derivedCase_ = 10;
      return this;
    }
    /**
     * .cz.proto.access.GrantRole role = 10;
     */
    public Builder clearRole() {
      if (roleBuilder_ == null) {
        if (derivedCase_ == 10) {
          derivedCase_ = 0;
          derived_ = null;
          onChanged();
        }
      } else {
        if (derivedCase_ == 10) {
          derivedCase_ = 0;
          derived_ = null;
        }
        roleBuilder_.clear();
      }
      return this;
    }
    /**
     * .cz.proto.access.GrantRole role = 10;
     */
    public cz.proto.access.GrantRole.Builder getRoleBuilder() {
      return getRoleFieldBuilder().getBuilder();
    }
    /**
     * .cz.proto.access.GrantRole role = 10;
     */
    @java.lang.Override
    public cz.proto.access.GrantRoleOrBuilder getRoleOrBuilder() {
      if ((derivedCase_ == 10) && (roleBuilder_ != null)) {
        return roleBuilder_.getMessageOrBuilder();
      } else {
        if (derivedCase_ == 10) {
          return (cz.proto.access.GrantRole) derived_;
        }
        return cz.proto.access.GrantRole.getDefaultInstance();
      }
    }
    /**
     * .cz.proto.access.GrantRole role = 10;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        cz.proto.access.GrantRole, cz.proto.access.GrantRole.Builder, cz.proto.access.GrantRoleOrBuilder> 
        getRoleFieldBuilder() {
      if (roleBuilder_ == null) {
        if (!(derivedCase_ == 10)) {
          derived_ = cz.proto.access.GrantRole.getDefaultInstance();
        }
        roleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            cz.proto.access.GrantRole, cz.proto.access.GrantRole.Builder, cz.proto.access.GrantRoleOrBuilder>(
                (cz.proto.access.GrantRole) derived_,
                getParentForChildren(),
                isClean());
        derived_ = null;
      }
      derivedCase_ = 10;
      onChanged();;
      return roleBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        cz.proto.access.GrantPrivilege, cz.proto.access.GrantPrivilege.Builder, cz.proto.access.GrantPrivilegeOrBuilder> privilegeBuilder_;
    /**
     * .cz.proto.access.GrantPrivilege privilege = 11;
     * @return Whether the privilege field is set.
     */
    @java.lang.Override
    public boolean hasPrivilege() {
      return derivedCase_ == 11;
    }
    /**
     * .cz.proto.access.GrantPrivilege privilege = 11;
     * @return The privilege.
     */
    @java.lang.Override
    public cz.proto.access.GrantPrivilege getPrivilege() {
      if (privilegeBuilder_ == null) {
        if (derivedCase_ == 11) {
          return (cz.proto.access.GrantPrivilege) derived_;
        }
        return cz.proto.access.GrantPrivilege.getDefaultInstance();
      } else {
        if (derivedCase_ == 11) {
          return privilegeBuilder_.getMessage();
        }
        return cz.proto.access.GrantPrivilege.getDefaultInstance();
      }
    }
    /**
     * .cz.proto.access.GrantPrivilege privilege = 11;
     */
    public Builder setPrivilege(cz.proto.access.GrantPrivilege value) {
      if (privilegeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        derived_ = value;
        onChanged();
      } else {
        privilegeBuilder_.setMessage(value);
      }
      derivedCase_ = 11;
      return this;
    }
    /**
     * .cz.proto.access.GrantPrivilege privilege = 11;
     */
    public Builder setPrivilege(
        cz.proto.access.GrantPrivilege.Builder builderForValue) {
      if (privilegeBuilder_ == null) {
        derived_ = builderForValue.build();
        onChanged();
      } else {
        privilegeBuilder_.setMessage(builderForValue.build());
      }
      derivedCase_ = 11;
      return this;
    }
    /**
     * .cz.proto.access.GrantPrivilege privilege = 11;
     */
    public Builder mergePrivilege(cz.proto.access.GrantPrivilege value) {
      if (privilegeBuilder_ == null) {
        if (derivedCase_ == 11 &&
            derived_ != cz.proto.access.GrantPrivilege.getDefaultInstance()) {
          derived_ = cz.proto.access.GrantPrivilege.newBuilder((cz.proto.access.GrantPrivilege) derived_)
              .mergeFrom(value).buildPartial();
        } else {
          derived_ = value;
        }
        onChanged();
      } else {
        if (derivedCase_ == 11) {
          privilegeBuilder_.mergeFrom(value);
        }
        privilegeBuilder_.setMessage(value);
      }
      derivedCase_ = 11;
      return this;
    }
    /**
     * .cz.proto.access.GrantPrivilege privilege = 11;
     */
    public Builder clearPrivilege() {
      if (privilegeBuilder_ == null) {
        if (derivedCase_ == 11) {
          derivedCase_ = 0;
          derived_ = null;
          onChanged();
        }
      } else {
        if (derivedCase_ == 11) {
          derivedCase_ = 0;
          derived_ = null;
        }
        privilegeBuilder_.clear();
      }
      return this;
    }
    /**
     * .cz.proto.access.GrantPrivilege privilege = 11;
     */
    public cz.proto.access.GrantPrivilege.Builder getPrivilegeBuilder() {
      return getPrivilegeFieldBuilder().getBuilder();
    }
    /**
     * .cz.proto.access.GrantPrivilege privilege = 11;
     */
    @java.lang.Override
    public cz.proto.access.GrantPrivilegeOrBuilder getPrivilegeOrBuilder() {
      if ((derivedCase_ == 11) && (privilegeBuilder_ != null)) {
        return privilegeBuilder_.getMessageOrBuilder();
      } else {
        if (derivedCase_ == 11) {
          return (cz.proto.access.GrantPrivilege) derived_;
        }
        return cz.proto.access.GrantPrivilege.getDefaultInstance();
      }
    }
    /**
     * .cz.proto.access.GrantPrivilege privilege = 11;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        cz.proto.access.GrantPrivilege, cz.proto.access.GrantPrivilege.Builder, cz.proto.access.GrantPrivilegeOrBuilder> 
        getPrivilegeFieldBuilder() {
      if (privilegeBuilder_ == null) {
        if (!(derivedCase_ == 11)) {
          derived_ = cz.proto.access.GrantPrivilege.getDefaultInstance();
        }
        privilegeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            cz.proto.access.GrantPrivilege, cz.proto.access.GrantPrivilege.Builder, cz.proto.access.GrantPrivilegeOrBuilder>(
                (cz.proto.access.GrantPrivilege) derived_,
                getParentForChildren(),
                isClean());
        derived_ = null;
      }
      derivedCase_ = 11;
      onChanged();;
      return privilegeBuilder_;
    }
    @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:cz.proto.access.GrantEntity)
  }

  // @@protoc_insertion_point(class_scope:cz.proto.access.GrantEntity)
  private static final cz.proto.access.GrantEntity DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new cz.proto.access.GrantEntity();
  }

  public static cz.proto.access.GrantEntity getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public GrantEntity parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new GrantEntity(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public cz.proto.access.GrantEntity getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy