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

com.ibm.etcd.api.Role Maven / Gradle / Ivy

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

package com.ibm.etcd.api;

/**
 * 
 * Role is a single entry in the bucket authRoles
 * 
* * Protobuf type {@code authpb.Role} */ public final class Role extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authpb.Role) RoleOrBuilder { private static final long serialVersionUID = 0L; // Use Role.newBuilder() to construct. private Role(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Role() { name_ = com.google.protobuf.ByteString.EMPTY; keyPermission_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Role(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.ibm.etcd.api.Auth.internal_static_authpb_Role_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.ibm.etcd.api.Auth.internal_static_authpb_Role_fieldAccessorTable .ensureFieldAccessorsInitialized( com.ibm.etcd.api.Role.class, com.ibm.etcd.api.Role.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private com.google.protobuf.ByteString name_; /** * bytes name = 1; * @return The name. */ @java.lang.Override public com.google.protobuf.ByteString getName() { return name_; } public static final int KEYPERMISSION_FIELD_NUMBER = 2; private java.util.List keyPermission_; /** * repeated .authpb.Permission keyPermission = 2; */ @java.lang.Override public java.util.List getKeyPermissionList() { return keyPermission_; } /** * repeated .authpb.Permission keyPermission = 2; */ @java.lang.Override public java.util.List getKeyPermissionOrBuilderList() { return keyPermission_; } /** * repeated .authpb.Permission keyPermission = 2; */ @java.lang.Override public int getKeyPermissionCount() { return keyPermission_.size(); } /** * repeated .authpb.Permission keyPermission = 2; */ @java.lang.Override public com.ibm.etcd.api.Permission getKeyPermission(int index) { return keyPermission_.get(index); } /** * repeated .authpb.Permission keyPermission = 2; */ @java.lang.Override public com.ibm.etcd.api.PermissionOrBuilder getKeyPermissionOrBuilder( int index) { return keyPermission_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!name_.isEmpty()) { output.writeBytes(1, name_); } for (int i = 0; i < keyPermission_.size(); i++) { output.writeMessage(2, keyPermission_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!name_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, name_); } for (int i = 0; i < keyPermission_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, keyPermission_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.ibm.etcd.api.Role)) { return super.equals(obj); } com.ibm.etcd.api.Role other = (com.ibm.etcd.api.Role) obj; if (!getName() .equals(other.getName())) return false; if (!getKeyPermissionList() .equals(other.getKeyPermissionList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (getKeyPermissionCount() > 0) { hash = (37 * hash) + KEYPERMISSION_FIELD_NUMBER; hash = (53 * hash) + getKeyPermissionList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.ibm.etcd.api.Role parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.ibm.etcd.api.Role parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.ibm.etcd.api.Role parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.ibm.etcd.api.Role parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.ibm.etcd.api.Role parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.ibm.etcd.api.Role parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.ibm.etcd.api.Role parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.ibm.etcd.api.Role parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.ibm.etcd.api.Role parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.ibm.etcd.api.Role parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.ibm.etcd.api.Role parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.ibm.etcd.api.Role parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.ibm.etcd.api.Role 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; } /** *
   * Role is a single entry in the bucket authRoles
   * 
* * Protobuf type {@code authpb.Role} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authpb.Role) com.ibm.etcd.api.RoleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.ibm.etcd.api.Auth.internal_static_authpb_Role_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.ibm.etcd.api.Auth.internal_static_authpb_Role_fieldAccessorTable .ensureFieldAccessorsInitialized( com.ibm.etcd.api.Role.class, com.ibm.etcd.api.Role.Builder.class); } // Construct using com.ibm.etcd.api.Role.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); name_ = com.google.protobuf.ByteString.EMPTY; if (keyPermissionBuilder_ == null) { keyPermission_ = java.util.Collections.emptyList(); } else { keyPermission_ = null; keyPermissionBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.ibm.etcd.api.Auth.internal_static_authpb_Role_descriptor; } @java.lang.Override public com.ibm.etcd.api.Role getDefaultInstanceForType() { return com.ibm.etcd.api.Role.getDefaultInstance(); } @java.lang.Override public com.ibm.etcd.api.Role build() { com.ibm.etcd.api.Role result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.ibm.etcd.api.Role buildPartial() { com.ibm.etcd.api.Role result = new com.ibm.etcd.api.Role(this); int from_bitField0_ = bitField0_; result.name_ = name_; if (keyPermissionBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { keyPermission_ = java.util.Collections.unmodifiableList(keyPermission_); bitField0_ = (bitField0_ & ~0x00000001); } result.keyPermission_ = keyPermission_; } else { result.keyPermission_ = keyPermissionBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.ibm.etcd.api.Role) { return mergeFrom((com.ibm.etcd.api.Role)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.ibm.etcd.api.Role other) { if (other == com.ibm.etcd.api.Role.getDefaultInstance()) return this; if (other.getName() != com.google.protobuf.ByteString.EMPTY) { setName(other.getName()); } if (keyPermissionBuilder_ == null) { if (!other.keyPermission_.isEmpty()) { if (keyPermission_.isEmpty()) { keyPermission_ = other.keyPermission_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureKeyPermissionIsMutable(); keyPermission_.addAll(other.keyPermission_); } onChanged(); } } else { if (!other.keyPermission_.isEmpty()) { if (keyPermissionBuilder_.isEmpty()) { keyPermissionBuilder_.dispose(); keyPermissionBuilder_ = null; keyPermission_ = other.keyPermission_; bitField0_ = (bitField0_ & ~0x00000001); keyPermissionBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKeyPermissionFieldBuilder() : null; } else { keyPermissionBuilder_.addAllMessages(other.keyPermission_); } } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { name_ = input.readBytes(); break; } // case 10 case 18: { com.ibm.etcd.api.Permission m = input.readMessage( com.ibm.etcd.api.Permission.parser(), extensionRegistry); if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); keyPermission_.add(m); } else { keyPermissionBuilder_.addMessage(m); } break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.protobuf.ByteString name_ = com.google.protobuf.ByteString.EMPTY; /** * bytes name = 1; * @return The name. */ @java.lang.Override public com.google.protobuf.ByteString getName() { return name_; } /** * bytes name = 1; * @param value The name to set. * @return This builder for chaining. */ public Builder setName(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** * bytes name = 1; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } private java.util.List keyPermission_ = java.util.Collections.emptyList(); private void ensureKeyPermissionIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { keyPermission_ = new java.util.ArrayList(keyPermission_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.ibm.etcd.api.Permission, com.ibm.etcd.api.Permission.Builder, com.ibm.etcd.api.PermissionOrBuilder> keyPermissionBuilder_; /** * repeated .authpb.Permission keyPermission = 2; */ public java.util.List getKeyPermissionList() { if (keyPermissionBuilder_ == null) { return java.util.Collections.unmodifiableList(keyPermission_); } else { return keyPermissionBuilder_.getMessageList(); } } /** * repeated .authpb.Permission keyPermission = 2; */ public int getKeyPermissionCount() { if (keyPermissionBuilder_ == null) { return keyPermission_.size(); } else { return keyPermissionBuilder_.getCount(); } } /** * repeated .authpb.Permission keyPermission = 2; */ public com.ibm.etcd.api.Permission getKeyPermission(int index) { if (keyPermissionBuilder_ == null) { return keyPermission_.get(index); } else { return keyPermissionBuilder_.getMessage(index); } } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder setKeyPermission( int index, com.ibm.etcd.api.Permission value) { if (keyPermissionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyPermissionIsMutable(); keyPermission_.set(index, value); onChanged(); } else { keyPermissionBuilder_.setMessage(index, value); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder setKeyPermission( int index, com.ibm.etcd.api.Permission.Builder builderForValue) { if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); keyPermission_.set(index, builderForValue.build()); onChanged(); } else { keyPermissionBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder addKeyPermission(com.ibm.etcd.api.Permission value) { if (keyPermissionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyPermissionIsMutable(); keyPermission_.add(value); onChanged(); } else { keyPermissionBuilder_.addMessage(value); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder addKeyPermission( int index, com.ibm.etcd.api.Permission value) { if (keyPermissionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyPermissionIsMutable(); keyPermission_.add(index, value); onChanged(); } else { keyPermissionBuilder_.addMessage(index, value); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder addKeyPermission( com.ibm.etcd.api.Permission.Builder builderForValue) { if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); keyPermission_.add(builderForValue.build()); onChanged(); } else { keyPermissionBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder addKeyPermission( int index, com.ibm.etcd.api.Permission.Builder builderForValue) { if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); keyPermission_.add(index, builderForValue.build()); onChanged(); } else { keyPermissionBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder addAllKeyPermission( java.lang.Iterable values) { if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, keyPermission_); onChanged(); } else { keyPermissionBuilder_.addAllMessages(values); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder clearKeyPermission() { if (keyPermissionBuilder_ == null) { keyPermission_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { keyPermissionBuilder_.clear(); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder removeKeyPermission(int index) { if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); keyPermission_.remove(index); onChanged(); } else { keyPermissionBuilder_.remove(index); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public com.ibm.etcd.api.Permission.Builder getKeyPermissionBuilder( int index) { return getKeyPermissionFieldBuilder().getBuilder(index); } /** * repeated .authpb.Permission keyPermission = 2; */ public com.ibm.etcd.api.PermissionOrBuilder getKeyPermissionOrBuilder( int index) { if (keyPermissionBuilder_ == null) { return keyPermission_.get(index); } else { return keyPermissionBuilder_.getMessageOrBuilder(index); } } /** * repeated .authpb.Permission keyPermission = 2; */ public java.util.List getKeyPermissionOrBuilderList() { if (keyPermissionBuilder_ != null) { return keyPermissionBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(keyPermission_); } } /** * repeated .authpb.Permission keyPermission = 2; */ public com.ibm.etcd.api.Permission.Builder addKeyPermissionBuilder() { return getKeyPermissionFieldBuilder().addBuilder( com.ibm.etcd.api.Permission.getDefaultInstance()); } /** * repeated .authpb.Permission keyPermission = 2; */ public com.ibm.etcd.api.Permission.Builder addKeyPermissionBuilder( int index) { return getKeyPermissionFieldBuilder().addBuilder( index, com.ibm.etcd.api.Permission.getDefaultInstance()); } /** * repeated .authpb.Permission keyPermission = 2; */ public java.util.List getKeyPermissionBuilderList() { return getKeyPermissionFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.ibm.etcd.api.Permission, com.ibm.etcd.api.Permission.Builder, com.ibm.etcd.api.PermissionOrBuilder> getKeyPermissionFieldBuilder() { if (keyPermissionBuilder_ == null) { keyPermissionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.ibm.etcd.api.Permission, com.ibm.etcd.api.Permission.Builder, com.ibm.etcd.api.PermissionOrBuilder>( keyPermission_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); keyPermission_ = null; } return keyPermissionBuilder_; } @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:authpb.Role) } // @@protoc_insertion_point(class_scope:authpb.Role) private static final com.ibm.etcd.api.Role DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.ibm.etcd.api.Role(); } public static com.ibm.etcd.api.Role getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Role parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.ibm.etcd.api.Role getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy