/** * * * <pre> * Required. The logical name of the Redis instance in the customer project * with the following restrictions: * * Must contain only lowercase letters, numbers, and hyphens. * * Must start with a letter. * * Must be between 1-40 characters. * * Must end with a number or a letter. * * Must be unique within the customer project / location * </pre> * * <code>string instance_id = 2;</code> */ public Builder clearInstanceId() { instanceId_ = getDefaultInstance().getInstanceId(); 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; }
Assert.assertEquals(instanceId, actualRequest.getInstanceId()); Assert.assertEquals(instance, actualRequest.getInstance()); Assert.assertTrue(