code: public ConnectionStringBuilder setEndpoint(String namespaceName, String domainName) {
          try {
              this.endpoint = new URI(String.format(Locale.US, END_POINT_FORMAT, namespaceName, domainName));
          } catch (URISyntaxException exception) {
              throw new IllegalConnectionStringFormatException(
                      String.format(Locale.US, "Invalid namespace name: %s", namespaceName),
                      exception);
          }
          return this;
      }
docs: Set an endpoint which can be used to connect to the EventHub instance.
  
  @param namespaceName the name of the namespace to connect to.
  @param domainName    identifies the domain the namespace is located in. For non-public and national clouds,
  the domain will not be "servicebus.windows.net". Available options include:
  - "servicebus.usgovcloudapi.net"
  - "servicebus.cloudapi.de"
  - "servicebus.chinacloudapi.cn"
  @return the {@link ConnectionStringBuilder} being set.