/** * * * <pre> * Required. The resource name of the instance location using the form: * `projects/{project_id}/locations/{location_id}` * where `location_id` refers to a GCP region * </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) + INSTANCE_ID_FIELD_NUMBER; hash = (53 * hash) + getInstanceId().hashCode(); if (hasInstance()) { hash = (37 * hash) + INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getInstance().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.redis.v1.CreateInstanceRequest)) { return super.equals(obj); } com.google.cloud.redis.v1.CreateInstanceRequest other = (com.google.cloud.redis.v1.CreateInstanceRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getInstanceId().equals(other.getInstanceId()); result = result && (hasInstance() == other.hasInstance()); if (hasInstance()) { result = result && getInstance().equals(other.getInstance()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.cloud.redis.v1.CreateInstanceRequest other) { if (other == com.google.cloud.redis.v1.CreateInstanceRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (!other.getInstanceId().isEmpty()) { instanceId_ = other.instanceId_; onChanged(); } if (other.hasInstance()) { mergeInstance(other.getInstance()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
CreateInstanceRequest actualRequest = (CreateInstanceRequest) actualRequests.get(0); Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); Assert.assertEquals(instanceId, actualRequest.getInstanceId()); Assert.assertEquals(instance, actualRequest.getInstance());