code: @Override
    public Server build() {
      if (!CheckGcpEnvironment.isOnGcp()) {
        if (enableUntrustedAlts) {
          logger.log(
              Level.WARNING,
              "Untrusted ALTS mode is enabled and we cannot guarantee the trustworthiness of the "
                  + "ALTS handshaker service");
        } else {
          Status status =
              Status.INTERNAL.withDescription("ALTS is only allowed to run on Google Cloud Platform");
          delegate.intercept(new FailingServerInterceptor(status));
        }
      }
  
      final LazyChannel lazyHandshakerChannel = new LazyChannel(handshakerChannelPool);
      delegate.protocolNegotiator(
          AltsProtocolNegotiator.createServerNegotiator(
              new TsiHandshakerFactory() {
                @Override
                public TsiHandshaker newHandshaker(String authority) {
                  return AltsTsiHandshaker.newServer(
                      HandshakerServiceGrpc.newStub(lazyHandshakerChannel.get()),
                      new AltsHandshakerOptions(RpcProtocolVersionsUtil.getRpcProtocolVersions()));
                }
              },
              lazyHandshakerChannel));
      return delegate.build();
    }
docs: {@inheritDoc}