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

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

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private PrivilegeContent(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    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 8: {
            int rawValue = input.readEnum();
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              action_ = new java.util.ArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            action_.add(rawValue);
            break;
          }
          case 10: {
            int length = input.readRawVarint32();
            int oldLimit = input.pushLimit(length);
            while(input.getBytesUntilLimit() > 0) {
              int rawValue = input.readEnum();
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                action_ = new java.util.ArrayList();
                mutable_bitField0_ |= 0x00000001;
              }
              action_.add(rawValue);
            }
            input.popLimit(oldLimit);
            break;
          }
          case 18: {
            cz.proto.ObjectIdentifier.Builder subBuilder = null;
            if (object_ != null) {
              subBuilder = object_.toBuilder();
            }
            object_ = input.readMessage(cz.proto.ObjectIdentifier.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(object_);
              object_ = subBuilder.buildPartial();
            }

            break;
          }
          case 24: {
            int rawValue = input.readEnum();

            grantedType_ = rawValue;
            break;
          }
          case 40: {

            withGrantOption_ = input.readBool();
            break;
          }
          case 48: {
            int rawValue = input.readEnum();

            subObjectType_ = rawValue;
            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 {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        action_ = java.util.Collections.unmodifiableList(action_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return cz.proto.access.PrivilegeOuterClass.internal_static_cz_proto_access_PrivilegeContent_descriptor;
  }

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

  public static final int ACTION_FIELD_NUMBER = 1;
  private java.util.List action_;
  private static final com.google.protobuf.Internal.ListAdapter.Converter<
      java.lang.Integer, cz.proto.access.ActionType> action_converter_ =
          new com.google.protobuf.Internal.ListAdapter.Converter<
              java.lang.Integer, cz.proto.access.ActionType>() {
            public cz.proto.access.ActionType convert(java.lang.Integer from) {
              @SuppressWarnings("deprecation")
              cz.proto.access.ActionType result = cz.proto.access.ActionType.valueOf(from);
              return result == null ? cz.proto.access.ActionType.UNRECOGNIZED : result;
            }
          };
  /**
   * repeated .cz.proto.access.ActionType action = 1;
   * @return A list containing the action.
   */
  @java.lang.Override
  public java.util.List getActionList() {
    return new com.google.protobuf.Internal.ListAdapter<
        java.lang.Integer, cz.proto.access.ActionType>(action_, action_converter_);
  }
  /**
   * repeated .cz.proto.access.ActionType action = 1;
   * @return The count of action.
   */
  @java.lang.Override
  public int getActionCount() {
    return action_.size();
  }
  /**
   * repeated .cz.proto.access.ActionType action = 1;
   * @param index The index of the element to return.
   * @return The action at the given index.
   */
  @java.lang.Override
  public cz.proto.access.ActionType getAction(int index) {
    return action_converter_.convert(action_.get(index));
  }
  /**
   * repeated .cz.proto.access.ActionType action = 1;
   * @return A list containing the enum numeric values on the wire for action.
   */
  @java.lang.Override
  public java.util.List
  getActionValueList() {
    return action_;
  }
  /**
   * repeated .cz.proto.access.ActionType action = 1;
   * @param index The index of the value to return.
   * @return The enum numeric value on the wire of action at the given index.
   */
  @java.lang.Override
  public int getActionValue(int index) {
    return action_.get(index);
  }
  private int actionMemoizedSerializedSize;

  public static final int OBJECT_FIELD_NUMBER = 2;
  private cz.proto.ObjectIdentifier object_;
  /**
   * .cz.proto.ObjectIdentifier object = 2;
   * @return Whether the object field is set.
   */
  @java.lang.Override
  public boolean hasObject() {
    return object_ != null;
  }
  /**
   * .cz.proto.ObjectIdentifier object = 2;
   * @return The object.
   */
  @java.lang.Override
  public cz.proto.ObjectIdentifier getObject() {
    return object_ == null ? cz.proto.ObjectIdentifier.getDefaultInstance() : object_;
  }
  /**
   * .cz.proto.ObjectIdentifier object = 2;
   */
  @java.lang.Override
  public cz.proto.ObjectIdentifierOrBuilder getObjectOrBuilder() {
    return getObject();
  }

  public static final int GRANTED_TYPE_FIELD_NUMBER = 3;
  private int grantedType_;
  /**
   * .cz.proto.access.GrantedType.Type granted_type = 3;
   * @return The enum numeric value on the wire for grantedType.
   */
  @java.lang.Override public int getGrantedTypeValue() {
    return grantedType_;
  }
  /**
   * .cz.proto.access.GrantedType.Type granted_type = 3;
   * @return The grantedType.
   */
  @java.lang.Override public cz.proto.access.GrantedType.Type getGrantedType() {
    @SuppressWarnings("deprecation")
    cz.proto.access.GrantedType.Type result = cz.proto.access.GrantedType.Type.valueOf(grantedType_);
    return result == null ? cz.proto.access.GrantedType.Type.UNRECOGNIZED : result;
  }

  public static final int WITH_GRANT_OPTION_FIELD_NUMBER = 5;
  private boolean withGrantOption_;
  /**
   * 
   * for grant privileges:
   *   true means grant specified privileges with a 'grant to others option'
   *   false means only grant specified privileges
   * for revoke privileges:
   *   true means ONLY the grant option is revoked, not the privilege itself
   *   false means both the privilege and the grant option are revoked
   * 
* * bool with_grant_option = 5; * @return The withGrantOption. */ @java.lang.Override public boolean getWithGrantOption() { return withGrantOption_; } public static final int SUB_OBJECT_TYPE_FIELD_NUMBER = 6; private int subObjectType_; /** * .cz.proto.ObjectType sub_object_type = 6; * @return The enum numeric value on the wire for subObjectType. */ @java.lang.Override public int getSubObjectTypeValue() { return subObjectType_; } /** * .cz.proto.ObjectType sub_object_type = 6; * @return The subObjectType. */ @java.lang.Override public cz.proto.ObjectType getSubObjectType() { @SuppressWarnings("deprecation") cz.proto.ObjectType result = cz.proto.ObjectType.valueOf(subObjectType_); return result == null ? cz.proto.ObjectType.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 { getSerializedSize(); if (getActionList().size() > 0) { output.writeUInt32NoTag(10); output.writeUInt32NoTag(actionMemoizedSerializedSize); } for (int i = 0; i < action_.size(); i++) { output.writeEnumNoTag(action_.get(i)); } if (object_ != null) { output.writeMessage(2, getObject()); } if (grantedType_ != cz.proto.access.GrantedType.Type.PRIVILEGE.getNumber()) { output.writeEnum(3, grantedType_); } if (withGrantOption_ != false) { output.writeBool(5, withGrantOption_); } if (subObjectType_ != cz.proto.ObjectType.UNKNOWN.getNumber()) { output.writeEnum(6, subObjectType_); } unknownFields.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 < action_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeEnumSizeNoTag(action_.get(i)); } size += dataSize; if (!getActionList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(dataSize); }actionMemoizedSerializedSize = dataSize; } if (object_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getObject()); } if (grantedType_ != cz.proto.access.GrantedType.Type.PRIVILEGE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, grantedType_); } if (withGrantOption_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, withGrantOption_); } if (subObjectType_ != cz.proto.ObjectType.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, subObjectType_); } 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.PrivilegeContent)) { return super.equals(obj); } cz.proto.access.PrivilegeContent other = (cz.proto.access.PrivilegeContent) obj; if (!action_.equals(other.action_)) return false; if (hasObject() != other.hasObject()) return false; if (hasObject()) { if (!getObject() .equals(other.getObject())) return false; } if (grantedType_ != other.grantedType_) return false; if (getWithGrantOption() != other.getWithGrantOption()) return false; if (subObjectType_ != other.subObjectType_) return false; 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 (getActionCount() > 0) { hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + action_.hashCode(); } if (hasObject()) { hash = (37 * hash) + OBJECT_FIELD_NUMBER; hash = (53 * hash) + getObject().hashCode(); } hash = (37 * hash) + GRANTED_TYPE_FIELD_NUMBER; hash = (53 * hash) + grantedType_; hash = (37 * hash) + WITH_GRANT_OPTION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getWithGrantOption()); hash = (37 * hash) + SUB_OBJECT_TYPE_FIELD_NUMBER; hash = (53 * hash) + subObjectType_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static cz.proto.access.PrivilegeContent parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cz.proto.access.PrivilegeContent 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.PrivilegeContent parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cz.proto.access.PrivilegeContent 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.PrivilegeContent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cz.proto.access.PrivilegeContent parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cz.proto.access.PrivilegeContent parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cz.proto.access.PrivilegeContent 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.PrivilegeContent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static cz.proto.access.PrivilegeContent 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.PrivilegeContent parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cz.proto.access.PrivilegeContent 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.PrivilegeContent 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.PrivilegeContent} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:cz.proto.access.PrivilegeContent) cz.proto.access.PrivilegeContentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return cz.proto.access.PrivilegeOuterClass.internal_static_cz_proto_access_PrivilegeContent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return cz.proto.access.PrivilegeOuterClass.internal_static_cz_proto_access_PrivilegeContent_fieldAccessorTable .ensureFieldAccessorsInitialized( cz.proto.access.PrivilegeContent.class, cz.proto.access.PrivilegeContent.Builder.class); } // Construct using cz.proto.access.PrivilegeContent.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(); action_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); if (objectBuilder_ == null) { object_ = null; } else { object_ = null; objectBuilder_ = null; } grantedType_ = 0; withGrantOption_ = false; subObjectType_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return cz.proto.access.PrivilegeOuterClass.internal_static_cz_proto_access_PrivilegeContent_descriptor; } @java.lang.Override public cz.proto.access.PrivilegeContent getDefaultInstanceForType() { return cz.proto.access.PrivilegeContent.getDefaultInstance(); } @java.lang.Override public cz.proto.access.PrivilegeContent build() { cz.proto.access.PrivilegeContent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public cz.proto.access.PrivilegeContent buildPartial() { cz.proto.access.PrivilegeContent result = new cz.proto.access.PrivilegeContent(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { action_ = java.util.Collections.unmodifiableList(action_); bitField0_ = (bitField0_ & ~0x00000001); } result.action_ = action_; if (objectBuilder_ == null) { result.object_ = object_; } else { result.object_ = objectBuilder_.build(); } result.grantedType_ = grantedType_; result.withGrantOption_ = withGrantOption_; result.subObjectType_ = subObjectType_; 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.PrivilegeContent) { return mergeFrom((cz.proto.access.PrivilegeContent)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(cz.proto.access.PrivilegeContent other) { if (other == cz.proto.access.PrivilegeContent.getDefaultInstance()) return this; if (!other.action_.isEmpty()) { if (action_.isEmpty()) { action_ = other.action_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureActionIsMutable(); action_.addAll(other.action_); } onChanged(); } if (other.hasObject()) { mergeObject(other.getObject()); } if (other.grantedType_ != 0) { setGrantedTypeValue(other.getGrantedTypeValue()); } if (other.getWithGrantOption() != false) { setWithGrantOption(other.getWithGrantOption()); } if (other.subObjectType_ != 0) { setSubObjectTypeValue(other.getSubObjectTypeValue()); } 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.PrivilegeContent parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (cz.proto.access.PrivilegeContent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List action_ = java.util.Collections.emptyList(); private void ensureActionIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { action_ = new java.util.ArrayList(action_); bitField0_ |= 0x00000001; } } /** * repeated .cz.proto.access.ActionType action = 1; * @return A list containing the action. */ public java.util.List getActionList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, cz.proto.access.ActionType>(action_, action_converter_); } /** * repeated .cz.proto.access.ActionType action = 1; * @return The count of action. */ public int getActionCount() { return action_.size(); } /** * repeated .cz.proto.access.ActionType action = 1; * @param index The index of the element to return. * @return The action at the given index. */ public cz.proto.access.ActionType getAction(int index) { return action_converter_.convert(action_.get(index)); } /** * repeated .cz.proto.access.ActionType action = 1; * @param index The index to set the value at. * @param value The action to set. * @return This builder for chaining. */ public Builder setAction( int index, cz.proto.access.ActionType value) { if (value == null) { throw new NullPointerException(); } ensureActionIsMutable(); action_.set(index, value.getNumber()); onChanged(); return this; } /** * repeated .cz.proto.access.ActionType action = 1; * @param value The action to add. * @return This builder for chaining. */ public Builder addAction(cz.proto.access.ActionType value) { if (value == null) { throw new NullPointerException(); } ensureActionIsMutable(); action_.add(value.getNumber()); onChanged(); return this; } /** * repeated .cz.proto.access.ActionType action = 1; * @param values The action to add. * @return This builder for chaining. */ public Builder addAllAction( java.lang.Iterable values) { ensureActionIsMutable(); for (cz.proto.access.ActionType value : values) { action_.add(value.getNumber()); } onChanged(); return this; } /** * repeated .cz.proto.access.ActionType action = 1; * @return This builder for chaining. */ public Builder clearAction() { action_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * repeated .cz.proto.access.ActionType action = 1; * @return A list containing the enum numeric values on the wire for action. */ public java.util.List getActionValueList() { return java.util.Collections.unmodifiableList(action_); } /** * repeated .cz.proto.access.ActionType action = 1; * @param index The index of the value to return. * @return The enum numeric value on the wire of action at the given index. */ public int getActionValue(int index) { return action_.get(index); } /** * repeated .cz.proto.access.ActionType action = 1; * @param index The index of the value to return. * @return The enum numeric value on the wire of action at the given index. * @return This builder for chaining. */ public Builder setActionValue( int index, int value) { ensureActionIsMutable(); action_.set(index, value); onChanged(); return this; } /** * repeated .cz.proto.access.ActionType action = 1; * @param value The enum numeric value on the wire for action to add. * @return This builder for chaining. */ public Builder addActionValue(int value) { ensureActionIsMutable(); action_.add(value); onChanged(); return this; } /** * repeated .cz.proto.access.ActionType action = 1; * @param values The enum numeric values on the wire for action to add. * @return This builder for chaining. */ public Builder addAllActionValue( java.lang.Iterable values) { ensureActionIsMutable(); for (int value : values) { action_.add(value); } onChanged(); return this; } private cz.proto.ObjectIdentifier object_; private com.google.protobuf.SingleFieldBuilderV3< cz.proto.ObjectIdentifier, cz.proto.ObjectIdentifier.Builder, cz.proto.ObjectIdentifierOrBuilder> objectBuilder_; /** * .cz.proto.ObjectIdentifier object = 2; * @return Whether the object field is set. */ public boolean hasObject() { return objectBuilder_ != null || object_ != null; } /** * .cz.proto.ObjectIdentifier object = 2; * @return The object. */ public cz.proto.ObjectIdentifier getObject() { if (objectBuilder_ == null) { return object_ == null ? cz.proto.ObjectIdentifier.getDefaultInstance() : object_; } else { return objectBuilder_.getMessage(); } } /** * .cz.proto.ObjectIdentifier object = 2; */ public Builder setObject(cz.proto.ObjectIdentifier value) { if (objectBuilder_ == null) { if (value == null) { throw new NullPointerException(); } object_ = value; onChanged(); } else { objectBuilder_.setMessage(value); } return this; } /** * .cz.proto.ObjectIdentifier object = 2; */ public Builder setObject( cz.proto.ObjectIdentifier.Builder builderForValue) { if (objectBuilder_ == null) { object_ = builderForValue.build(); onChanged(); } else { objectBuilder_.setMessage(builderForValue.build()); } return this; } /** * .cz.proto.ObjectIdentifier object = 2; */ public Builder mergeObject(cz.proto.ObjectIdentifier value) { if (objectBuilder_ == null) { if (object_ != null) { object_ = cz.proto.ObjectIdentifier.newBuilder(object_).mergeFrom(value).buildPartial(); } else { object_ = value; } onChanged(); } else { objectBuilder_.mergeFrom(value); } return this; } /** * .cz.proto.ObjectIdentifier object = 2; */ public Builder clearObject() { if (objectBuilder_ == null) { object_ = null; onChanged(); } else { object_ = null; objectBuilder_ = null; } return this; } /** * .cz.proto.ObjectIdentifier object = 2; */ public cz.proto.ObjectIdentifier.Builder getObjectBuilder() { onChanged(); return getObjectFieldBuilder().getBuilder(); } /** * .cz.proto.ObjectIdentifier object = 2; */ public cz.proto.ObjectIdentifierOrBuilder getObjectOrBuilder() { if (objectBuilder_ != null) { return objectBuilder_.getMessageOrBuilder(); } else { return object_ == null ? cz.proto.ObjectIdentifier.getDefaultInstance() : object_; } } /** * .cz.proto.ObjectIdentifier object = 2; */ private com.google.protobuf.SingleFieldBuilderV3< cz.proto.ObjectIdentifier, cz.proto.ObjectIdentifier.Builder, cz.proto.ObjectIdentifierOrBuilder> getObjectFieldBuilder() { if (objectBuilder_ == null) { objectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< cz.proto.ObjectIdentifier, cz.proto.ObjectIdentifier.Builder, cz.proto.ObjectIdentifierOrBuilder>( getObject(), getParentForChildren(), isClean()); object_ = null; } return objectBuilder_; } private int grantedType_ = 0; /** * .cz.proto.access.GrantedType.Type granted_type = 3; * @return The enum numeric value on the wire for grantedType. */ @java.lang.Override public int getGrantedTypeValue() { return grantedType_; } /** * .cz.proto.access.GrantedType.Type granted_type = 3; * @param value The enum numeric value on the wire for grantedType to set. * @return This builder for chaining. */ public Builder setGrantedTypeValue(int value) { grantedType_ = value; onChanged(); return this; } /** * .cz.proto.access.GrantedType.Type granted_type = 3; * @return The grantedType. */ @java.lang.Override public cz.proto.access.GrantedType.Type getGrantedType() { @SuppressWarnings("deprecation") cz.proto.access.GrantedType.Type result = cz.proto.access.GrantedType.Type.valueOf(grantedType_); return result == null ? cz.proto.access.GrantedType.Type.UNRECOGNIZED : result; } /** * .cz.proto.access.GrantedType.Type granted_type = 3; * @param value The grantedType to set. * @return This builder for chaining. */ public Builder setGrantedType(cz.proto.access.GrantedType.Type value) { if (value == null) { throw new NullPointerException(); } grantedType_ = value.getNumber(); onChanged(); return this; } /** * .cz.proto.access.GrantedType.Type granted_type = 3; * @return This builder for chaining. */ public Builder clearGrantedType() { grantedType_ = 0; onChanged(); return this; } private boolean withGrantOption_ ; /** *
     * for grant privileges:
     *   true means grant specified privileges with a 'grant to others option'
     *   false means only grant specified privileges
     * for revoke privileges:
     *   true means ONLY the grant option is revoked, not the privilege itself
     *   false means both the privilege and the grant option are revoked
     * 
