public org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto buildPartial() { org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto result = new org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.alias_ = alias_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } if (tokenBuilder_ == null) { result.token_ = token_; } else { result.token_ = tokenBuilder_.build(); } if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.secret_ = secret_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasAlias()) { hash = (37 * hash) + ALIAS_FIELD_NUMBER; hash = (53 * hash) + getAlias().hashCode(); } if (hasToken()) { hash = (37 * hash) + TOKEN_FIELD_NUMBER; hash = (53 * hash) + getToken().hashCode(); } if (hasSecret()) { hash = (37 * hash) + SECRET_FIELD_NUMBER; hash = (53 * hash) + getSecret().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getAliasBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, token_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, secret_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto)) { return super.equals(obj); } org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto other = (org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto) obj; boolean result = true; result = result && (hasAlias() == other.hasAlias()); if (hasAlias()) { result = result && getAlias() .equals(other.getAlias()); } result = result && (hasToken() == other.hasToken()); if (hasToken()) { result = result && getToken() .equals(other.getToken()); } result = result && (hasSecret() == other.hasSecret()); if (hasSecret()) { result = result && getSecret() .equals(other.getSecret()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto getDefaultInstanceForType() { return org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto.getDefaultInstance(); }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasAlias()) { memoizedIsInitialized = 0; return false; } if (hasToken()) { if (!getToken().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; }
public Builder mergeFrom(org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto other) { if (other == org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto.getDefaultInstance()) return this; if (other.hasAlias()) { bitField0_ |= 0x00000001; alias_ = other.alias_; onChanged(); } if (other.hasToken()) { mergeToken(other.getToken()); } if (other.hasSecret()) { setSecret(other.getSecret()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * Populates keys/values from proto buffer storage. * @param in - stream ready to read a serialized proto buffer message */ void readProto(DataInput in) throws IOException { CredentialsProto storage = CredentialsProto.parseDelimitedFrom((DataInputStream)in); for (CredentialsKVProto kv : storage.getTokensList()) { addToken(new Text(kv.getAliasBytes().toByteArray()), (Token<? extends TokenIdentifier>) new Token(kv.getToken())); } for (CredentialsKVProto kv : storage.getSecretsList()) { addSecretKey(new Text(kv.getAliasBytes().toByteArray()), kv.getSecret().toByteArray()); } }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getAliasBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, token_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, secret_); } getUnknownFields().writeTo(output); }
/** * <code>repeated .hadoop.common.CredentialsKVProto tokens = 1;</code> */ public org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto.Builder addTokensBuilder( int index) { return getTokensFieldBuilder().addBuilder( index, org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto.getDefaultInstance()); } /**
/** * <code>repeated .hadoop.common.CredentialsKVProto tokens = 1;</code> */ public org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto.Builder addTokensBuilder() { return getTokensFieldBuilder().addBuilder( org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto.getDefaultInstance()); } /**
/** * <code>optional bytes secret = 3;</code> */ public Builder clearSecret() { bitField0_ = (bitField0_ & ~0x00000004); secret_ = getDefaultInstance().getSecret(); onChanged(); return this; }
/** * <code>repeated .hadoop.common.CredentialsKVProto secrets = 2;</code> */ public org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto.Builder addSecretsBuilder( int index) { return getSecretsFieldBuilder().addBuilder( index, org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto.getDefaultInstance()); } /**
/** * <code>repeated .hadoop.common.CredentialsKVProto secrets = 2;</code> */ public org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto.Builder addSecretsBuilder() { return getSecretsFieldBuilder().addBuilder( org.apache.hadoop.security.proto.SecurityProtos.CredentialsKVProto.getDefaultInstance()); } /**
/** * <code>required string alias = 1;</code> */ public Builder clearAlias() { bitField0_ = (bitField0_ & ~0x00000001); alias_ = getDefaultInstance().getAlias(); onChanged(); return this; } /**