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

cz.proto.access.PrivilegeAction 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.PrivilegeAction}
 */
public final class PrivilegeAction extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:cz.proto.access.PrivilegeAction)
    PrivilegeActionOrBuilder {
private static final long serialVersionUID = 0L;
  // Use PrivilegeAction.newBuilder() to construct.
  private PrivilegeAction(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private PrivilegeAction() {
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private PrivilegeAction(
      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 80: {
            int rawValue = input.readEnum();
            derivedCase_ = 10;
            derived_ = rawValue;
            break;
          }
          case 90: {
            java.lang.String s = input.readStringRequireUtf8();
            derivedCase_ = 11;
            derived_ = s;
            break;
          }
          case 98: {
            cz.proto.ObjectIdentifier.Builder subBuilder = null;
            if (derivedCase_ == 12) {
              subBuilder = ((cz.proto.ObjectIdentifier) derived_).toBuilder();
            }
            derived_ =
                input.readMessage(cz.proto.ObjectIdentifier.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((cz.proto.ObjectIdentifier) derived_);
              derived_ = subBuilder.buildPartial();
            }
            derivedCase_ = 12;
            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_PrivilegeAction_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return cz.proto.access.PrivilegeOuterClass.internal_static_cz_proto_access_PrivilegeAction_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            cz.proto.access.PrivilegeAction.class, cz.proto.access.PrivilegeAction.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 {
    ACTION(10),
    POLICY_NAME(11),
    ROLE(12),
    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 ACTION;
        case 11: return POLICY_NAME;
        case 12: return ROLE;
        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 ACTION_FIELD_NUMBER = 10;
  /**
   * .cz.proto.access.ActionType action = 10;
   * @return Whether the action field is set.
   */
  public boolean hasAction() {
    return derivedCase_ == 10;
  }
  /**
   * .cz.proto.access.ActionType action = 10;
   * @return The enum numeric value on the wire for action.
   */
  public int getActionValue() {
    if (derivedCase_ == 10) {
      return (java.lang.Integer) derived_;
    }
    return 0;
  }
  /**
   * .cz.proto.access.ActionType action = 10;
   * @return The action.
   */
  public cz.proto.access.ActionType getAction() {
    if (derivedCase_ == 10) {
      @SuppressWarnings("deprecation")
      cz.proto.access.ActionType result = cz.proto.access.ActionType.valueOf(
          (java.lang.Integer) derived_);
      return result == null ? cz.proto.access.ActionType.UNRECOGNIZED : result;
    }
    return cz.proto.access.ActionType.AT_KNOWN;
  }

  public static final int POLICY_NAME_FIELD_NUMBER = 11;
  /**
   * string policy_name = 11;
   * @return Whether the policyName field is set.
   */
  public boolean hasPolicyName() {
    return derivedCase_ == 11;
  }
  /**
   * string policy_name = 11;
   * @return The policyName.
   */
  public java.lang.String getPolicyName() {
    java.lang.Object ref = "";
    if (derivedCase_ == 11) {
      ref = derived_;
    }
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (derivedCase_ == 11) {
        derived_ = s;
      }
      return s;
    }
  }
  /**
   * string policy_name = 11;
   * @return The bytes for policyName.
   */
  public com.google.protobuf.ByteString
      getPolicyNameBytes() {
    java.lang.Object ref = "";
    if (derivedCase_ == 11) {
      ref = derived_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (derivedCase_ == 11) {
        derived_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ROLE_FIELD_NUMBER = 12;
  /**
   * .cz.proto.ObjectIdentifier role = 12;
   * @return Whether the role field is set.
   */
  @java.lang.Override
  public boolean hasRole() {
    return derivedCase_ == 12;
  }
  /**
   * .cz.proto.ObjectIdentifier role = 12;
   * @return The role.
   */
  @java.lang.Override
  public cz.proto.ObjectIdentifier getRole() {
    if (derivedCase_ == 12) {
       return (cz.proto.ObjectIdentifier) derived_;
    }
    return cz.proto.ObjectIdentifier.getDefaultInstance();
  }
  /**
   * .cz.proto.ObjectIdentifier role = 12;
   */
  @java.lang.Override
  public cz.proto.ObjectIdentifierOrBuilder getRoleOrBuilder() {
    if (derivedCase_ == 12) {
       return (cz.proto.ObjectIdentifier) derived_;
    }
    return cz.proto.ObjectIdentifier.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 (derivedCase_ == 10) {
      output.writeEnum(10, ((java.lang.Integer) derived_));
    }
    if (derivedCase_ == 11) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, derived_);
    }
    if (derivedCase_ == 12) {
      output.writeMessage(12, (cz.proto.ObjectIdentifier) derived_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (derivedCase_ == 10) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(10, ((java.lang.Integer) derived_));
    }
    if (derivedCase_ == 11) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, derived_);
    }
    if (derivedCase_ == 12) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(12, (cz.proto.ObjectIdentifier) 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.PrivilegeAction)) {
      return super.equals(obj);
    }
    cz.proto.access.PrivilegeAction other = (cz.proto.access.PrivilegeAction) obj;

    if (!getDerivedCase().equals(other.getDerivedCase())) return false;
    switch (derivedCase_) {
      case 10:
        if (getActionValue()
            != other.getActionValue()) return false;
        break;
      case 11:
        if (!getPolicyName()
            .equals(other.getPolicyName())) return false;
        break;
      case 12:
        if (!getRole()
            .equals(other.getRole())) 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();
    switch (derivedCase_) {
      case 10:
        hash = (37 * hash) + ACTION_FIELD_NUMBER;
        hash = (53 * hash) + getActionValue();
        break;
      case 11:
        hash = (37 * hash) + POLICY_NAME_FIELD_NUMBER;
        hash = (53 * hash) + getPolicyName().hashCode();
        break;
      case 12:
        hash = (37 * hash) + ROLE_FIELD_NUMBER;
        hash = (53 * hash) + getRole().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

    // Construct using cz.proto.access.PrivilegeAction.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();
      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_PrivilegeAction_descriptor;
    }

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

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

    @java.lang.Override
    public cz.proto.access.PrivilegeAction buildPartial() {
      cz.proto.access.PrivilegeAction result = new cz.proto.access.PrivilegeAction(this);
      if (derivedCase_ == 10) {
        result.derived_ = derived_;
      }
      if (derivedCase_ == 11) {
        result.derived_ = derived_;
      }
      if (derivedCase_ == 12) {
        if (roleBuilder_ == null) {
          result.derived_ = derived_;
        } else {
          result.derived_ = roleBuilder_.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.PrivilegeAction) {
        return mergeFrom((cz.proto.access.PrivilegeAction)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(cz.proto.access.PrivilegeAction other) {
      if (other == cz.proto.access.PrivilegeAction.getDefaultInstance()) return this;
      switch (other.getDerivedCase()) {
        case ACTION: {
          setActionValue(other.getActionValue());
          break;
        }
        case POLICY_NAME: {
          derivedCase_ = 11;
          derived_ = other.derived_;
          onChanged();
          break;
        }
        case ROLE: {
          mergeRole(other.getRole());
          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.PrivilegeAction parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (cz.proto.access.PrivilegeAction) 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;
    }


    /**
     * .cz.proto.access.ActionType action = 10;
     * @return Whether the action field is set.
     */
    @java.lang.Override
    public boolean hasAction() {
      return derivedCase_ == 10;
    }
    /**
     * .cz.proto.access.ActionType action = 10;
     * @return The enum numeric value on the wire for action.
     */
    @java.lang.Override
    public int getActionValue() {
      if (derivedCase_ == 10) {
        return ((java.lang.Integer) derived_).intValue();
      }
      return 0;
    }
    /**
     * .cz.proto.access.ActionType action = 10;
     * @param value The enum numeric value on the wire for action to set.
     * @return This builder for chaining.
     */
    public Builder setActionValue(int value) {
      derivedCase_ = 10;
      derived_ = value;
      onChanged();
      return this;
    }
    /**
     * .cz.proto.access.ActionType action = 10;
     * @return The action.
     */
    @java.lang.Override
    public cz.proto.access.ActionType getAction() {
      if (derivedCase_ == 10) {
        @SuppressWarnings("deprecation")
        cz.proto.access.ActionType result = cz.proto.access.ActionType.valueOf(
            (java.lang.Integer) derived_);
        return result == null ? cz.proto.access.ActionType.UNRECOGNIZED : result;
      }
      return cz.proto.access.ActionType.AT_KNOWN;
    }
    /**
     * .cz.proto.access.ActionType action = 10;
     * @param value The action to set.
     * @return This builder for chaining.
     */
    public Builder setAction(cz.proto.access.ActionType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      derivedCase_ = 10;
      derived_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .cz.proto.access.ActionType action = 10;
     * @return This builder for chaining.
     */
    public Builder clearAction() {
      if (derivedCase_ == 10) {
        derivedCase_ = 0;
        derived_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * string policy_name = 11;
     * @return Whether the policyName field is set.
     */
    @java.lang.Override
    public boolean hasPolicyName() {
      return derivedCase_ == 11;
    }
    /**
     * string policy_name = 11;
     * @return The policyName.
     */
    @java.lang.Override
    public java.lang.String getPolicyName() {
      java.lang.Object ref = "";
      if (derivedCase_ == 11) {
        ref = derived_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (derivedCase_ == 11) {
          derived_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string policy_name = 11;
     * @return The bytes for policyName.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getPolicyNameBytes() {
      java.lang.Object ref = "";
      if (derivedCase_ == 11) {
        ref = derived_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (derivedCase_ == 11) {
          derived_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string policy_name = 11;
     * @param value The policyName to set.
     * @return This builder for chaining.
     */
    public Builder setPolicyName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  derivedCase_ = 11;
      derived_ = value;
      onChanged();
      return this;
    }
    /**
     * string policy_name = 11;
     * @return This builder for chaining.
     */
    public Builder clearPolicyName() {
      if (derivedCase_ == 11) {
        derivedCase_ = 0;
        derived_ = null;
        onChanged();
      }
      return this;
    }
    /**
     * string policy_name = 11;
     * @param value The bytes for policyName to set.
     * @return This builder for chaining.
     */
    public Builder setPolicyNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      derivedCase_ = 11;
      derived_ = value;
      onChanged();
      return this;
    }

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

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

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

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public PrivilegeAction parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new PrivilegeAction(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.PrivilegeAction getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy