public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; for (int i = 0; i < tokens_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, tokens_.get(i)); } for (int i = 0; i < secrets_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, secrets_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < tokens_.size(); i++) { output.writeMessage(1, tokens_.get(i)); } for (int i = 0; i < secrets_.size(); i++) { output.writeMessage(2, secrets_.get(i)); } getUnknownFields().writeTo(output); }
this.mergeUnknownFields(other.getUnknownFields()); return this;
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (getTokensCount() > 0) { hash = (37 * hash) + TOKENS_FIELD_NUMBER; hash = (53 * hash) + getTokensList().hashCode(); } if (getSecretsCount() > 0) { hash = (37 * hash) + SECRETS_FIELD_NUMBER; hash = (53 * hash) + getSecretsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@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.CredentialsProto)) { return super.equals(obj); } org.apache.hadoop.security.proto.SecurityProtos.CredentialsProto other = (org.apache.hadoop.security.proto.SecurityProtos.CredentialsProto) obj; boolean result = true; result = result && getTokensList() .equals(other.getTokensList()); result = result && getSecretsList() .equals(other.getSecretsList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }