@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.kms.v1.EncryptRequest)) { return super.equals(obj); } com.google.cloud.kms.v1.EncryptRequest other = (com.google.cloud.kms.v1.EncryptRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getPlaintext().equals(other.getPlaintext()); result = result && getAdditionalAuthenticatedData().equals(other.getAdditionalAuthenticatedData()); result = result && unknownFields.equals(other.unknownFields); return result; }
@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(); hash = (37 * hash) + PLAINTEXT_FIELD_NUMBER; hash = (53 * hash) + getPlaintext().hashCode(); hash = (37 * hash) + ADDITIONAL_AUTHENTICATED_DATA_FIELD_NUMBER; hash = (53 * hash) + getAdditionalAuthenticatedData().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * Optional data that, if specified, must also be provided during decryption * through [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. * The maximum size depends on the key version's * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. For * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the AAD must be no larger than * 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of the * plaintext and additional_authenticated_data fields must be no larger than * 8KiB. * </pre> * * <code>bytes additional_authenticated_data = 3;</code> */ public Builder clearAdditionalAuthenticatedData() { additionalAuthenticatedData_ = getDefaultInstance().getAdditionalAuthenticatedData(); onChanged(); return this; }
public Builder mergeFrom(com.google.cloud.kms.v1.EncryptRequest other) { if (other == com.google.cloud.kms.v1.EncryptRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getPlaintext() != com.google.protobuf.ByteString.EMPTY) { setPlaintext(other.getPlaintext()); } if (other.getAdditionalAuthenticatedData() != com.google.protobuf.ByteString.EMPTY) { setAdditionalAuthenticatedData(other.getAdditionalAuthenticatedData()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.kms.v1.EncryptRequest)) { return super.equals(obj); } com.google.cloud.kms.v1.EncryptRequest other = (com.google.cloud.kms.v1.EncryptRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getPlaintext().equals(other.getPlaintext()); result = result && getAdditionalAuthenticatedData().equals(other.getAdditionalAuthenticatedData()); result = result && unknownFields.equals(other.unknownFields); return result; }
@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(); hash = (37 * hash) + PLAINTEXT_FIELD_NUMBER; hash = (53 * hash) + getPlaintext().hashCode(); hash = (37 * hash) + ADDITIONAL_AUTHENTICATED_DATA_FIELD_NUMBER; hash = (53 * hash) + getAdditionalAuthenticatedData().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * Optional data that, if specified, must also be provided during decryption * through [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. * The maximum size depends on the key version's * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. For * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE] keys, the AAD must be no larger than * 64KiB. For [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of the * plaintext and additional_authenticated_data fields must be no larger than * 8KiB. * </pre> * * <code>bytes additional_authenticated_data = 3;</code> */ public Builder clearAdditionalAuthenticatedData() { additionalAuthenticatedData_ = getDefaultInstance().getAdditionalAuthenticatedData(); onChanged(); return this; }
public Builder mergeFrom(com.google.cloud.kms.v1.EncryptRequest other) { if (other == com.google.cloud.kms.v1.EncryptRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getPlaintext() != com.google.protobuf.ByteString.EMPTY) { setPlaintext(other.getPlaintext()); } if (other.getAdditionalAuthenticatedData() != com.google.protobuf.ByteString.EMPTY) { setAdditionalAuthenticatedData(other.getAdditionalAuthenticatedData()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }