@Override public Map<String, String> extract(CreateCryptoKeyRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("parent", String.valueOf(request.getParent())); return params.build(); } })
/** * * * <pre> * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing associated with the * [CryptoKeys][google.cloud.kms.v1.CryptoKey]. * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + CRYPTO_KEY_ID_FIELD_NUMBER; hash = (53 * hash) + getCryptoKeyId().hashCode(); if (hasCryptoKey()) { hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; hash = (53 * hash) + getCryptoKey().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.kms.v1.CreateCryptoKeyRequest)) { return super.equals(obj); } com.google.cloud.kms.v1.CreateCryptoKeyRequest other = (com.google.cloud.kms.v1.CreateCryptoKeyRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getCryptoKeyId().equals(other.getCryptoKeyId()); result = result && (hasCryptoKey() == other.hasCryptoKey()); if (hasCryptoKey()) { result = result && getCryptoKey().equals(other.getCryptoKey()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.cloud.kms.v1.CreateCryptoKeyRequest other) { if (other == com.google.cloud.kms.v1.CreateCryptoKeyRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (!other.getCryptoKeyId().isEmpty()) { cryptoKeyId_ = other.cryptoKeyId_; onChanged(); } if (other.hasCryptoKey()) { mergeCryptoKey(other.getCryptoKey()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
CreateCryptoKeyRequest actualRequest = (CreateCryptoKeyRequest) actualRequests.get(0); Assert.assertEquals(parent, KeyRingName.parse(actualRequest.getParent())); Assert.assertEquals(cryptoKeyId, actualRequest.getCryptoKeyId()); Assert.assertEquals(cryptoKey, actualRequest.getCryptoKey());
@Override public Map<String, String> extract(CreateCryptoKeyRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("parent", String.valueOf(request.getParent())); return params.build(); } })
/** * * * <pre> * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing associated with the * [CryptoKeys][google.cloud.kms.v1.CryptoKey]. * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + CRYPTO_KEY_ID_FIELD_NUMBER; hash = (53 * hash) + getCryptoKeyId().hashCode(); if (hasCryptoKey()) { hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; hash = (53 * hash) + getCryptoKey().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.kms.v1.CreateCryptoKeyRequest)) { return super.equals(obj); } com.google.cloud.kms.v1.CreateCryptoKeyRequest other = (com.google.cloud.kms.v1.CreateCryptoKeyRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getCryptoKeyId().equals(other.getCryptoKeyId()); result = result && (hasCryptoKey() == other.hasCryptoKey()); if (hasCryptoKey()) { result = result && getCryptoKey().equals(other.getCryptoKey()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.cloud.kms.v1.CreateCryptoKeyRequest other) { if (other == com.google.cloud.kms.v1.CreateCryptoKeyRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (!other.getCryptoKeyId().isEmpty()) { cryptoKeyId_ = other.cryptoKeyId_; onChanged(); } if (other.hasCryptoKey()) { mergeCryptoKey(other.getCryptoKey()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }