/** * * * <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 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; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (!getInstanceIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); } if (instance_ != null) { output.writeMessage(3, getInstance()); } unknownFields.writeTo(output); }
CreateInstanceRequest actualRequest = (CreateInstanceRequest) actualRequests.get(0); Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); Assert.assertEquals(instanceId, actualRequest.getInstanceId()); Assert.assertEquals(instance, actualRequest.getInstance()); Assert.assertTrue( channelProvider.isHeaderSent(
/** * * * <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 com.google.cloud.redis.v1.CreateInstanceRequest getDefaultInstanceForType() { return com.google.cloud.redis.v1.CreateInstanceRequest.getDefaultInstance(); }
/** * * * <pre> * Required. A Redis [Instance] resource * </pre> * * <code>.google.cloud.redis.v1.Instance instance = 3;</code> */ public com.google.cloud.redis.v1.InstanceOrBuilder getInstanceOrBuilder() { return getInstance(); }
@java.lang.Override public com.google.cloud.redis.v1.CreateInstanceRequest buildPartial() { com.google.cloud.redis.v1.CreateInstanceRequest result = new com.google.cloud.redis.v1.CreateInstanceRequest(this); result.parent_ = parent_; result.instanceId_ = instanceId_; if (instanceBuilder_ == null) { result.instance_ = instance_; } else { result.instance_ = instanceBuilder_.build(); } onBuilt(); return result; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (!getInstanceIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); } if (instance_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstance()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.cloud.redis.v1.CreateInstanceRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
@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; }
CreateInstanceRequest.newBuilder() .setParent(parent) .setInstanceId(instanceId)
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.newBuilder() .setParent(parent == null ? null : parent.toString()) .setInstanceId(instanceId)