@java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 10
            case 18:
              {
                input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 26
            case 34:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
                    input.readMessage(
                        LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableLabels()
                    .getMutableMap()
                    .put(labels__.getKey(), labels__.getValue());
                bitField0_ |= 0x00000020;
                break;
              } // case 34
            case 40:
              {
                state_ = input.readEnum();
                bitField0_ |= 0x00000040;
                break;
              } // case 40
            case 50:
              {
                input.readMessage(getStateInfoFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000080;
                break;
              } // case 50
            case 58:
              {
                uid_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000100;
                break;
              } // case 58
            case 64:
              {
                replicaCount_ = input.readInt32();
                bitField0_ |= 0x00000200;
                break;
              } // case 64
            case 72:
              {
                authorizationMode_ = input.readEnum();
                bitField0_ |= 0x00000400;
                break;
              } // case 72
            case 80:
              {
                transitEncryptionMode_ = input.readEnum();
                bitField0_ |= 0x00000800;
                break;
              } // case 80
            case 88:
              {
                shardCount_ = input.readInt32();
                bitField0_ |= 0x00001000;
                break;
              } // case 88
            case 98:
              {
                com.google.cloud.memorystore.v1.DiscoveryEndpoint m =
                    input.readMessage(
                        com.google.cloud.memorystore.v1.DiscoveryEndpoint.parser(),
                        extensionRegistry);
                if (discoveryEndpointsBuilder_ == null) {
                  ensureDiscoveryEndpointsIsMutable();
                  discoveryEndpoints_.add(m);
                } else {
                  discoveryEndpointsBuilder_.addMessage(m);
                }
                break;
              } // case 98
            case 104:
              {
                nodeType_ = input.readEnum();
                bitField0_ |= 0x00004000;
                break;
              } // case 104
            case 114:
              {
                input.readMessage(
                    getPersistenceConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00008000;
                break;
              } // case 114
            case 122:
              {
                engineVersion_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00010000;
                break;
              } // case 122
            case 130:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> engineConfigs__ =
                    input.readMessage(
                        EngineConfigsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableEngineConfigs()
                    .getMutableMap()
                    .put(engineConfigs__.getKey(), engineConfigs__.getValue());
                bitField0_ |= 0x00020000;
                break;
              } // case 130
            case 138:
              {
                input.readMessage(getNodeConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00040000;
                break;
              } // case 138
            case 146:
              {
                input.readMessage(
                    getZoneDistributionConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00080000;
                break;
              } // case 146
            case 152:
              {
                deletionProtectionEnabled_ = input.readBool();
                bitField0_ |= 0x00100000;
                break;
              } // case 152
            case 162:
              {
                com.google.cloud.memorystore.v1.PscAutoConnection m =
                    input.readMessage(
                        com.google.cloud.memorystore.v1.PscAutoConnection.parser(),
                        extensionRegistry);
                if (pscAutoConnectionsBuilder_ == null) {
                  ensurePscAutoConnectionsIsMutable();
                  pscAutoConnections_.add(m);
                } else {
                  pscAutoConnectionsBuilder_.addMessage(m);
                }
                break;
              } // case 162
            case 170:
              {
                com.google.cloud.memorystore.v1.PscAttachmentDetail m =
                    input.readMessage(
                        com.google.cloud.memorystore.v1.PscAttachmentDetail.parser(),
                        extensionRegistry);
                if (pscAttachmentDetailsBuilder_ == null) {
                  ensurePscAttachmentDetailsIsMutable();
                  pscAttachmentDetails_.add(m);
                } else {
                  pscAttachmentDetailsBuilder_.addMessage(m);
                }
                break;
              } // case 170
            case 186:
              {
                input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry);
                importSourcesCase_ = 23;
                break;
              } // case 186
            case 194:
              {
                input.readMessage(
                    getManagedBackupSourceFieldBuilder().getBuilder(), extensionRegistry);
                importSourcesCase_ = 24;
                break;
              } // case 194
            case 202:
              {
                com.google.cloud.memorystore.v1.Instance.InstanceEndpoint m =
                    input.readMessage(
                        com.google.cloud.memorystore.v1.Instance.InstanceEndpoint.parser(),
                        extensionRegistry);
                if (endpointsBuilder_ == null) {
                  ensureEndpointsIsMutable();
                  endpoints_.add(m);
                } else {
                  endpointsBuilder_.addMessage(m);
                }
                break;
              } // case 202
            case 208:
              {
                mode_ = input.readEnum();
                bitField0_ |= 0x01000000;
                break;
              } // case 208
            case 224:
              {
                ondemandMaintenance_ = input.readBool();
                bitField0_ |= 0x02000000;
                break;
              } // case 224
            case 250:
              {
                input.readMessage(
                    getMaintenancePolicyFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x04000000;
                break;
              } // case 250
            case 258:
              {
                input.readMessage(
                    getMaintenanceScheduleFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x08000000;
                break;
              } // case 258
            case 266:
              {
                input.readMessage(
                    getCrossInstanceReplicationConfigFieldBuilder().getBuilder(),
                    extensionRegistry);
                bitField0_ |= 0x10000000;
                break;
              } // case 266
            case 352:
              {
                asyncInstanceEndpointsDeletionEnabled_ = input.readBool();
                bitField0_ |= 0x20000000;
                break;
              } // case 352
            case 378:
              {
                backupCollection_ = input.readStringRequireUtf8();
                bitField0_ |= 0x40000000;
                break;
              } // case 378
            case 386:
              {
                input.readMessage(
                    getAutomatedBackupConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x80000000;
                break;
              } // case 386
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
<pre>
A Memorystore instance.
</pre>

Protobuf type {@code google.cloud.memorystore.v1.Instance}
java-valkey/proto-google-cloud-valkey-v1/src/main/java/com/google/cloud/memorystore/v1/Instance.java