public Builder mergePrimaryInstance(
        com.google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance value) {
      if (primaryInstanceBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)
            && primaryInstance_ != null
            && primaryInstance_
                != com.google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance
                    .getDefaultInstance()) {
          getPrimaryInstanceBuilder().mergeFrom(value);
        } else {
          primaryInstance_ = value;
        }
      } else {
        primaryInstanceBuilder_.mergeFrom(value);
      }
      if (primaryInstance_ != null) {
        bitField0_ |= 0x00000002;
        onChanged();
      }
      return this;
    }
<pre>
Optional. Details of the primary instance that is used as the replication
source for this secondary instance.

This field is only set for a secondary instance.
</pre>

<code>
.google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 2 [(.google.api.field_behavior) = OPTIONAL];
</code>
java-valkey/proto-google-cloud-valkey-v1/src/main/java/com/google/cloud/memorystore/v1/CrossInstanceReplicationConfig.java