code: public static HttpPipeline createDefaultPipeline(Class<?> swaggerInterface, HttpPipelinePolicy credentialsPolicy) {
          // Order in which policies applied will be the order in which they appear in the array
          //
          List<HttpPipelinePolicy> policies = new ArrayList<HttpPipelinePolicy>();
          policies.add(new UserAgentPolicy(getDefaultUserAgentString(swaggerInterface)));
          policies.add(new RetryPolicy());
          policies.add(new CookiePolicy());
          if (credentialsPolicy != null) {
              policies.add(credentialsPolicy);
          }
          return new HttpPipeline(policies.toArray(new HttpPipelinePolicy[policies.size()]));
      }
docs: Create the default HttpPipeline.
  @param swaggerInterface The interface that the pipeline will use to generate a user-agent
  string.
  @param credentialsPolicy The credentials policy factory to use to apply authentication to the
  pipeline.
  @return the default HttpPipeline.