function createDefaultPipeline(options = {}) {
    const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options);
    pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options));
    const { credential, authSchemes, allowInsecureConnection } = options;
    if (credential) {
        if ((0, credentials_js_1.isApiKeyCredential)(credential)) {
            pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection }));
        }
        else if ((0, credentials_js_1.isBasicCredential)(credential)) {
            pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection }));
        }
        else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) {
            pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection }));
        }
        else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) {
            pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection }));
        }
    }
    return pipeline;
}
Creates a default rest pipeline to re-use accross Rest Level Clients