* * bool with_grant_option = 5; * @return The withGrantOption. */ @java.lang.Override public boolean getWithGrantOption() { return withGrantOption_; } /** *
     * for grant privileges:
     *   true means grant specified privileges with a 'grant to others option'
     *   false means only grant specified privileges
     * for revoke privileges:
     *   true means ONLY the grant option is revoked, not the privilege itself
     *   false means both the privilege and the grant option are revoked
     * 
* * bool with_grant_option = 5; * @param value The withGrantOption to set. * @return This builder for chaining. */ public Builder setWithGrantOption(boolean value) { withGrantOption_ = value; onChanged(); return this; } /** *
     * for grant privileges:
     *   true means grant specified privileges with a 'grant to others option'
     *   false means only grant specified privileges
     * for revoke privileges:
     *   true means ONLY the grant option is revoked, not the privilege itself
     *   false means both the privilege and the grant option are revoked
     * 
* * bool with_grant_option = 5; * @return This builder for chaining. */ public Builder clearWithGrantOption() { withGrantOption_ = false; onChanged(); return this; } private int subObjectType_ = 0; /** * .cz.proto.ObjectType sub_object_type = 6; * @return The enum numeric value on the wire for subObjectType. */ @java.lang.Override public int getSubObjectTypeValue() { return subObjectType_; } /** * .cz.proto.ObjectType sub_object_type = 6; * @param value The enum numeric value on the wire for subObjectType to set. * @return This builder for chaining. */ public Builder setSubObjectTypeValue(int value) { subObjectType_ = value; onChanged(); return this; } /** * .cz.proto.ObjectType sub_object_type = 6; * @return The subObjectType. */ @java.lang.Override public cz.proto.ObjectType getSubObjectType() { @SuppressWarnings("deprecation") cz.proto.ObjectType result = cz.proto.ObjectType.valueOf(subObjectType_); return result == null ? cz.proto.ObjectType.UNRECOGNIZED : result; } /** * .cz.proto.ObjectType sub_object_type = 6; * @param value The subObjectType to set. * @return This builder for chaining. */ public Builder setSubObjectType(cz.proto.ObjectType value) { if (value == null) { throw new NullPointerException(); } subObjectType_ = value.getNumber(); onChanged(); return this; } /** * .cz.proto.ObjectType sub_object_type = 6; * @return This builder for chaining. */ public Builder clearSubObjectType() { subObjectType_ = 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:cz.proto.access.PrivilegeContent) } // @@protoc_insertion_point(class_scope:cz.proto.access.PrivilegeContent) private static final cz.proto.access.PrivilegeContent DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new cz.proto.access.PrivilegeContent(); } public static cz.proto.access.PrivilegeContent getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public PrivilegeContent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PrivilegeContent(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.PrivilegeContent getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy