code: private Service fetch(String serviceName, @Nullable String serviceVersion) {
      Preconditions.checkArgument(
          !Strings.isNullOrEmpty(serviceName), "service name must be specified");
  
      if (serviceVersion == null) {
        serviceVersion = fetchLatestServiceVersion(serviceName);
      }
  
      final HttpResponse httpResponse;
      try {
        httpResponse = serviceManagement.services().configs().get(serviceName, serviceVersion)
            .setFields(FIELD_MASKS)
            .executeUnparsed();
      } catch (IOException exception) {
        throw new ServiceConfigException(exception);
      }
  
      int statusCode = httpResponse.getStatusCode();
      if (statusCode != HttpStatusCodes.STATUS_CODE_OK) {
        String extendedMessage = ERROR_CODE_DETAILS.get(statusCode);
        String message = MessageFormat.format(
            "Failed to fetch service config (status code {0})",
            statusCode);
        if (extendedMessage != null) {
          message = String.format("%s: %s", message, extendedMessage);
        }
        throw new ServiceConfigException(message);
      }
  
      Service service = parseHttpResponse(httpResponse);
      validateServiceConfig(service, serviceName, serviceVersion);
  
      return service;
    }
docs: Fetches the service configuration with the given service name and service version.
  
  @param serviceName the given service name
  @param serviceVersion the given service version
  @return a {@link Service} object generated by the JSON response from Google Service Management.