docs: public ServiceCall<Credentials> updateCredentials(UpdateCredentialsOptions updateCredentialsOptions) {
      Validator.notNull(updateCredentialsOptions, "updateCredentialsOptions cannot be null");
      String[] pathSegments = { "v1/environments", "credentials" };
      String[] pathParameters = { updateCredentialsOptions.environmentId(), updateCredentialsOptions.credentialId() };
      RequestBuilder builder = RequestBuilder.put(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments,
          pathParameters));
      builder.query("version", versionDate);
      Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "updateCredentials");
      for (Entry<String, String> header : sdkHeaders.entrySet()) {
        builder.header(header.getKey(), header.getValue());
      }
      builder.header("Accept", "application/json");
      final JsonObject contentJson = new JsonObject();
      if (updateCredentialsOptions.sourceType() != null) {
        contentJson.addProperty("source_type", updateCredentialsOptions.sourceType());
      }
      if (updateCredentialsOptions.credentialDetails() != null) {
        contentJson.add("credential_details", GsonSingleton.getGson().toJsonTree(updateCredentialsOptions
            .credentialDetails()));
      }
      builder.bodyJson(contentJson);
      return createServiceCall(builder.build(), ResponseConverterUtils.getObject(Credentials.class));
    }